MzeroMiko / VMamba

VMamba: Visual State Space Models,code is based on mamba
MIT License
1.82k stars 98 forks source link

selective_scan_cuda with CUDA ERROR #223

Open XXN-1N opened 3 weeks ago

XXN-1N commented 3 weeks ago

I have successfully built the selective_scan_cuda function. However, when I call the function, I encounter the following error. Based on the information I found online, it appears that my GPU is too old to meet the minimum CUDA requirements.

GPU: NVIDIA GeForce GTX 1080 Ti PyTorch: 1.10.0 CUDA Toolkit: 11.3 CUDA version: 11.5 Does anybody know how to solve this problem?

RuntimeError: CUDA error: no kernel image is available for execution on the device CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1.

Elaineok commented 3 weeks ago

我也遇到同样的问题,这个问题无解,1080卡无论做什么处理都解决不了这个问题,更不是什么cuda和pytorch版本不对应。我换到了2080的显卡上,pytorch 1.11.0,cuda11.3,python3.8没任何问题。2080上也尝试了pytorch2.0.0,cuda11.8可以;pytorch2.1.0,cuda12.1可以。总结出:cuda最低版本11.3,pytorch最低版本1.11.0

Rainlolthx commented 2 weeks ago

for GTX1080Ti,when you install selective_scan. You can try the following settings set cc_flag.extend(["-gencode", "arch=compute_61,code=sm_61"]) in kernels/selective_scan/setup.py, line 64.

if selective_scan has been installed, you need remove it and reinstall it. pip uninstall selective_scan pip cache purge cd kernels/selective_scan pip intsall .