[flex_attention] replace sliced BlockMask noop with helpful error#164702
[flex_attention] replace sliced BlockMask noop with helpful error#164702Aminsed wants to merge 5 commits intopytorch:mainfrom
Conversation
Fixes part of pytorch#163314 After slicing BlockMask, mask_mod was silently replaced with noop_mask. Replace with error that guides users to use base_mask.mask_mod instead.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/164702
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 1 Cancelled JobAs of commit 49466dc with merge base 321e602 ( CANCELLED JOB - The following job was cancelled. Please retry:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@pytorchbot label "release notes: nn" |
drisspg
left a comment
There was a problem hiding this comment.
Looks great thanks, need to lint
…x PYFMT blank line
|
@drisspg @BoyuanFeng Could you please merge as I'm not authorized. |
|
@pytorchbot merge |
|
Thanks for the pr! |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
|
The merge job was canceled or timed out. This most often happen if two merge requests were issued for the same PR, or if merge job was waiting for more than 6 hours for tests to finish. In later case, please do not hesitate to reissue the merge command |
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 1 jobs have failed, first few of them are: trunk / macos-py3-arm64 / build Details for Dev Infra teamRaised by workflow job |
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 1 jobs have failed, first few of them are: trunk / macos-py3-arm64 / build Details for Dev Infra teamRaised by workflow job |
|
@pytorchbot merge -f "skip unrelated failure" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
…torch#164702) Fixes part of pytorch#163314 After slicing BlockMask with `[]`, mask_mod was silently replaced with noop_mask. This caused silent incorrect results when users applied transformations to `sliced_mask.mask_mod`. Replace noop with `_sliced_mask_mod_error` that raises RuntimeError with guidance to use `base_mask.mask_mod` instead. Pull Request resolved: pytorch#164702 Approved by: https://github.com/drisspg, https://github.com/BoyuanFeng
…torch#164702) Fixes part of pytorch#163314 After slicing BlockMask with `[]`, mask_mod was silently replaced with noop_mask. This caused silent incorrect results when users applied transformations to `sliced_mask.mask_mod`. Replace noop with `_sliced_mask_mod_error` that raises RuntimeError with guidance to use `base_mask.mask_mod` instead. Pull Request resolved: pytorch#164702 Approved by: https://github.com/drisspg, https://github.com/BoyuanFeng
…torch#164702) Fixes part of pytorch#163314 After slicing BlockMask with `[]`, mask_mod was silently replaced with noop_mask. This caused silent incorrect results when users applied transformations to `sliced_mask.mask_mod`. Replace noop with `_sliced_mask_mod_error` that raises RuntimeError with guidance to use `base_mask.mask_mod` instead. Pull Request resolved: pytorch#164702 Approved by: https://github.com/drisspg, https://github.com/BoyuanFeng
Fixes part of #163314
After slicing BlockMask with
[], mask_mod was silently replaced with noop_mask. This caused silent incorrect results when users applied transformations tosliced_mask.mask_mod.Replace noop with
_sliced_mask_mod_errorthat raises RuntimeError with guidance to usebase_mask.mask_modinstead.cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @drisspg @Chillee @yanboliang @BoyuanFeng