RuntimeError: CUDA error: no kernel image is available for execution on the device

Hello,

I’m trying to set up a machine learning model but have the following error showing up
RuntimeError: CUDA error: no kernel image is available for execution on the device

The system I am using is:
Ubuntu 18.04
Cuda toolkit 10.0
Nvidia driver 460
2 GPUs, both are GeForce RTX 3090

I think the problem may also be due to the driver as when I open the “Additional Driver”, I see the following.

The person who set up this computer tried to install nvidia-driver-455 but nothing shows up.

Does anyone know how to solve this?

Thank you

Please check if you have the correct cuda version installed for what you’re trying to run.
Please post the output of the deviceQuery demo that comes with cuda.

1 Like

Hello,

Below is the output to deviceQuery

./deviceQuery Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 2 CUDA Capable device(s)

Device 0: "GeForce RTX 3090"
  CUDA Driver Version / Runtime Version          11.2 / 10.0
  CUDA Capability Major/Minor version number:    8.6
  Total amount of global memory:                 24268 MBytes (25447170048 bytes)
MapSMtoCores for SM 8.6 is undefined.  Default to use 64 Cores/SM
MapSMtoCores for SM 8.6 is undefined.  Default to use 64 Cores/SM
  (82) Multiprocessors, ( 64) CUDA Cores/MP:     5248 CUDA Cores
  GPU Max Clock rate:                            1800 MHz (1.80 GHz)
  Memory Clock rate:                             9751 Mhz
  Memory Bus Width:                              384-bit
  L2 Cache Size:                                 6291456 bytes
  Maximum Texture Dimension Size (x,y,z)         1D=(131072), 2D=(131072, 65536), 3D=(16384, 16384, 16384)
  Maximum Layered 1D Texture Size, (num) layers  1D=(32768), 2048 layers
  Maximum Layered 2D Texture Size, (num) layers  2D=(32768, 32768), 2048 layers
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       49152 bytes
  Total number of registers available per block: 65536
  Warp size:                                     32
  Maximum number of threads per multiprocessor:  1536
  Maximum number of threads per block:           1024
  Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
  Max dimension size of a grid size    (x,y,z): (2147483647, 65535, 65535)
  Maximum memory pitch:                          2147483647 bytes
  Texture alignment:                             512 bytes
  Concurrent copy and kernel execution:          Yes with 2 copy engine(s)
  Run time limit on kernels:                     Yes
  Integrated GPU sharing Host Memory:            No
  Support host page-locked memory mapping:       Yes
  Alignment requirement for Surfaces:            Yes
  Device has ECC support:                        Disabled
  Device supports Unified Addressing (UVA):      Yes
  Device supports Compute Preemption:            Yes
  Supports Cooperative Kernel Launch:            Yes
  Supports MultiDevice Co-op Kernel Launch:      Yes
  Device PCI Domain ID / Bus ID / location ID:   0 / 161 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

Device 1: "GeForce RTX 3090"
  CUDA Driver Version / Runtime Version          11.2 / 10.0
  CUDA Capability Major/Minor version number:    8.6
  Total amount of global memory:                 24265 MBytes (25443893248 bytes)
MapSMtoCores for SM 8.6 is undefined.  Default to use 64 Cores/SM
MapSMtoCores for SM 8.6 is undefined.  Default to use 64 Cores/SM
  (82) Multiprocessors, ( 64) CUDA Cores/MP:     5248 CUDA Cores
  GPU Max Clock rate:                            1800 MHz (1.80 GHz)
  Memory Clock rate:                             9751 Mhz
  Memory Bus Width:                              384-bit
  L2 Cache Size:                                 6291456 bytes
  Maximum Texture Dimension Size (x,y,z)         1D=(131072), 2D=(131072, 65536), 3D=(16384, 16384, 16384)
  Maximum Layered 1D Texture Size, (num) layers  1D=(32768), 2048 layers
  Maximum Layered 2D Texture Size, (num) layers  2D=(32768, 32768), 2048 layers
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       49152 bytes
  Total number of registers available per block: 65536
  Warp size:                                     32
  Maximum number of threads per multiprocessor:  1536
  Maximum number of threads per block:           1024
  Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
  Max dimension size of a grid size    (x,y,z): (2147483647, 65535, 65535)
  Maximum memory pitch:                          2147483647 bytes
  Texture alignment:                             512 bytes
  Concurrent copy and kernel execution:          Yes with 2 copy engine(s)
  Run time limit on kernels:                     Yes
  Integrated GPU sharing Host Memory:            No
  Support host page-locked memory mapping:       Yes
  Alignment requirement for Surfaces:            Yes
  Device has ECC support:                        Disabled
  Device supports Unified Addressing (UVA):      Yes
  Device supports Compute Preemption:            Yes
  Supports Cooperative Kernel Launch:            Yes
  Supports MultiDevice Co-op Kernel Launch:      Yes
  Device PCI Domain ID / Bus ID / location ID:   0 / 193 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >
> Peer access from GeForce RTX 3090 (GPU0) -> GeForce RTX 3090 (GPU1) : No
> Peer access from GeForce RTX 3090 (GPU1) -> GeForce RTX 3090 (GPU0) : No

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 11.2, CUDA Runtime Version = 10.0, NumDevs = 2

I’m very new to GPU based computing so I’ve followed the instructions given from mmskeleton/GETTING_STARTED.md at master · open-mmlab/mmskeleton · GitHub
and just setup the environment with cuda toolkit 10.0.

I suppose the pytorch version you’re using doesn’t support the Ampere RTX 3090:
https://github.com/pytorch/pytorch/issues/49161
So you will have to use pytorch 1.7.1+cuda11

1 Like

Hello,

Unfortunately, the code I’m trying to run can only run with pytorch=1.2.0
As a result, I’ll need to have cuda 10.0

I found this nvidia document which I believe will allow me to use cuda 10.0 on the RTX3090 architecture
https://docs.nvidia.com/cuda/ampere-compatibility-guide/index.html

So I’ve been trying to run this instruction:

/usr/local/cuda-10.0/bin/nvcc \
  -gencode=arch=compute_52,code=sm_52 \
  -gencode=arch=compute_60,code=sm_60 \
  -gencode=arch=compute_61,code=sm_61 \
  -gencode=arch=compute_70,code=sm_70 \
  -gencode=arch=compute_75,code=sm_75 \
  -gencode=arch=compute_75,code=compute_75 \
  -O2 -o mykernel.o -c mykernel.cu \

but I am getting this error

gcc: error: mykernel.cu: No such file or directory
gcc: warning: '-x c++' after last input file has no effect
gcc: fatal error: no input file
compilation terminated.

Am I doing this correctly?

Thank you

Again, pytorch 1.2 is incompatible to Ampere, so cuda doesn’t matter.

1 Like

Hello,

Thank you for your answer.
I’ve now installed CUDA 11.0 with pytorch 1.7.0 but I’m getting errors when trying to install the model.

FAILED: /home/lab/mmskeleton/build/temp.linux-x86_64-3.7/mmskeleton/ops/nms/nms_kernel.o 
/usr/local/cuda-11.0/bin/nvcc -DWITH_CUDA -Immskeleton/ops/nms -I/home/lab/anaconda3/envs/mmskeleton/lib/python3.7/site-packages/numpy/core/include -I/home/lab/anaconda3/envs/mmskeleton/lib/python3.7/site-packages/torch/include -I/home/lab/anaconda3/envs/mmskeleton/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/lab/anaconda3/envs/mmskeleton/lib/python3.7/site-packages/torch/include/TH -I/home/lab/anaconda3/envs/mmskeleton/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-11.0/include -I/home/lab/anaconda3/envs/mmskeleton/include/python3.7m -c -c /home/lab/mmskeleton/mmskeleton/ops/nms/nms_kernel.cu -o /home/lab/mmskeleton/build/temp.linux-x86_64-3.7/mmskeleton/ops/nms/nms_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=gpu_nms -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=sm_86 -std=c++14
nvcc fatal   : Unsupported gpu architecture 'compute_86'

I think one reason could be that the CUDA version I get with nvcc -V and ./deviceQuery are different

nvcc -V output

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Wed_Jul_22_19:09:09_PDT_2020
Cuda compilation tools, release 11.0, V11.0.221
Build cuda_11.0_bu.TC445_37.28845127_0

./deviceQuery output

./deviceQuery Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 2 CUDA Capable device(s)

Device 0: "GeForce RTX 3090"
  CUDA Driver Version / Runtime Version          11.2 / 10.0
  CUDA Capability Major/Minor version number:    8.6
  Total amount of global memory:                 24268 MBytes (25447170048 bytes)
MapSMtoCores for SM 8.6 is undefined.  Default to use 64 Cores/SM
MapSMtoCores for SM 8.6 is undefined.  Default to use 64 Cores/SM
  (82) Multiprocessors, ( 64) CUDA Cores/MP:     5248 CUDA Cores
  GPU Max Clock rate:                            1800 MHz (1.80 GHz)
  Memory Clock rate:                             9751 Mhz
  Memory Bus Width:                              384-bit
  L2 Cache Size:                                 6291456 bytes
  Maximum Texture Dimension Size (x,y,z)         1D=(131072), 2D=(131072, 65536), 3D=(16384, 16384, 16384)
  Maximum Layered 1D Texture Size, (num) layers  1D=(32768), 2048 layers
  Maximum Layered 2D Texture Size, (num) layers  2D=(32768, 32768), 2048 layers
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       49152 bytes
  Total number of registers available per block: 65536
  Warp size:                                     32
  Maximum number of threads per multiprocessor:  1536
  Maximum number of threads per block:           1024
  Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
  Max dimension size of a grid size    (x,y,z): (2147483647, 65535, 65535)
  Maximum memory pitch:                          2147483647 bytes
  Texture alignment:                             512 bytes
  Concurrent copy and kernel execution:          Yes with 2 copy engine(s)
  Run time limit on kernels:                     Yes
  Integrated GPU sharing Host Memory:            No
  Support host page-locked memory mapping:       Yes
  Alignment requirement for Surfaces:            Yes
  Device has ECC support:                        Disabled
  Device supports Unified Addressing (UVA):      Yes
  Device supports Compute Preemption:            Yes
  Supports Cooperative Kernel Launch:            Yes
  Supports MultiDevice Co-op Kernel Launch:      Yes
  Device PCI Domain ID / Bus ID / location ID:   0 / 161 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

Device 1: "GeForce RTX 3090"
  CUDA Driver Version / Runtime Version          11.2 / 10.0
  CUDA Capability Major/Minor version number:    8.6
  Total amount of global memory:                 24265 MBytes (25443893248 bytes)
MapSMtoCores for SM 8.6 is undefined.  Default to use 64 Cores/SM
MapSMtoCores for SM 8.6 is undefined.  Default to use 64 Cores/SM
  (82) Multiprocessors, ( 64) CUDA Cores/MP:     5248 CUDA Cores
  GPU Max Clock rate:                            1800 MHz (1.80 GHz)
  Memory Clock rate:                             9751 Mhz
  Memory Bus Width:                              384-bit
  L2 Cache Size:                                 6291456 bytes
  Maximum Texture Dimension Size (x,y,z)         1D=(131072), 2D=(131072, 65536), 3D=(16384, 16384, 16384)
  Maximum Layered 1D Texture Size, (num) layers  1D=(32768), 2048 layers
  Maximum Layered 2D Texture Size, (num) layers  2D=(32768, 32768), 2048 layers
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       49152 bytes
  Total number of registers available per block: 65536
  Warp size:                                     32
  Maximum number of threads per multiprocessor:  1536
  Maximum number of threads per block:           1024
  Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
  Max dimension size of a grid size    (x,y,z): (2147483647, 65535, 65535)
  Maximum memory pitch:                          2147483647 bytes
  Texture alignment:                             512 bytes
  Concurrent copy and kernel execution:          Yes with 2 copy engine(s)
  Run time limit on kernels:                     Yes
  Integrated GPU sharing Host Memory:            No
  Support host page-locked memory mapping:       Yes
  Alignment requirement for Surfaces:            Yes
  Device has ECC support:                        Disabled
  Device supports Unified Addressing (UVA):      Yes
  Device supports Compute Preemption:            Yes
  Supports Cooperative Kernel Launch:            Yes
  Supports MultiDevice Co-op Kernel Launch:      Yes
  Device PCI Domain ID / Bus ID / location ID:   0 / 193 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >
