gpu/cuda compilation backwards compatibility. (Bug #2147)


Added by Heikki Berg over 12 years ago. Updated over 12 years ago.


Status:Done Start date:2012-07-06
Priority:Normal Due date:
Assignee:Marina Kolpakova % Done:

0%

Category:gpu (cuda)
Target version:2.4.3
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

I tested compilation of trunk r8969 with WITH_CUDA=ON, resulting compilation failure of lbp.cu due to atomicAdd operation. It seems used atomicAdd requires cuda compute capability of 1.2 and on tested architecture I have 1.1:

$cmake -D WITH_TBB=ON -D TBB_INCLUDE_DIR=/opt/Intel/tbb/latest/include -D WITH_FFMPEG=ON -D WITH_CUDA=ON -D CMAKE_INSTALL_PREFIX=/opt/OpenCV/OpenCV-trunk ..
$make

"
$ [ 75%] Building NVCC (Device) object modules/gpu/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_lbp.cu.o
-bash: syntax error near unexpected token `('
$ ptxas /tmp/tmpxft_000114a5_00000000-5_lbp.compute_11.ptx, line 514; warning : Double is not supported. Demoting to float
-bash: ptxas: command not found
-bash: warning: command not found
$ ptxas /tmp/tmpxft_000114a5_00000000-5_lbp.compute_11.ptx, line 564; error : Instruction '{atom,red}.shared' requires .target sm_12 or higher
-bash: ptxas: command not found
-bash: error: command not found
$ ptxas /tmp/tmpxft_000114a5_00000000-5_lbp.compute_11.ptx, line 577; error : Instruction '{atom,red}.shared' requires .target sm_12 or higher
-bash: ptxas: command not found
-bash: error: command not found
$ ptxas /tmp/tmpxft_000114a5_00000000-5_lbp.compute_11.ptx, line 622; error : Instruction '{atom,red}.shared' requires .target sm_12 or higher
-bash: ptxas: command not found
-bash: error: command not found
$ ptxas /tmp/tmpxft_000114a5_00000000-5_lbp.compute_11.ptx, line 624; error : Instruction '{atom,red}.shared' requires .target sm_12 or higher
-bash: ptxas: command not found
-bash: error: command not found
$ ptxas /tmp/tmpxft_000114a5_00000000-5_lbp.compute_11.ptx, line 626; error : Instruction '{atom,red}.shared' requires .target sm_12 or higher
-bash: ptxas: command not found
-bash: error: command not found
$ ptxas /tmp/tmpxft_000114a5_00000000-5_lbp.compute_11.ptx, line 628; error : Instruction '{atom,red}.shared' requires .target sm_12 or higher
-bash: ptxas: command not found
-bash: error: command not found
$ ptxas /tmp/tmpxft_000114a5_00000000-5_lbp.compute_11.ptx, line 638; error : Instruction '{atom,red}.shared' requires .target sm_12 or higher
-bash: ptxas: command not found
-bash: error: command not found
$ ptxas fatal : Ptx assembly aborted due to errors
-bash: ptxas: command not found
$ CMake Error at cuda_compile_generated_lbp.cu.o.cmake:256 (message):
-bash: syntax error near unexpected token `('
$ Error generating file
-bash: Error: command not found
"

In order to maintain backwards compatibility suggest perhaps of using
#define USE_SMEM_ATOMICS (CUDA_ARCH >= 120)
#if (!USE_SMEM_ATOMICS)
#else
#endif

Compute capability report from working 2.4 branch the same on MacBookPro5,2, OSX 10.7.4
OS: Apple 64
CUDA Driver version: 4020
CUDA Runtime version: 4020
CUDA device count: 2

Device 0:
Name: GeForce 9600M GT
Compute capability version: 1.1
Total memory: 511 Mb
Free memory: 164 Mb
This device is compatible with current GPU module build

Device 1:
Name: GeForce 9400M
Compute capability version: 1.1
Total memory: 253 Mb
Free memory: 209 Mb
This device is compatible with current GPU module build

GPU module was compiled for the following GPU archs:
BIN: 11 12 13 20 21 30
PTX: 20


Associated revisions

Revision fdb1019b
Added by Andrey Pavlenko about 11 years ago

Merge pull request #2147 from ilya-lavrenov:tapi_sqrt

History

Updated by Marina Kolpakova over 12 years ago

Fixed in r8974. Thanks for reporting!

  • Status changed from Open to Done

Also available in: Atom PDF