From f1d1fd0fd1c4a2293e6d41539ab4ac30a7c8ae1d Mon Sep 17 00:00:00 2001 From: Samuel Audet Date: Fri, 10 Nov 2023 23:20:01 +0900 Subject: [PATCH] Update CUDA archs to 5.0;6.0;7.0;8.0;9.0 in builds for OpenCV, ONNX Runtime, PyTorch --- onnxruntime/cppbuild.sh | 2 +- opencv/cppbuild.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/onnxruntime/cppbuild.sh b/onnxruntime/cppbuild.sh index 29a1b117cbe..648f444f7bd 100755 --- a/onnxruntime/cppbuild.sh +++ b/onnxruntime/cppbuild.sh @@ -107,7 +107,7 @@ sedinplace '/omp_get_max_threads/d' onnxruntime/core/providers/dnnl/dnnl_executi sedinplace '/omp_set_num_threads/d' onnxruntime/core/providers/dnnl/dnnl_execution_provider.cc # use PTX instead of compiling for all CUDA archs to reduce library size -sedinplace 's/-gencode=arch=compute_52,code=sm_52/-gencode arch=compute_50,code=sm_50 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_70,code=compute_70/g' cmake/CMakeLists.txt +sedinplace 's/-gencode=arch=compute_52,code=sm_52/-gencode arch=compute_50,code=sm_50 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_90,code=sm_90/g' cmake/CMakeLists.txt sedinplace '/-gencode=arch=compute_..,code=sm_../d' cmake/CMakeLists.txt # provide a default constructor to Ort::Value to make it more usable with std::vector diff --git a/opencv/cppbuild.sh b/opencv/cppbuild.sh index 5b9e45a4914..3ab5714ff05 100755 --- a/opencv/cppbuild.sh +++ b/opencv/cppbuild.sh @@ -133,7 +133,7 @@ BUILD_CONTRIB_X="-DBUILD_opencv_stereo=OFF -DBUILD_opencv_plot=ON -DBUILD_opencv GPU_FLAGS="-DWITH_CUDA=OFF" if [[ "$EXTENSION" == *gpu ]]; then - GPU_FLAGS="-DWITH_CUDA=ON -DWITH_CUDNN=ON -DOPENCV_DNN_CUDA=ON -DCUDA_VERSION=12.3 -DCUDNN_VERSION=8.9 -DCUDA_ARCH_BIN='5.0;6.0;7.0' -DCUDA_ARCH_PTX='7.0' -DCUDA_NVCC_FLAGS=--expt-relaxed-constexpr -DCUDA_nppicom_LIBRARY=" + GPU_FLAGS="-DWITH_CUDA=ON -DWITH_CUDNN=ON -DOPENCV_DNN_CUDA=ON -DCUDA_VERSION=12.3 -DCUDNN_VERSION=8.9 -DCUDA_ARCH_BIN='5.0;6.0;7.0;8.0;9.0' -DCUDA_ARCH_PTX='' -DCUDA_NVCC_FLAGS=--expt-relaxed-constexpr -DCUDA_nppicom_LIBRARY=" fi # exclude openblas dependencies