I’ve recently updated my cuda to 11.1 and I tried JIT compiling a model using the latest stable pytorch (1.7.0) and opening the JIT compiled model inside a C++ environment using LibTorch (also 1.7.0) and I’ve found that the code that evaluates the model compiles correctly but libtorch outputs errors when the model is sent into a CUDA device and evaluates tensors there. I get either PTX JIT errors or “shapes don’t match” errors inside torchscript, depending on exactly how I evaluate the model. I’m pretty sure the errors are not a product of the pytorch or C++ code itself because the code runs perfectly in CPU.
The PTX compilation error I get is:
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):
which is strange since I’m pretty sure libtorch detected the architecture of my GPU correctly, so I don’t see why nvrtc would error out, also this didn’t use to happen with previous cuda versions.
Any idea what the problem may be?
I tried this with both cuda 11.0 and cuda 11.1 and I’ve found the same problem with both