> Peer access from GeForce RTX 3090 (GPU0) -> GeForce RTX 3090 (GPU1) : No
> Peer access from GeForce RTX 3090 (GPU1) -> GeForce RTX 3090 (GPU0) : No

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 11.2, CUDA Runtime Version = 10.0, NumDevs = 2
Result = PASS

Can this be fixed?
Thank you very much

You also need to uninstall cuda 10 and install cuda 11 instead.

1 Like

Hello,

I uninstalled CUDA 10.0 using sudo apt-get --purge remove cuda-10.0 before I installed cuda-11.0 so I’m quite confused as to why it still says it’s there.
I’ve also updated the path setup to 11.0
After uninstalling, I also checked that there is no longer the cuda-10.0 file in the /usr/local/ directory

Is there something I missed during the uninstalling or installing process?

Thank you very much

That’s odd indeed, nvcc reports the correct version. Please post the output of
dpkg -l |grep cuda

1 Like
ii  cuda-11-0                                  11.0.3-1                                         amd64        CUDA 11.0 meta-package
ii  cuda-command-line-tools-11-0               11.0.3-1                                         amd64        CUDA command-line tools
ii  cuda-compiler-11-0                         11.0.3-1                                         amd64        CUDA compiler
rc  cuda-cublas-10-0                           10.0.130-1                                       amd64        CUBLAS native runtime libraries
rc  cuda-cudart-10-0                           10.0.130-1                                       amd64        CUDA Runtime native Libraries
ii  cuda-cudart-11-0                           11.0.221-1                                       amd64        CUDA Runtime native Libraries
rc  cuda-cudart-dev-10-0                       10.0.130-1                                       amd64        CUDA Runtime native dev links, headers
ii  cuda-cudart-dev-11-0                       11.0.221-1                                       amd64        CUDA Runtime native dev links, headers
rc  cuda-cufft-10-0                            10.0.130-1                                       amd64        CUFFT native runtime libraries
ii  cuda-cuobjdump-11-0                        11.0.221-1                                       amd64        CUDA cuobjdump
rc  cuda-cupti-10-0                            10.0.130-1                                       amd64        CUDA profiling tools interface.
ii  cuda-cupti-11-0                            11.0.221-1                                       amd64        CUDA profiling tools runtime libs.
ii  cuda-cupti-dev-11-0                        11.0.221-1                                       amd64        CUDA profiling tools interface.
rc  cuda-curand-10-0                           10.0.130-1                                       amd64        CURAND native runtime libraries
rc  cuda-cusolver-10-0                         10.0.130-1                                       amd64        CUDA solver native runtime libraries
rc  cuda-cusparse-10-0                         10.0.130-1                                       amd64        CUSPARSE native runtime libraries
ii  cuda-demo-suite-11-0                       11.0.167-1                                       amd64        Demo suite for CUDA
ii  cuda-documentation-11-0                    11.0.228-1                                       amd64        CUDA documentation
ii  cuda-driver-dev-11-0                       11.0.221-1                                       amd64        CUDA Driver native dev stub library
ii  cuda-drivers                               460.32.03-1                                      amd64        CUDA Driver meta-package, branch-agnostic
ii  cuda-drivers-460                           460.32.03-1                                      amd64        CUDA Driver meta-package, branch-specific
ii  cuda-gdb-11-0                              11.0.221-1                                       amd64        CUDA-GDB
ii  cuda-libraries-11-0                        11.0.3-1                                         amd64        CUDA Libraries 11.0 meta-package
ii  cuda-libraries-dev-11-0                    11.0.3-1                                         amd64        CUDA Libraries 11.0 development meta-package
ii  cuda-memcheck-11-0                         11.0.221-1                                       amd64        CUDA-MEMCHECK
rc  cuda-npp-10-0                              10.0.130-1                                       amd64        NPP native runtime libraries
ii  cuda-nsight-11-0                           11.0.221-1                                       amd64        CUDA nsight
rc  cuda-nsight-compute-10-0                   10.0.130-1                                       amd64        NVIDIA Nsight Compute
ii  cuda-nsight-compute-11-0                   11.0.3-1                                         amd64        NVIDIA Nsight Compute
ii  cuda-nsight-systems-11-0                   11.0.3-1                                         amd64        NVIDIA Nsight Systems
rc  cuda-nvcc-10-0                             10.0.130-1                                       amd64        CUDA nvcc
ii  cuda-nvcc-11-0                             11.0.221-1                                       amd64        CUDA nvcc
ii  cuda-nvdisasm-11-0                         11.0.221-1                                       amd64        CUDA disassembler
rc  cuda-nvgraph-10-0                          10.0.130-1                                       amd64        NVGRAPH native runtime libraries
ii  cuda-nvml-dev-11-0                         11.0.167-1                                       amd64        NVML native dev links, headers
rc  cuda-nvprof-10-0                           10.0.130-1                                       amd64        CUDA Profiler tools
ii  cuda-nvprof-11-0                           11.0.221-1                                       amd64        CUDA Profiler tools
ii  cuda-nvprune-11-0                          11.0.221-1                                       amd64        CUDA nvprune
rc  cuda-nvrtc-10-0                            10.0.130-1                                       amd64        NVRTC native runtime libraries
ii  cuda-nvrtc-11-0                            11.0.221-1                                       amd64        NVRTC native runtime libraries
ii  cuda-nvrtc-dev-11-0                        11.0.221-1                                       amd64        NVRTC native dev links, headers
rc  cuda-nvtx-10-0                             10.0.130-1                                       amd64        NVIDIA Tools Extension
ii  cuda-nvtx-11-0                             11.0.167-1                                       amd64        NVIDIA Tools Extension
ii  cuda-nvvp-11-0                             11.0.221-1                                       amd64        CUDA Profiler tools
ii  cuda-repo-ubuntu1804                       10.2.89-1                                        amd64        cuda repository configuration files
ii  cuda-runtime-11-0                          11.0.3-1                                         amd64        CUDA Runtime 11.0 meta-package
ii  cuda-samples-11-0                          11.0.221-1                                       amd64        CUDA example applications
ii  cuda-sanitizer-11-0                        11.0.221-1                                       amd64        CUDA Sanitizer
rc  cuda-toolkit-10-0                          10.0.130-1                                       amd64        CUDA Toolkit 10.0 meta-package
ii  cuda-toolkit-11-0                          11.0.3-1                                         amd64        CUDA Toolkit 11.0 meta-package
ii  cuda-tools-11-0                            11.0.3-1                                         amd64        CUDA Tools meta-package
rc  cuda-visual-tools-10-0                     10.0.130-1                                       amd64        CUDA visual tools
ii  cuda-visual-tools-11-0                     11.0.3-1                                         amd64        CUDA visual tools

