查询网址:https://developer.nvidia.com/cuda-gpus
使用,makefile文件实例:
GPU=1 CUDNN=1 OPENCV=1 OPENMP=0 DEBUG=1 ARCH= -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52] # -gencode arch=compute_20,code=[sm_20,sm_21] This one is deprecated? # This is what I use, uncomment if you know your arch and want to specify # ARCH= -gencode arch=compute_52,code=compute_52 ARCH= -gencode arch=compute_75,code=compute_75
本机:RTX 2080 Ti
# Tesla V100 # ARCH= -gencode arch=compute_70,code=[sm_70,compute_70] # GeForce RTX 2080 Ti, RTX 2080, RTX 2070, Quadro RTX 8000, Quadro RTX 6000, Quadro RTX 5000, Tesla T4, XNOR Tensor Cores # ARCH= -gencode arch=compute_75,code=[sm_75,compute_75] # Jetson XAVIER # ARCH= -gencode arch=compute_72,code=[sm_72,compute_72] # GTX 1080, GTX 1070, GTX 1060, GTX 1050, GTX 1030, Titan Xp, Tesla P40, Tesla P4 # ARCH= -gencode arch=compute_61,code=sm_61 -gencode arch=compute_61,code=compute_61 # GP100/Tesla P100 - DGX-1 # ARCH= -gencode arch=compute_60,code=sm_60 # For Jetson TX1, Tegra X1, DRIVE CX, DRIVE PX - uncomment: # ARCH= -gencode arch=compute_53,code=[sm_53,compute_53] # For Jetson Tx2 or Drive-PX2 uncomment: # ARCH= -gencode arch=compute_62,code=[sm_62,compute_62]
GPU版本参考:https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#virtual-architecture-feature-list