Hi,
The error may result from the incorrect configuration.
Could you compare the compiler setting between ‘test01’ and oceanFFT sample?
If the error goes on, could you share the error message shown in console for our reference?
Thanks.
yes, i have compare the setting between “test1_cuda_print” and oceanFFT sample. but i did not find difference. really compile result is one fail and one success.
please check the fail console logout…
Building target: test1_cuda_print
Invoking: NVCC Linker
/usr/local/cuda-8.0/bin/nvcc --cudart static --relocatable-device-code=true -gencode arch=compute_35,code=compute_35 -gencode arch=compute_35,code=sm_35 -m64 -ccbin aarch64-linux-gnu-g++ -link -o “test1_cuda_print” ./src/cdpSimplePrint.o -lcudadevrt
nvlink error : Undefined reference to ‘cudaGetParameterBufferV2’ in ‘./src/cdpSimplePrint.o’
nvlink error : Undefined reference to ‘cudaLaunchDeviceV2’ in ‘./src/cdpSimplePrint.o’
makefile:59: recipe for target ‘test1_cuda_print’ failed
make: Leaving directory ‘/home/nvidia/Cuda_test/test1_cuda_print/Debug’
make: *** [test1_cuda_print] Error 255
Shell Completed (exit code = 2)
Hi,
GPU architecture is missing.
Tx2 is sm_62. Please add this information to the nvcc configuration.
Check this page for more information:
https://devblogs.nvidia.com/parallelforall/cuda-jetson-nvidia-nsight-eclipse-edition/
Thanks.
where and how? the link is big page…where is details… i choose aarch64 in configuration.
aarch64 is CPU architecture. In a similar way GPU has its own architecture. It will be different between Kepler, Maxwell, Pascal, and Volta (and perhaps other differences between desktop/Jetson).
hi Aastalll:
i have setting tx2 to sm_62. but the problem is till exist…
-
NVCC Compiler:
Properties → Settings → Tool Settings → NVCC Compiler → Expert Setting:
${COMMAND} ${FLAGS} -gencode arch=compute_62,code=sm_62 ${OUTPUT_FLAG} ${OUTPUT_PREFIX} ${OUTPUT} ${INPUTS}
-
NVCC Linker:
Properties → Settings → Tool Settings → NVCC Linker → Expert Setting:
${COMMAND} ${FLAGS} -gencode arch=compute_62,code=sm_62 ${OUTPUT_FLAG} ${OUTPUT_PREFIX} ${OUTPUT} ${INPUTS}
the console logout shows: nvcc fatal: option- generate code arch=compute_62 ,missing code…
makefile: 59: recipe for target ‘test1_cuda_print’ failed.
Hi,
Could you share the source you want to compile?
We need more information to give a further suggestion.
Thanks.
Hi Aastalll,
i have upload my project source code to cloud . please check the below link for download…
link address,链接: 百度网盘 请输入提取码 (password)密码: y5ey
Hi,
Do you create ‘CUDA C/C++ Project’?
Hi Astall,
yes, i create Cuda C/C++ Project (new Cuda C/C++ project),… actually also choose “import Cuda Samples”
Hi,
Could you follow these steps and try it again?
1. New CUDA C/C++ Project
Project type: Empty Project
Toolchains: CUDA Toolkit 8.0
2. Basic settings
Device linker mode: Whole program compilation
Generate PTX code: 6.0
Generate GPU code: 6.0
3. Target Systems
CPU Architecture: AArch64
4. Right-click project → New File → paste your source
5. Right-click project → Properties → Build → Settings → Tool setting
NVCC Compiler → Expert settings:
+++ ‘-gencode arch=compute_62,code=sm_62’
NVCC Compiler → Includes → Include paths
+++ ‘/usr/local/cuda-8.0/include’
+++ ‘/usr/local/cuda-8.0/samples/common/inc’
NVCC Linker → Expert settings:
+++ ‘-gencode arch=compute_62,code=sm_62’
NVCC Linker → Libraries → Library search path
+++ ‘/usr/local/cuda-8.0/include’
+++ ‘/usr/local/cuda-8.0/samples/common/inc’
Thanks.
Hi AstaLLL,
I try again and each step is flowing your instruction… compile still fail… the below is the logout…
14:06:30 **** Build of configuration Debug for project test2 ****
make all -C /home/nvidia/Cuda_test/test2/Debug
make: Entering directory ‘/home/nvidia/Cuda_test/test2/Debug’
Building file: …/test2.cu
Invoking: NVCC Compiler
/usr/local/cuda-8.0/bin/nvcc -I/usr/local/cuda-8.0/samples/common/inc -I/usr/local/cuda-8.0/include -G -g -O0 -ccbin aarch64-linux-gnu-g++ -gencode arch=compute_60,code=sm_60 -m64 -odir “.” -M -o “test2.d” “…/test2.cu”
/usr/local/cuda-8.0/bin/nvcc -I/usr/local/cuda-8.0/samples/common/inc -I/usr/local/cuda-8.0/include -G -g -O0 --compile --relocatable-device-code=false -gencode arch=compute_60,code=compute_60 -gencode arch=compute_60,code=sm_60 -m64 -ccbin aarch64-linux-gnu-g++ -gencode arch=compute_62,code=sm_62 -x cu -o “test2.o” “…/test2.cu”
…/test2.cu(79): error: kernel launch from device or global functions requires separate compilation mode
1 error detected in the compilation of “/tmp/tmpxft_00001934_00000000-9_test2.compute_62.cpp1.ii”.
subdir.mk:18: recipe for target ‘test2.o’ failed
make: *** [test2.o] Error 2
make: Leaving directory ‘/home/nvidia/Cuda_test/test2/Debug’
Shell Completed (exit code = 2)
14:06:32 Build Finished (took 2s.182ms)
Hi,
Please check your source in detail.
This error is for undefined function rather than Nsight.
Thanks.