Compiling opencv for nvidia jetson agx orin developer kit

Ubuntu 20.04

Hello, what values do we need for:

CUDA_ARCH_BIN
and/or
CUDA_ARCH_PTX

or if you could confirm:

CUDA_ARCH_BIN=8.7
CUDA_ARCH_PTX=“”

cmake -D CMAKE_BUILD_TYPE=RELEASE \ -D CMAKE_INSTALL_PREFIX=/usr \ -D OPENCV_EXTRA_MODULES_PATH=~/kit/opencv_contrib/modules \ -D EIGEN_INCLUDE_PATH=/usr/include/eigen3 \ -D WITH_OPENCL=OFF \ -D WITH_CUDA=ON \ -D CUDA_ARCH_BIN=8.7 \ -D CUDA_ARCH_PTX="" \ -D WITH_CUDNN=ON \ -D WITH_CUBLAS=ON \ -D ENABLE_FAST_MATH=ON \ -D CUDA_FAST_MATH=ON \ -D OPENCV_DNN_CUDA=ON \ -D ENABLE_NEON=ON \ -D WITH_QT=OFF \ -D WITH_OPENMP=ON \ -D BUILD_TIFF=ON \ -D WITH_FFMPEG=ON \ -D WITH_GSTREAMER=ON \ -D WITH_TBB=ON \ -D BUILD_TBB=ON \ -D BUILD_TESTS=OFF \ -D WITH_EIGEN=ON \ -D WITH_V4L=ON \ -D WITH_LIBV4L=ON \ -D OPENCV_ENABLE_NONFREE=ON \ -D INSTALL_C_EXAMPLES=OFF \ -D INSTALL_PYTHON_EXAMPLES=OFF \ -D PYTHON3_PACKAGES_PATH=/usr/lib/python3/dist-packages \ -D OPENCV_GENERATE_PKGCONFIG=ON \ -D BUILD_EXAMPLES=OFF ..

nvcc -V returns

nvcc -V 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
type or paste code here

Sorry for the late response, have you managed to get issue resolved or still need the support? Thanks

Hi,

Yes, please set -DCUDA_ARCH_BIN="8.7" -DCUDA_ARCH_PTX="" for Orin.

We also have a script to build OpenCV from the source on JetPack 5 for your reference:

Thanks.

setting
-D CUDA_ARCH_BIN=8.7
-D CUDA_ARCH_PTX=“” \

worked!

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