简体   繁体   中英

Cuda Unsupported gpu architecture Eclipse Nsight

I try to create a new project with Eclipse Nsight but when I build the project I get:

nvcc fatal   : Unsupported gpu architecture 'compute_21'. 
In build setting i use Generate GPU code 2.1. The command build that Eclipse launches is:

Building file: ../src/prova.cu
Invoking: NVCC Compiler
/usr/local/cuda-5.5/bin/nvcc -G -g -O0 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=sm_21 -odir "src" -M -o "src/prova.d" "../src/prova.cu"
/usr/local/cuda-5.5/bin/nvcc --compile -G -O0 -g -gencode arch=compute_20,code=compute_20 -gencode arch=compute_20,code=compute_21 -gencode arch=compute_20,code=sm_20  -x cu -o  "src/prova.o" "../src/prova.cu"

If i change code=compute_21 with code=compute_20 I don't have any errors. How can I change this in Eclipse Nsight?

The arch command specifies a virtual architecture that will be used to generate the intermediate ptx.

The code command specifies the real architecture for which the code will be generated, either real executable code or PTX real-architecture-specific code.

compute_21 doesn't exist as a virtual architecture in both of them. If you want code for the real 21 architecture use arch=compute_20,code=sm_21


So it's a configuration problem; try with the Nsight import wizard for CUDA samples (source: https://devtalk.nvidia.com/default/topic/490324/issue-with-gencode-and-compute_21-results-in-unsupported-gpu-architecture/ ) and see if the problem persists.

I installed the latest CUDA toolkit available for Fedora 19 (cuda_5.5.22_linux_64.run) and experienced the same issue.

I think the problem was that I had changed the default install location. After reinstalling the CUDA toolkit in the default location (/usr/local/cuda-5.5) and deleting the cuda-workspace directory to let Eclipse Nsight recreate it, the problem has gone.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM