Hello,
i am trying to run yolo v7 algorithm on jetson nano, but i am unable to use gpu, i am using cuda 11.
getting this error
assert torch.cuda.is_available(), f'CUDA unavailable, invalid device {device} requested' # check availability
AssertionError: CUDA unavailable, invalid device 0 requested
here’s the CUDA version:
nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Mon_May__3_19:15:10_PDT_2021
Cuda compilation tools, release 11.3, V11.3.109
Build cuda_11.3.r11.3/compiler.29920130_0
I am beginner
Please help me !
I’m guessing you installed content with some method other than JetPack/SDK Manager. nvidia-smi is for PCI-based GPUs, but Jetson GPUs are directly integrated with the memory controller. That software (and drivers) will fail with non-PCI GPUs.
You’ll need to remove anything which was not for the Jetson, and add via JetPack/SDKM instead (use the release currently installed).
Noted! , can you please tell me how can i remove which is not for the jetson
I will recommend flashing and reinstalling if you don’t need what is present. However, here are some general tips:
Additional note for when you’ll have clean up as advised by @linuxdev :
You can get similar information as from nvidia-smi from other tools with Jetson;
-
Get GPU capabilities: you can get that from deviceQuery. Just build as root the sample in /usr/local/cuda/samples/1_Utilities/deviceQuery and run it.
-
Get GPU usage and temperature : You may use tool tegrastats. GPU is referred as GR3D, you would see usage and current clock frequency. For temperature, you would further see something like: GPU@40.875C
-
For memory usage, Jetsons have an iGPU sharing physical memory with the system.