Required to enable CUDA in Opencv.
reference https://github.com/xianyi/OpenBLAS/wiki/How-to-use-OpenBLAS-in-Microsoft-Visual-Studio
environment ・ Windows 10 ・ Cpu ryzen 3700x ・ Gpu ncvidia-rtx3900
software ・ Anaconda ・ Ninja ・ Cmake ・ Git ・ Opencv-4.5.0 ・ Ant 1.8.2 ・ Open-jdk-15 ・ Cuda 11 ・ Visual studio 2019
cmd.exe
conda config --add channels conda-forge
conda install -y -c isuruf kitware-ninja
conda install -y cmake flang clangdev perl libflang
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
conda config --add channels conda-forge
conda install -y -c isuruf kitware-ninja
conda install -y cmake flang clangdev perl libflang
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
cd C:/tools/openblas
git clone https://github.com/xianyi/OpenBLAS.git
cd OpenBLAS
mkdir build
cd build
@rem According to the environment
set CONDA_PREFIX=C:\Users\admin\anaconda3
set LIB=%CONDA_PREFIX%\Library\lib;%LIB%
set CPATH=%CONDA_PREFIX%\Library\include;%CPATH%
cmake .. -G "Ninja" -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DCMAKE_Fortran_COMPILER=flang -DBUILD_WITHOUT_LAPACK=no -DNOFORTRAN=0 -DDYNAMIC_ARCH=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/tools/opt/openblas ..
cmake --build . --config RELEASE --target intall
capture git clone https://github.com/xianyi/OpenBLAS.git
conda update -n base conda
conda config --add channels conda-forge
conda install -y cmake flang clangdev perl libflang
conda install -y -c isuruf kitware-ninja
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
set CONDA_INSTALL_LOCN=C:\Users\admin\anaconda3 set LIB=%CONDA_INSTALL_LOCN%\Library\lib;%LIB% set CPATH=%CONDA_INSTALL_LOCN%\Library\include;%CPATH%
cmake .. -G "Ninja" -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DCMAKE_Fortran_COMPILER=flang -DBUILD_WITHOUT_LAPACK=no -DNOFORTRAN=0 -DDYNAMIC_ARCH=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/tools/opt/openblas ..
Recommended Posts