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

Replace libcudart.so with PyTorch's CUDA APIs #375

Merged

Conversation

rapsealk
Copy link
Contributor

@rapsealk rapsealk commented May 9, 2023

This PR resolves #264
I opened this PR as #346 has been closed accidently.

@atkinson
Copy link

Pretty please, can this be merged and released?

@rapsealk
Copy link
Contributor Author

@atkinson Glad to hear that it was helpful to you. I don't have sufficient authority to merge it by myself, so let's wait for @TimDettmers' feedback.

@Titus-von-Koeller
Copy link
Collaborator

@rapsealk Thanks for your input, this is very much appreciated! I looked into this, talked it through with Tim and will work on integrating this later this week. Basically, we will take your solution and combine it with some other tweaks that we have in mind to improve this module.

Will let you know once we have news.

@rapsealk
Copy link
Contributor Author

rapsealk commented Jul 2, 2023

@Titus-von-Koeller Thanks for the news! It would be a pleasure to help if needed.

@TimDettmers
Copy link
Collaborator

Thank you for the PR. This will resolve a couple of problems where the libcuda.so cannot be found. There are other issue the PR might create. Sometimes a user needs to use a different CUDA version for pytorch and bitsandbytes, but this is currently rare.

I am unsure how this fix behaves if another library version loads a different CUDA version before PyTorch loads its CUDA version. Since PyTorch is packaged with CUDA its not a problem for them, but it might create problems for bitsandbytes.

I will merge and try to write some test to check behavior with multiple CUDA versions installed. Otherwise, we can just hope it works for others with weird environments.

Thanks again for your contribution!

@TimDettmers TimDettmers merged commit e8df8d6 into bitsandbytes-foundation:main Jul 14, 2023
@rapsealk rapsealk deleted the fix/libcuda-to-torch branch January 1, 2024 23:35
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

Successfully merging this pull request may close these issues.

bug: OS call failed or operation not supported on NGC PyTorch
4 participants