jytime / Mask_RCNN_Pytorch

Mask R-CNN for object detection and instance segmentation on Pytorch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nvcc fatal : value 'arch' is not defined for option 'gpu-architecture'

MyoungHaSong opened this issue · comments

my cuda version = 9.0 V 9.0.176

I run this code

nvcc -c -o nms_kernel.cu.o nms_kernel.cu -x cu -Xcompiler -fPIC -arch=arch

but I got this error

nvcc fatal : value 'arch' is not defined for option 'gpu-architecture'

what should I do?

arch should be set depending on your GPU model, e.g., -arch=sm_52;
you can check Compilation section for more detail

Which [arch] shall i use for NVIDIA RTX3090 during:
nvcc -c -o nms_kernel.cu.o nms_kernel.cu -x cu -Xcompiler -fPIC -arch=[arch]
if i type nvcc --list-gpu-code command in linux terminal, it returns:

sm_35
sm_37
sm_50
sm_52
sm_53
sm_60
sm_61
sm_62
sm_70
sm_72
sm_75
sm_80
sm_86

cuda is 11.2

so how tosolve this issue? i meet the same issue at the time.