Seems you only removed the meta-package, leaving the sub-package installed. Please try

sudo apt remove cuda*10-0
sudo apt remove libcuda*10-0

I tried running those lines but it didn’t seem to have removed anything

sudo apt remove cuda*10-0 outputted the following:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'cuda-cusparse-cross-qnx-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-npp-cross-qnx-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-nvprune-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-nvgraph-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cublas-dev-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-gdb-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-nsight-compute--10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-visual-tools-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-curand-dev-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cupti-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-curand-cross-qnx-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-libraries-dev-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cublas-cross-qnx-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-nvjpeg-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-nvrtc-dev-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-minimal-build-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cufft-cross-qnx-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-libraries-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-runtime-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cusolver-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cusparse-dev-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-nvrtc-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-nvjpeg-dev-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cufft-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cusparse-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-npp-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-tools-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-nvtx-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cudart-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-license-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-nvdisasm-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-samples-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-documentation-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cusolver-cross-qnx-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-compat-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-nvcc-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-nvvp-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cross-qnx-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-toolkit-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-nvgraph-dev-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cudart-dev-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-nvml-dev-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-gpu-library-advisor-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cublas-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-core-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cusolver-dev-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-driver-cross-qnx-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-compiler-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-demo-suite-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-npp-dev-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-nsight-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-curand-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-command-line-tools-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cufft-dev-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-driver-dev-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-misc-headers-cross-qnx-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-memcheck-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cudart-cross-qnx-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-gdb-src-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-misc-headers-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cuobjdump-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-nsight-compute-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-nvprof-10-0' for glob 'cuda*10-0'
Package 'cuda-cudart-cross-qnx-10-0' is not installed, so not removed
Package 'cuda-driver-cross-qnx-10-0' is not installed, so not removed
Package 'cuda-misc-headers-cross-qnx-10-0' is not installed, so not removed
Package 'cuda-cusolver-cross-qnx-10-0' is not installed, so not removed
Package 'cuda-cublas-cross-qnx-10-0' is not installed, so not removed
Package 'cuda-cufft-cross-qnx-10-0' is not installed, so not removed
Package 'cuda-curand-cross-qnx-10-0' is not installed, so not removed
Package 'cuda-cusparse-cross-qnx-10-0' is not installed, so not removed
Package 'cuda-npp-cross-qnx-10-0' is not installed, so not removed
Package 'cuda-10-0' is not installed, so not removed
Package 'cuda-command-line-tools-10-0' is not installed, so not removed
Package 'cuda-compat-10-0' is not installed, so not removed
Package 'cuda-compiler-10-0' is not installed, so not removed
Package 'cuda-core-10-0' is not installed, so not removed
Package 'cuda-cross-qnx-10-0' is not installed, so not removed
Package 'cuda-cublas-10-0' is not installed, so not removed
Package 'cuda-cublas-dev-10-0' is not installed, so not removed
Package 'cuda-cudart-10-0' is not installed, so not removed
Package 'cuda-cudart-dev-10-0' is not installed, so not removed
Package 'cuda-cufft-10-0' is not installed, so not removed
Package 'cuda-cufft-dev-10-0' is not installed, so not removed
Package 'cuda-cuobjdump-10-0' is not installed, so not removed
Package 'cuda-cupti-10-0' is not installed, so not removed
Package 'cuda-curand-10-0' is not installed, so not removed
Package 'cuda-curand-dev-10-0' is not installed, so not removed
Package 'cuda-cusolver-10-0' is not installed, so not removed
Package 'cuda-cusolver-dev-10-0' is not installed, so not removed
Package 'cuda-cusparse-10-0' is not installed, so not removed
Package 'cuda-cusparse-dev-10-0' is not installed, so not removed
Package 'cuda-demo-suite-10-0' is not installed, so not removed
Package 'cuda-documentation-10-0' is not installed, so not removed
Package 'cuda-driver-dev-10-0' is not installed, so not removed
Package 'cuda-gdb-10-0' is not installed, so not removed
Package 'cuda-gdb-src-10-0' is not installed, so not removed
Package 'cuda-gpu-library-advisor-10-0' is not installed, so not removed
Package 'cuda-libraries-10-0' is not installed, so not removed
Package 'cuda-libraries-dev-10-0' is not installed, so not removed
Package 'cuda-license-10-0' is not installed, so not removed
Package 'cuda-memcheck-10-0' is not installed, so not removed
Package 'cuda-minimal-build-10-0' is not installed, so not removed
Package 'cuda-misc-headers-10-0' is not installed, so not removed
Package 'cuda-npp-10-0' is not installed, so not removed
Package 'cuda-npp-dev-10-0' is not installed, so not removed
Package 'cuda-nsight-10-0' is not installed, so not removed
Package 'cuda-nsight-compute--10-0' is not installed, so not removed
Package 'cuda-nsight-compute-10-0' is not installed, so not removed
Package 'cuda-nvcc-10-0' is not installed, so not removed
Package 'cuda-nvdisasm-10-0' is not installed, so not removed
Package 'cuda-nvgraph-10-0' is not installed, so not removed
Package 'cuda-nvgraph-dev-10-0' is not installed, so not removed
Package 'cuda-nvjpeg-10-0' is not installed, so not removed
Package 'cuda-nvjpeg-dev-10-0' is not installed, so not removed
Package 'cuda-nvml-dev-10-0' is not installed, so not removed
Package 'cuda-nvprof-10-0' is not installed, so not removed
Package 'cuda-nvprune-10-0' is not installed, so not removed
Package 'cuda-nvrtc-10-0' is not installed, so not removed
Package 'cuda-nvrtc-dev-10-0' is not installed, so not removed
Package 'cuda-nvtx-10-0' is not installed, so not removed
Package 'cuda-nvvp-10-0' is not installed, so not removed
Package 'cuda-runtime-10-0' is not installed, so not removed
Package 'cuda-samples-10-0' is not installed, so not removed
Package 'cuda-toolkit-10-0' is not installed, so not removed
Package 'cuda-tools-10-0' is not installed, so not removed
Package 'cuda-visual-tools-10-0' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

and sudo apt remove libcuda*10-0 outputted the following:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libcuda*10-0
E: Couldn't find any package by glob 'libcuda*10-0'
E: Couldn't find any package by regex 'libcuda*10-0'

Does
sudo apt autoremove
remove the cuda 10 packages?

Nope, it just outputs

Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Please try

sudo apt remove cuda*10-0 libcublas*10*

sudo apt remove cuda*10-0 libcublas*10*outputs:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'cuda-cusparse-cross-qnx-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-npp-cross-qnx-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-nvprune-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-nvgraph-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cublas-dev-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-gdb-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-nsight-compute--10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-visual-tools-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-curand-dev-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cupti-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-curand-cross-qnx-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-libraries-dev-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cublas-cross-qnx-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-nvjpeg-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-nvrtc-dev-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-minimal-build-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cufft-cross-qnx-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-libraries-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-runtime-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cusolver-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cusparse-dev-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-nvrtc-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-nvjpeg-dev-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cufft-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cusparse-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-npp-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-tools-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-nvtx-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cudart-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-license-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-nvdisasm-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-samples-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-documentation-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cusolver-cross-qnx-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-compat-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-nvcc-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-nvvp-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cross-qnx-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-toolkit-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-nvgraph-dev-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cudart-dev-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-nvml-dev-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-gpu-library-advisor-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cublas-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-core-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cusolver-dev-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-driver-cross-qnx-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-compiler-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-demo-suite-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-npp-dev-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-nsight-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-curand-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-command-line-tools-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cufft-dev-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-driver-dev-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-misc-headers-cross-qnx-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-memcheck-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cudart-cross-qnx-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-gdb-src-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-misc-headers-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-cuobjdump-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-nsight-compute-10-0' for glob 'cuda*10-0'
Note, selecting 'cuda-nvprof-10-0' for glob 'cuda*10-0'
Package 'cuda-cudart-cross-qnx-10-0' is not installed, so not removed
Package 'cuda-driver-cross-qnx-10-0' is not installed, so not removed
Package 'cuda-misc-headers-cross-qnx-10-0' is not installed, so not removed
Package 'cuda-cusolver-cross-qnx-10-0' is not installed, so not removed
Package 'cuda-cublas-cross-qnx-10-0' is not installed, so not removed
Package 'cuda-cufft-cross-qnx-10-0' is not installed, so not removed
Package 'cuda-curand-cross-qnx-10-0' is not installed, so not removed
Package 'cuda-cusparse-cross-qnx-10-0' is not installed, so not removed
Package 'cuda-npp-cross-qnx-10-0' is not installed, so not removed
Note, selecting 'libcublas10' for glob 'libcublas*10*'
Package 'cuda-10-0' is not installed, so not removed
Package 'cuda-command-line-tools-10-0' is not installed, so not removed
Package 'cuda-compat-10-0' is not installed, so not removed
Package 'cuda-compiler-10-0' is not installed, so not removed
Package 'cuda-core-10-0' is not installed, so not removed
Package 'cuda-cross-qnx-10-0' is not installed, so not removed
Package 'cuda-cublas-10-0' is not installed, so not removed
Package 'cuda-cublas-dev-10-0' is not installed, so not removed
Package 'cuda-cudart-10-0' is not installed, so not removed
Package 'cuda-cudart-dev-10-0' is not installed, so not removed
Package 'cuda-cufft-10-0' is not installed, so not removed
Package 'cuda-cufft-dev-10-0' is not installed, so not removed
Package 'cuda-cuobjdump-10-0' is not installed, so not removed
Package 'cuda-cupti-10-0' is not installed, so not removed
Package 'cuda-curand-10-0' is not installed, so not removed
Package 'cuda-curand-dev-10-0' is not installed, so not removed
Package 'cuda-cusolver-10-0' is not installed, so not removed
Package 'cuda-cusolver-dev-10-0' is not installed, so not removed
Package 'cuda-cusparse-10-0' is not installed, so not removed
Package 'cuda-cusparse-dev-10-0' is not installed, so not removed
Package 'cuda-demo-suite-10-0' is not installed, so not removed
Package 'cuda-documentation-10-0' is not installed, so not removed
Package 'cuda-driver-dev-10-0' is not installed, so not removed
Package 'cuda-gdb-10-0' is not installed, so not removed
Package 'cuda-gdb-src-10-0' is not installed, so not removed
Package 'cuda-gpu-library-advisor-10-0' is not installed, so not removed
Package 'cuda-libraries-10-0' is not installed, so not removed
Package 'cuda-libraries-dev-10-0' is not installed, so not removed
Package 'cuda-license-10-0' is not installed, so not removed
Package 'cuda-memcheck-10-0' is not installed, so not removed
Package 'cuda-minimal-build-10-0' is not installed, so not removed
Package 'cuda-misc-headers-10-0' is not installed, so not removed
Package 'cuda-npp-10-0' is not installed, so not removed
Package 'cuda-npp-dev-10-0' is not installed, so not removed
Package 'cuda-nsight-10-0' is not installed, so not removed
Package 'cuda-nsight-compute--10-0' is not installed, so not removed
Package 'cuda-nsight-compute-10-0' is not installed, so not removed
Package 'cuda-nvcc-10-0' is not installed, so not removed
Package 'cuda-nvdisasm-10-0' is not installed, so not removed
Package 'cuda-nvgraph-10-0' is not installed, so not removed
Package 'cuda-nvgraph-dev-10-0' is not installed, so not removed
Package 'cuda-nvjpeg-10-0' is not installed, so not removed
Package 'cuda-nvjpeg-dev-10-0' is not installed, so not removed
Package 'cuda-nvml-dev-10-0' is not installed, so not removed
Package 'cuda-nvprof-10-0' is not installed, so not removed
Package 'cuda-nvprune-10-0' is not installed, so not removed
Package 'cuda-nvrtc-10-0' is not installed, so not removed
Package 'cuda-nvrtc-dev-10-0' is not installed, so not removed
Package 'cuda-nvtx-10-0' is not installed, so not removed
Package 'cuda-nvvp-10-0' is not installed, so not removed
Package 'cuda-runtime-10-0' is not installed, so not removed
Package 'cuda-samples-10-0' is not installed, so not removed
Package 'cuda-toolkit-10-0' is not installed, so not removed
Package 'cuda-tools-10-0' is not installed, so not removed
Package 'cuda-visual-tools-10-0' is not installed, so not removed
Package 'libcublas10' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

No idea what that crappy apt doesn’t like. Please try using aptitude to select the packages one-by-one.

Do I just remove all the 10.0 packages? Or are there specific packages I must keep?

Just remove all 10.x versions. Maybe synaptics instead of aptitude is more comfortable if you’re on a desktop.