Open sg12056 opened 3 years ago
I think you have to use CUDA 10.2
@yuhe0925 I'll try that, but the documentation says CUDA >= 10.2 should work.
EDIT : CUDA 10.2 is also giving the same error -
-- Running vcpkg install - done
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043.
-- The C compiler identification is MSVC 19.29.30038.1
-- The CXX compiler identification is MSVC 19.29.30038.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The CUDA compiler identification is unknown
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - failed
-- Check for working CUDA compiler: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.2/bin/nvcc.exe
-- Check for working CUDA compiler: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.2/bin/nvcc.exe - broken
CMake Error at C:/Program Files/CMake/share/cmake-3.18/Modules/CMakeTestCUDACompiler.cmake:52 (message):
The CUDA compiler
"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.2/bin/nvcc.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: D:/projects/darknet/build_release/CMakeFiles/CMakeTmp
Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_92adc.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R) Build Engine version 16.10.2+857e5a733 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Compiling CUDA source file main.cu...
D:\projects\darknet\build_release\CMakeFiles\CMakeTmp>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin\nvcc.exe" -gencode=arch=compute_30,code=\"sm_30,compute_30\" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\bin\HostX64\x64" -x cu -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\include" --keep-dir x64\Debug -maxrregcount=0 --machine 64 --compile -cudart none -g -D"CMAKE_INTDIR=\"Debug\"" -D"CMAKE_INTDIR=\"Debug\"" -D_MBCS -Xcompiler "/EHsc /W1 /nologo /O2 /FdcmTC_92adc.dir\Debug\vc142.pdb /FS /Zi /MD " -o cmTC_92adc.dir\Debug\main.obj "D:\projects\darknet\build_release\CMakeFiles\CMakeTmp\main.cu"
main.cu
CUDACOMPILE : nvcc error : 'cudafe++' died with status 0xC0000005 (ACCESS_VIOLATION) [D:\projects\darknet\build_release\CMakeFiles\CMakeTmp\cmTC_92adc.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA 10.2.targets(764,9): error MSB3722: The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin\nvcc.exe" -gencode=arch=compute_30,code=\"sm_30,compute_30\" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\bin\HostX64\x64" -x cu -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\include" --keep-dir x64\Debug -maxrregcount=0 --machine 64 --compile -cudart none -g -D"CMAKE_INTDIR=\"Debug\"" -D"CMAKE_INTDIR=\"Debug\"" -D_MBCS -Xcompiler "/EHsc /W1 /nologo /O2 /FdcmTC_92adc.dir\Debug\vc142.pdb /FS /Zi /MD " -o cmTC_92adc.dir\Debug\main.obj "D:\projects\darknet\build_release\CMakeFiles\CMakeTmp\main.cu"" exited with code 5. Please verify that you have sufficient rights to run this command. [D:\projects\darknet\build_release\CMakeFiles\CMakeTmp\cmTC_92adc.vcxproj]
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:152 (enable_language)
-- Configuring incomplete, errors occurred!
See also "D:/projects/darknet/build_release/CMakeFiles/CMakeOutput.log".
See also "D:/projects/darknet/build_release/CMakeFiles/CMakeError.log".
Config failed! Exited with error code 1.
Press any key to continue...
@yuhe0925 I'll try that, but the documentation says CUDA >= 10.2 should work.
EDIT : CUDA 10.2 is also giving the same error -
Correct, Darknet requires 10.2 or later. It definitely does not require 10.2 exactly.
Hello. Could you solve your problem? I face the same
EDIT 1 : I updated my CUDA to 11.3 as I thought 11.2 could have some issue, it still showed the same error message. Then I added
set(CMAKE_CUDA_COMPILER "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.3/bin/nvcc.exe")
to the CMakeLists.txt file , now the error changed toCUDA_ARCHITECTURES is empty for target "cmTC_062f0".
EDIT - 2 : my issue is same as https://github.com/AlexeyAB/darknet/issues/7795 but the solution is not working for me. Here are my environment variables :
EDIT - 3 : added
set(CMAKE_CUDA_ARCHITECTURES "70")
to CMakeLists.txt to set the architecture, Now the error coming isTried this https://github.com/tensorflow/tensorflow/issues/27706 which is also not working.. Any help would be great, I can't figure out what's wrong here
EDIT - 4 : Updated CUDA to 11.4 , still same error . Here's complete build log