运行量化模型时报错:RuntimeError: CUDA Error: no kernel image is available for execution on the device
#14
by
saubcy
- opened
在Jetson Orin上运行量化模型的时候有如下报错:
File "/home/chenyong/miniconda3/envs/chatglm/lib/python3.9/site-packages/cpm_kernels/library/cuda.py", line 234, in cuModuleLoadData
checkCUStatus(cuda.cuModuleLoadData(ctypes.byref(module), data))
File "/home/chenyong/miniconda3/envs/chatglm/lib/python3.9/site-packages/cpm_kernels/library/cuda.py", line 217, in checkCUStatus
raise RuntimeError("CUDA Error: %s" % cuGetErrorString(error))
RuntimeError: CUDA Error: no kernel image is available for execution on the device
查看源码发现是加载fatbin文件的时候不支持对应的Compute Capability导致的(Orin为8.7)
其中cpm_kernels部分通过源码添加以下编译参数已经可以正常加载
NVCC=nvcc
OPTIONS=-Iincludes \
-gencode arch=compute_61,code=sm_61 \
-gencode arch=compute_62,code=sm_62 \
-gencode arch=compute_70,code=sm_70 \
-gencode arch=compute_72,code=sm_72 \
-gencode arch=compute_75,code=sm_75 \
-gencode arch=compute_80,code=sm_80 \
-gencode arch=compute_86,code=sm_86 \
-gencode arch=compute_87,code=sm_87 \
-gencode arch=compute_90,code=sm_90
因为quantization.py中的quantization_code是以编译结果文件形式给出,看是否也能帮更新对compute_87的支持,多谢。
This comment has been hidden
修改了cuda.py文件还是不行
同样遇到这个问题,请问怎么解决?
同样遇到这个问题,请问怎么解决?
Waiting Nvidia for releasing new version of jetpack and get a fit for sm_84
请问这个问题咋解决的