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

DeviceGuard added to use Deformable Attention more safely on multi-GPU #32910

Merged
merged 9 commits into from
Aug 23, 2024

Conversation

DonggeunYu
Copy link
Contributor

@DonggeunYu DonggeunYu commented Aug 21, 2024

What does this PR do?

I got zero results from deformable attention when multi-GPU inference.
However, this issue happens only in my environment.

The DeviceGuard has been added to ensure that calculations are performed only on the value device. Thus, my problem has been resolved.

Fixes # (issue)

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

Models:

@DonggeunYu DonggeunYu changed the title Guard added to use Deformable Attention more safely on multi-GPU DeviceGuard added to use Deformable Attention more safely on multi-GPU Aug 21, 2024
Copy link
Collaborator

@amyeroberts amyeroberts left a comment

Choose a reason for hiding this comment

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

Thanks for adding this!

@amyeroberts
Copy link
Collaborator

@DonggeunYu We had an issue with our test runners. Could you push an empty commit to trigger a re-run and make everything green?

@DonggeunYu
Copy link
Contributor Author

@DonggeunYu We had an issue with our test runners. Could you push an empty commit to trigger a re-run and make everything green?

It has been completed!

@amyeroberts amyeroberts merged commit 1dbd9d3 into huggingface:main Aug 23, 2024
7 checks passed
zucchini-nlp pushed a commit to zucchini-nlp/transformers that referenced this pull request Aug 30, 2024
huggingface#32910)

* Update modeling_deformable_detr.py

* Update src/transformers/models/deformable_detr/modeling_deformable_detr.py

Co-authored-by: amyeroberts <[email protected]>

* Update ms_deform_attn_cuda.cu

* Update modeling_deformable_detr.py

* Update modeling_deformable_detr.py

* [empty] this is a empty commit

---------

Co-authored-by: amyeroberts <[email protected]>
zucchini-nlp pushed a commit to zucchini-nlp/transformers that referenced this pull request Aug 30, 2024
huggingface#32910)

* Update modeling_deformable_detr.py

* Update src/transformers/models/deformable_detr/modeling_deformable_detr.py

Co-authored-by: amyeroberts <[email protected]>

* Update ms_deform_attn_cuda.cu

* Update modeling_deformable_detr.py

* Update modeling_deformable_detr.py

* [empty] this is a empty commit

---------

Co-authored-by: amyeroberts <[email protected]>
itazap pushed a commit to NielsRogge/transformers that referenced this pull request Sep 20, 2024
huggingface#32910)

* Update modeling_deformable_detr.py

* Update src/transformers/models/deformable_detr/modeling_deformable_detr.py

Co-authored-by: amyeroberts <[email protected]>

* Update ms_deform_attn_cuda.cu

* Update modeling_deformable_detr.py

* Update modeling_deformable_detr.py

* [empty] this is a empty commit

---------

Co-authored-by: amyeroberts <[email protected]>
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.

MultiScaleDeformableAttentionFunction different results on different devices
2 participants