Skip to content

Fix static attention mask update - #9101

Merged
facebook-github-bot merged 1 commit into
pytorch:mainfrom
sxu:export-D70914174
Mar 11, 2025
Merged

Fix static attention mask update#9101
facebook-github-bot merged 1 commit into
pytorch:mainfrom
sxu:export-D70914174

Conversation

@sxu

@sxusxu commented Mar 10, 2025

Copy link
Copy Markdown
Contributor

Summary: The range based for loop was making a copy of the mask, and thus the updates did not take effect. Remove the copy and move constructors of StaticKVCache and StaticAttention as they are not needed. Also add the missing deallocate call in mask's destructor.

Differential Revision: D70914174

@pytorch-bot

pytorch-botBot commented Mar 10, 2025

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/9101

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit dd04ea9 with merge base d71f54a (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-botfacebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 10, 2025
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D70914174

@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D70914174

@sxu
sxuforce-pushed the export-D70914174 branch from a23d57d to 534b005CompareMarch 10, 2025 20:21
@sxu
sxu requested a review from billmguoMarch 10, 2025 20:32
sxu added a commit to sxu/executorch that referenced this pull request Mar 10, 2025
Summary:
The range based for loop was making a copy of the mask, and thus the updates did not take effect. Remove the copy and move constructors of StaticKVCache and StaticAttention as they are not needed. Also add the missing deallocate call in mask's destructor.
Differential Revision: D70914174
@sxu
sxuforce-pushed the export-D70914174 branch from 534b005 to 2bdcae4CompareMarch 10, 2025 20:33
sxu added a commit to sxu/executorch that referenced this pull request Mar 10, 2025
Summary:
The range based for loop was making a copy of the mask, and thus the updates did not take effect. Remove the copy and move constructors of StaticKVCache and StaticAttention as they are not needed. Also add the missing deallocate call in mask's destructor.
Differential Revision: D70914174
@sxu
sxuforce-pushed the export-D70914174 branch from 2bdcae4 to 7f564bbCompareMarch 10, 2025 20:34
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D70914174

1 similar comment
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D70914174

sxu added a commit to sxu/executorch that referenced this pull request Mar 10, 2025
Summary:
Pull Request resolved: pytorch#9101
The range based for loop was making a copy of the mask, and thus the updates did not take effect. Remove the copy and move constructors of StaticKVCache and StaticAttention as they are not needed. Also add the missing deallocate call in mask's destructor.
Differential Revision: D70914174
@sxu
sxuforce-pushed the export-D70914174 branch from 7f564bb to c6ade12CompareMarch 10, 2025 20:42
sxu added a commit to sxu/executorch that referenced this pull request Mar 11, 2025
Summary:
The range based for loop was making a copy of the mask, and thus the updates did not take effect. Remove the copy and move constructors of StaticKVCache and StaticAttention as they are not needed. Also add the missing deallocate call in mask's destructor.
Reviewed By: billmguo
Differential Revision: D70914174
@sxu
sxuforce-pushed the export-D70914174 branch from c6ade12 to 44ca9acCompareMarch 11, 2025 16:46
sxu added a commit to sxu/executorch that referenced this pull request Mar 11, 2025
Summary:
The range based for loop was making a copy of the mask, and thus the updates did not take effect. Remove the copy and move constructors of StaticKVCache and StaticAttention as they are not needed. Also add the missing deallocate call in mask's destructor.
Reviewed By: billmguo
Differential Revision: D70914174
@sxu
sxuforce-pushed the export-D70914174 branch from 44ca9ac to be0b470CompareMarch 11, 2025 16:47
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D70914174

Summary:
Pull Request resolved: pytorch#9101
The range based for loop was making a copy of the mask, and thus the updates did not take effect. Remove the copy and move constructors of StaticKVCache and StaticAttention as they are not needed. Also add the missing deallocate call in mask's destructor.
Reviewed By: billmguo
Differential Revision: D70914174
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D70914174

@sxu
sxuforce-pushed the export-D70914174 branch from be0b470 to dd04ea9CompareMarch 11, 2025 16:50
@facebook-github-bot
facebook-github-bot merged commit e763a83 into pytorch:mainMar 11, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.fb-exportedtopic: not user facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@sxu@facebook-github-bot@billmguo