Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in ms_deformable_im2col_cuda: no kernel image is available for execution on the device #71

Open
Ran0618 opened this issue Nov 25, 2024 · 1 comment

Comments

@Ran0618
Copy link

Ran0618 commented Nov 25, 2024

When using SAM2, I encountered this issue, and after consulting the documentation, I found that I needed to export TORCH_CUDA_ARCH_LIST=9.0 8.0 8.6 8.9 7.0 7.2 7.5 6.0. However, this did not resolve the problem.

I discovered that the GroundingDINO part of the code works successfully, so I tried to identify the issue. I found that the problem lies in the groundingdino/setup.py file:

extra_compile_args["nvcc"] = [
    "-DCUDA_HAS_FP16=1",
    "-D__CUDA_NO_HALF_OPERATORS__",
    "-D__CUDA_NO_HALF_CONVERSIONS__",
    "-D__CUDA_NO_HALF2_OPERATORS__",
    "-gencode=arch=compute_70,code=sm_70",
    "-gencode=arch=compute_75,code=sm_75",
    "-gencode=arch=compute_80,code=sm_80",
    "-gencode=arch=compute_86,code=sm_86",
]

In this code, there is no entry for CUDA capability 9.0, so when using a GPU with capability 9.0 and following the official installation procedure, it would throw an error. The solution is to add the line -gencode=arch=compute_90,code=sm_90 to the extra_compile_args["nvcc"] section.

@suhyeok-jang
Copy link

it's really helpful. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants