[NEED HELP] Solution for CUDA error -> no kernel image available for execution

Hallo all, first thanks for helping me :slight_smile:

I am currently doing depth estimation project. i tried to do packnet-sfm from toyota:

i made docker using their file and tried also to install the packages inside my virtual environment, But as i wanna try their scripts, i got following error:
-using docker:
RuntimeError: CUDA error: no kernel image is available for execution on the device

-using virtual environment:
RuntimeError: CUDA error: no kernel image is available for execution on the device
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.

so here is my system:
Collecting environment information…
PyTorch version: 1.12.0.dev20220316+cu102
Is debug build: False
CUDA used to build PyTorch: 10.2
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.4 LTS (x86_64)
GCC version: (Ubuntu 7.5.0-6ubuntu2) 7.5.0
Clang version: Could not collect
CMake version: version 3.16.3
Libc version: glibc-2.31

Python version: 3.8.10 (default, Nov 26 2021, 20:14:08) [GCC 9.3.0] (64-bit runtime)
Python platform: Linux-5.13.0-35-generic-x86_64-with-glibc2.29
Is CUDA available: True
CUDA runtime version: 10.2.89
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 3050
Nvidia driver version: 510.54
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] numpy==1.22.3
[pip3] pytorch-lightning==1.3.8
[pip3] torch==1.12.0.dev20220316+cu102
[pip3] torchmetrics==0.7.2
[pip3] torchvision==0.13.0.dev20220316+cu102
[conda] Could not collect

i tried this in python:

[‘sm_37’, ‘sm_50’, ‘sm_60’, ‘sm_70’]

i have Cuda 10.2 now running with RTX 3050 (compute capabilty 8,6).
i have read that 10.2 doesnt support the compute capabilty 8.6.
What should i do?
Should i try to upgrade cuda to 11.**, if yes, which version of 11 i need to install?
Are there also any solutions without upgrading the cuda 10.2? because the development team in the github/ in docker file, they used cuda 10.2.

Thank you all for the answers!

Yes, you would need to update PyTorch with a CUDA 11 runtime.
I would generally recommend to use the latest release, i.e. if you are installing the pip wheels or conda binaries, use 11.5.

No, you need to update to the binaries with CUDA 11, as the previous ones don’t ship with the needed compute capability.

Hi Ptrblck!

thanks for ur quick response XD

okay, i will try to upgrade the cuda and tel u guys later if i succedd or not… lol

mm i think i wanna try first with 11.3 because in the pytorc_installation only for 11.3 or 10.2