Skip to content

move img_mask@get_attn_mask() to hpu#795

Merged
regisss merged 2 commits into
mainfrom
swin_attn_mask
Mar 14, 2024
Merged

move img_mask@get_attn_mask() to hpu#795
regisss merged 2 commits into
mainfrom
swin_attn_mask

Conversation

@hsubramony
Copy link
Copy Markdown
Collaborator

In certain 1x systems , we notice a drop in performance for swin models as get_attn_mask gets executed in cpu instead of hpu. This was seen after pytorch upgrade to 2.2
This fix allows img_mask in get_attn_mask() to be moved back hpu.

@hsubramony hsubramony requested a review from regisss as a code owner March 13, 2024 19:25
@hsubramony hsubramony requested review from libinta and ssarkar2 March 13, 2024 19:26
@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@libinta libinta added run-test Run CI for PRs from external contributors synapse 1.15 labels Mar 13, 2024
@regisss regisss added run-test Run CI for PRs from external contributors and removed run-test Run CI for PRs from external contributors labels Mar 14, 2024
Copy link
Copy Markdown
Collaborator

@regisss regisss left a comment

Choose a reason for hiding this comment

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

LGTM!

@regisss regisss merged commit d772ad6 into main Mar 14, 2024
@regisss regisss deleted the swin_attn_mask branch March 14, 2024 09:03
gplutop7 pushed a commit to HabanaAI/optimum-habana-fork that referenced this pull request Nov 6, 2025
…face#795)

Co-authored-by: Adam Stachowicz <105052242+astachowiczhabana@users.noreply.github.com>
Co-authored-by: Adam Stachowicz <astachow@habana.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-test Run CI for PRs from external contributors synapse 1.15

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants