Building with CUDA - Unsupported gpu architecture 'compute_21' (Bug #3296)


Added by Evgeny Pakhomov over 11 years ago. Updated over 11 years ago.


Status:Done Start date:2013-10-01
Priority:Normal Due date:
Assignee:Vladislav Vinogradov % Done:

0%

Category:gpu (cuda)
Target version:2.4.7
Affected version:2.4.6 (latest release) Operating System:Windows
Difficulty:Easy HW Platform:x86
Pull request:https://github.com/Itseez/opencv/pull/1556

Description

Trying to build OpenCV 3.0 with CUDA 5.5.

Default values in CMake:
CUDA_ARCH_BIN 1.1 1.2 1.3 2.0 2.1(2.0) 3.0 3.5
CUDA_ARCH_PTX 3.0

Line from generated OpenCVConfig.cmake:
set(OpenCV_COMPUTE_CAPABILITIES -gencode;arch=compute_21,code=sm_21)

Trying to build opencv_core gives:
nvcc : fatal error : Unsupported gpu architecture 'compute_21'

Apparently the "-gencode" should be with "compute_20" instead of "compute_21".


History

Updated by Evgeny Pakhomov over 11 years ago

Found the cause.
If CUDA_GENERATION == "Auto" CMake detects compute capability by calling nvcc.exe with opencv/cmake/checks/OpenCVDetectCudaArch.cu
It correctly returns "2.1" (for my platform) even though the nvcc.exe itself doesn't support "compute_21", so the issue apprently is in nvcc.

Another small issue:
CMake calls
nvcc.exe opencv/cmake/checks/OpenCVDetectCudaArch.cu --run
and gets
Creating library a.lib and object a.exp
2.1

instead of the expected
2.1

Updated by Vladislav Vinogradov over 11 years ago

  • Target version changed from 3.0 to 2.4.7
  • Assignee changed from Anatoly Baksheev to Vladislav Vinogradov
  • Pull request set to https://github.com/Itseez/opencv/pull/1556
  • Affected version changed from branch 'master' (2.9) to 2.4.6 (latest release)
  • Status changed from New to Open

Updated by Kirill Kornyakov over 11 years ago

The fix going to be merged soon. Please reopen the ticket if it doesn't help.

  • Status changed from Open to Done

Also available in: Atom PDF