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

Add safeguards for CUDA kernel load in Deformable DETR #19037

Merged
merged 1 commit into from
Sep 14, 2022

Conversation

sgugger
Copy link
Collaborator

@sgugger sgugger commented Sep 14, 2022

What does this PR do?

Transformers has become unusable on GPU when doing some imports since:

  • deformable DETR compiles some custom CUDA kernels at init
  • this require ninja which is not in the dependencies

This PR adds some additional checks before compiling the CUDA kernels, and also adds a warning instead of a hard error when that load fails.

Copy link
Collaborator

@ydshieh ydshieh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the rescue + teaching me how to fix this kind of problems!

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Sep 14, 2022

The documentation is not available anymore as the PR was closed or merged.

@sgugger sgugger merged commit 0e24548 into main Sep 14, 2022
@sgugger sgugger deleted the fix_transformers_gpu branch September 14, 2022 17:28
oneraghavan pushed a commit to oneraghavan/transformers that referenced this pull request Sep 26, 2022
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.

3 participants