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

_C related error #53

Closed
mhyeonsoo opened this issue Apr 11, 2023 · 5 comments
Closed

_C related error #53

mhyeonsoo opened this issue Apr 11, 2023 · 5 comments

Comments

@mhyeonsoo
Copy link

Hi, thanks for the great sources.

I am trying to run the demo on Ubuntu, but facing the issue as

ms_deform_attn.py:31: UserWarning: Failed to load custom C++ ops. Running on CPU mode Only!
NameError: name '_C' is not defined

Guess the same issue has been already raised, but just wanted to tell you that Ubuntu also shows a same case.

Thanks,

@rentainhe
Copy link
Collaborator

rentainhe commented Apr 11, 2023

Sorry for not highlight some key of the installation, we need GPU runtime to compile some custom operator~ So maybe you can set CUDA_HOME and rebuild this repo

Here's an example:

export CUDA_HOME=/path/to/cuda-11.3/

@mhyeonsoo
Copy link
Author

mhyeonsoo commented Apr 11, 2023

Thanks for your quick response @rentainhe ,
but it still show same error after I do

export CUDA_HOME=/path/to/cuda-11.8/

It seems like because of the device.
when I set the device as cpu, it works fine, but when adding device='gpu', it shows the error.

@SlongLiu
Copy link
Collaborator

Maybe you can try to reinstall the libraries.

@DanManN
Copy link

DanManN commented Apr 11, 2023

I had the same error. I recreated the virtual environment I was using and reinstalled the libraries after exporting the CUDA_HOME variable and it fixed it for me.

@mhyeonsoo
Copy link
Author

I reinstalled the libraries in the new docker env. as you guys mentioned, and it works now!
Thanks for your help,

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

4 participants