I did try to run the example from the tutorials, and it did work. After working a bit more on this issue I realized this is actually unrelated to CUDA 11.1/11.0.
I’m not entirely sure how the cuda support matrix works regarding cudnn, libtorch and pytorch so I’ll be as explicit as possible:
What I’m currently doing is JIT compiling a model with pytorch and then loading that model using LibTorch inside C++ code, and doing some stuff with LibTorch there. I haven’t been able to narrow this down to a minimum working example yet unfortunately, but this may be useful:
If I compile my code with CUDA Toolkit 11.1, using libtorch https://download.pytorch.org/libtorch/cu102/libtorch-shared-with-deps-1.5.0.zip 1
or
https://download.pytorch.org/libtorch/cu102/libtorch-shared-with-deps-1.5.1.zip 1
(note that both these libtorch are cu102, and I compiled the model into TorchScript using pytorch 1.5.0 and 1.5.1 respectively)
the code runs correctly in both GPU and CPU.
If I use
https://download.pytorch.org/libtorch/cu102/libtorch-shared-with-deps-1.6.0.zip 1
after JIT compilation with pytorch 1.6.0
the code fails with a different error:
 The following operation failed in the TorchScript interpreter.
  Traceback of TorchScript (most recent call last):
  RuntimeError: The following operation failed in the TorchScript interpreter.
  Traceback of TorchScript (most recent call last):
  RuntimeError: strides[cur - 1] == sizes[cur] * strides[cur] INTERNAL ASSERT
  FAILED at "../torch/csrc/jit/codegen/fuser/executor.cpp":176, please report a
  bug to PyTorch.

This issue occurs both in my pytorch code and in the code I execute from LibTorch
And if I run with libtorch 1.7.0 or nightly libtorch I get the PTX JIT issue, but only when I execute my model on GPU using kDouble tensors as input, and after casting the model to kDouble (my model needs high precision floating point numbers)
CUDA driver error: a PTX JIT compilation failed
Exception raised from CompileToNVRTC at …/torch/csrc/jit/tensorexpr/
cuda_codegen.cpp:1204 (most recent call first)

I̶ ̶g̶e̶t̶ ̶n̶o̶ ̶e̶r̶r̶o̶r̶s̶ ̶o̶r̶ ̶w̶a̶r̶n̶i̶n̶g̶s̶ ̶a̶t̶ ̶a̶l̶l̶ ̶i̶n̶ ̶m̶y̶ ̶p̶y̶t̶o̶r̶c̶h̶ ̶c̶o̶d̶e̶ ̶f̶o̶r̶ ̶1̶.̶7̶.̶0̶
My pytorch code also fails for 1.7.0 with the same error, but only after repeated evaluation in a loop, so I guess this is not a libtorch issue after all