How to use CUDA12.1 on Jetson (L4T 35.1)

I am using Cmake to build C++20, and I have to upgrade CUDA12.1 because CUDA11.4 does not support C++20
My device is Jetson NX, L4T 35.1.0, CUDA12.1, Opencv4.7.0, Cmake 3.26.2
The problem I currently encounter is that as long as I use cuda related functions, I will report an error:
(-217:Gpu API call) CUDA driver version is insufficient for CUDA runtime version

I want to know, how can I query my driver version? I searched all the articles but couldn’t find out how to query the version on Jetson…

And how do I make my program work properly.


Please try to export the following environment variable:

$ export LD_LIBRARY_PATH=/usr/local/cuda-12.1/compat

Compat folder is used for running a newer CUDA toolkit on the older environment.
The details can be found in the below document:


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.