Hello, I am using Jetson Xavier NX developer kit and received it with Jetpack 5.0.2 is installed. By jtop and nvcc --version
, I can see that Cuda 11.4.239 version exist but every attempt to use CUDA (e.g. pytorch, opencv, cu_PCL, etc…) say 0 devices are available.
nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Wed_May__4_00:02:26_PDT_2022
Cuda compilation tools, release 11.4, V11.4.239
Build cuda_11.4.r11.4/compiler.31294910_0
For example, now I am trying to run demo file of this repo and got attached output when I build by make
in subdirectory
USE Default CUDA DIR: /usr/local/cuda
TARGET_ARCH: aarch64
CUDA_VERSION: 11040
SMS: 30 35 37 50 52 53 60 61 62 70 72 87
g++ -I/usr/local/cuda/include -I/include -I/usr/local/include -I/usr/include/eigen3/ -I/usr/include/pcl-1.10/ -I/usr/include/vtk-6.3/ -D_REENTRANT -std=c++14 -fPIC -o obj/main.o -c main.cpp
g++ -D_REENTRANT -std=c++14 -o demo obj/main.o -L/usr/lib -L/usr/local/lib -L/usr/local/cuda/lib64 -lcudart_static -lrt -ldl -lpthread -lcudart -L/lib64 -lcudnn -lpthread -L/usr/lib/aarch64-linux-gnu/ -lboost_system -lpcl_common -lpcl_io -lpcl_recognition -lpcl_features -lpcl_sample_consensus -lpcl_octree -lpcl_search -lpcl_filters -lpcl_kdtree -lpcl_segmentation -lpcl_visualization ./lib/libcudacluster.so
There I can check my CUDA_VERSION is 11040 (which probably mean 11.4 ver) and used(or found) during build process, but when I execute demo file by ./demo sample.pcd
, there are no detected device again.
GPU has cuda devices: 0
-------------- test CUDA lib -----------
-------------- cudaExtractCluster -----------
Cuda failure: no CUDA-capable device is detected at line 138 in file cudaCluster.cpp error status: 100
Aborted (core dumped)sample.pcd` ,
this demo try to find GPUdevice by cudaGetDeviceCount()
inside the source code.
How can I actually use CUDA gpu support in jetson board and make it work successfully?