Thanks for testing it! I verified that CUDA was working by compiling and running a hello world example, so it wasn’t that. I had installed cuDNN separately from PyTorch.
Replacing:
target_link_libraries(example-app "${TORCH_LIBRARIES}")
with:
target_link_libraries(example-app torch)
magically did it for me. My ${TORCH_LIBRARIES} contained some local paths for CUDA libraries so perhaps they were getting in the way of the CUDA that shipped with PyTorch.
Thanks!