Hi everyone, I am trying to build libtorch 2.13 via VCPKG and compilers by VS 2022, with CUDA Toolkit 13.0 and cudnn 9.20 as of the documentation ( pytorch/RELEASE.md at main · pytorch/pytorch · GitHub ). The package builds but it throws during execution at the following Exception
throw c10::AcceleratorError( {.function = function_name, .file = filename, .line = line_number}, err, std::move(check_message));
Here the output after try/catch
CUDA error: no kernel image is available for execution on the device Search for `cudaErrorNoKernelImageForDevice' in for more information. For more detailed error information, run with CUDA_LOG_FILE=stderr
This basically means I can not perform operations device for acceleration (it works fine on cpu), like the following sum operation
torch::Device device(torch::kCUDA, 0);
torch::Tensor tensor1 = torch::ones({ 3, 3 }, torch::kFloat32).to(device);
torch::Tensor tensor2 = torch::full({ 3, 3 }, 2.0, torch::kFloat32).to(device);
torch::Tensor result = tensor1 + tensor2;
I tried it on two different grafic cards with the same architecture, i.e. same computer capability 8.9 and I got the same error.
- NVIDIA RTX 1000 Ada Generation Laptop GPU
- NVIDIA RTX 4000 Ada Generation
I already modified the file
<BUILD_FOLDER>\vcpkg_installed\x64-windows\share\Caffe2\Modules_CUDA_fix\upstream\FindCUDA\select_compute_arch.cmake
to enforce:
set(CUDA_KNOWN_GPU_ARCHITECTURES “Ada”)
set(CUDA_COMMON_GPU_ARCHITECTURES “8.9”)
set(CUDA_ALL_GPU_ARCHITECTURES “8.9”)
but it did not cause any effect. Any help on this topic?
Ps: I am interested in both Debug and Release binaries.
Best
Luis