Cuda 如何获得设备的GPU架构?
CudaGetDeviceProperty具有获取计算能力的属性(major.minor),但是,如何将GPU体系结构(sm_**)输入到设备的编译中呢?Cuda 如何获得设备的GPU架构?,cuda,Cuda,CudaGetDeviceProperty具有获取计算能力的属性(major.minor),但是,如何将GPU体系结构(sm_**)输入到设备的编译中呢? sm_10是一种计算能力为1.0的设备 sm_11是一种计算能力为1.1的设备 sm_12是一种计算能力为1.2的设备 sm_13是一种计算能力为1.3的设备 sm_20是一种计算能力为2.0的设备 sm_21是一种计算能力为2.1的设备 sm_30是一种计算能力为3.0的设备 sm_32是一种计算能力为3.2的设备 sm_35是一种计算能力
- sm_10是一种计算能力为1.0的设备
- sm_11是一种计算能力为1.1的设备
- sm_12是一种计算能力为1.2的设备
- sm_13是一种计算能力为1.3的设备
- sm_20是一种计算能力为2.0的设备
- sm_21是一种计算能力为2.1的设备
- sm_30是一种计算能力为3.0的设备
- sm_32是一种计算能力为3.2的设备
- sm_35是一种计算能力为3.5的设备
- sm_37是一种计算能力为3.7的设备
- sm_50是一种计算能力为5.0的设备
- sm_52是一种计算能力为5.2的设备
- sm_53是一种计算能力为5.3的设备
- sm_60是一种计算能力为6.0的设备
- sm_61是一种计算能力为6.1的设备
- sm_62是一种计算能力为6.2的设备
-arch=sm_30 \
-gencode=arch=compute_20,code=sm_20 \
-gencode=arch=compute_30,code=sm_30 \
-gencode=arch=compute_50,code=sm_50 \
-gencode=arch=compute_52,code=sm_52
如果您使用的是cuda 8.x,请设置如下标志:
-arch=sm_30 \
-gencode=arch=compute_20,code=sm_20 \
-gencode=arch=compute_30,code=sm_30 \
-gencode=arch=compute_50,code=sm_50 \
-gencode=arch=compute_52,code=sm_52 \
-gencode=arch=compute_60,code=sm_60 \
-gencode=arch=compute_61,code=sm_61 \
-gencode=arch=compute_62,code=sm_62 \
如果我正确理解了你的问题,那就是主要和次要属性的编码。