Sorry, to clarify, you installed PyTorch or CUDA from source? deviceQuery and bandwithTest are scripts to check CUDA worked, and have nothing to do with PyTorch. You need to install PyTorch from source, not with pip, by following the instructions in the link I posted.