nylorac
nylorac

Reputation: 31

How to solve "Code Generation value is not in the expected format '[Arch],[Code]' " error compiling darknet with CUDA

Attempting to compile Darknet with CUDA 10.0, cudnn 7.4, and OpenCV 3.4.0. Using Cmake 3.10.1 to generate project files for VS 2017 Community.

Compiled OpenCV with CUDA 10.0.

Using the AlexeyAB/darknet fork for Windows build of darknet .

Configured Cmake to match Cmake screen shot referenced in the README.md file. Screen shots below:

image screenshot

image screenshot

Configured, generated built files for VS 2017 Community, opened build files.

Compile fails almost immediately with the error:

   Description: Item 'src\activation_kernels.cu'  Code Generation value is not in the expected format '[Arch],[Code]'
   Project: darknet
   File: CUDA 10.0.targets, line 235

I've looked at line 235 of of the file but it doesn't help me understand the error any better. VS doesn't give an error code to with a link to the explanation of the error and I haven't found any much information that's helping me understand the error and troubleshoot.

Hardware is Dell laptop with GTX 1060 GPU (compute model 6.1). Darknet with no GPU builds with no issues.

Any insight into solving this would be very much appreciated

Upvotes: 3

Views: 1128

Answers (1)

User1953
User1953

Reputation: 191

I am not sure if this is the same problem I had. I received the same error message. It turned out that I had entered Device parameters in debug mode, while the compilation was done in release mode. The correct Device parameters under CUDA C/C++ should be:

compute_30,sm_30;compute_35,sm_35;compute_37,sm_37;compute_50,sm_50;compute_52,sm_52;compute_60,sm_60;compute_61,sm_61;compute_70,sm_70;compute_75,sm_75;

Delete what is not for your devices.

The wrong thing I had put in release was:

compute_30,sm_30,compute_35,sm_35

instead of

compute_30,sm_30;compute_35,sm_35;

semicolon is the delimiter, not comma.

Hope this can help you and others.

Upvotes: 3

Related Questions