I’m new to CUDA toolchain, and this question may be silly, but… Newly created project in Nsight (Eclipse) fail to compile.
What I’m doing:
Create new C++ Project with type “CUDA Runtime Project” and Toolchain “CUDA Toolkit 5.5”
Separate compilation with PTX and GPU codegen 3.0 (where I can read more about this 2 things?).
And thatn just “click on hammer”.
Dosens of erros arrived. 90% of them dissapears after addition of cuda_runtime_api.h. But 3 of them still here.
Here is make output (sorry for russian):
05:26:03 **** Incremental Build of configuration Debug for project Test ****
make all
Building file: ../src/Test.cu
Invoking: NVCC Compiler
/usr/local/cuda-5.5/bin/nvcc -G -g -O0 -gencode arch=compute_30,code=sm_30 -odir "src" -M -o "src/Test.d" "../src/Test.cu"
/usr/local/cuda-5.5/bin/nvcc -G -g -O0 --compile -x c++ -o "src/Test.o" "../src/Test.cu"
../src/Test.cu: В функции «void bitreverse(void*)»:
../src/Test.cu:41:8: ошибка: нет декларации «threadIdx» в этой области видимости
../src/Test.cu: В функции «int main()»:
../src/Test.cu:59:14: ошибка: expected primary-expression before «<» token
../src/Test.cu:59:54: ошибка: expected primary-expression before «>» token
make: *** [src/Test.o] Ошибка 1
05:26:03 Build Finished (took 209ms)
What I’m doing wrong?
PS:
OS: Ubuntu 12.04 LTS
Device: GTX 690