Skip to content

[varlen_attn for inference] remove unnecessary tensor creation#176723

Closed
liangel-02 wants to merge 7 commits intogh/liangel-02/18/basefrom
gh/liangel-02/18/head
Closed

[varlen_attn for inference] remove unnecessary tensor creation#176723
liangel-02 wants to merge 7 commits intogh/liangel-02/18/basefrom
gh/liangel-02/18/head

Conversation

@liangel-02
Copy link
Contributor

@liangel-02 liangel-02 commented Mar 6, 2026

@pytorch-bot
Copy link

pytorch-bot bot commented Mar 6, 2026

🔗 Helpful Links

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

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

✅ You can merge normally! (2 Unrelated Failures)

As of commit c9ed5a1 with merge base 4bc9d7f (image):

FLAKY - The following job failed but was likely due to flakiness present on trunk:

BROKEN TRUNK - The following job failed but was present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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

@pytorch-bot
Copy link

pytorch-bot bot commented Mar 6, 2026

This PR needs a release notes: label

If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

liangel-02 added a commit that referenced this pull request Mar 6, 2026
@liangel-02 liangel-02 requested a review from drisspg March 6, 2026 16:39
@liangel-02 liangel-02 added release notes: nn release notes category ciflow/trunk Trigger trunk jobs on your pull request labels Mar 6, 2026
alibi_slopes: torch.Tensor | None = None,
out: torch.Tensor | None = None,
block_table: torch.Tensor | None = None,
compute_auxiliary: bool = True,
Copy link
Collaborator

Choose a reason for hiding this comment

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

This smells like Boolean trap... do we need to add this for every other sdpa derivative?

Copy link
Contributor

Choose a reason for hiding this comment

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

this is private impl so should be fine and it is specific to varlen API. Once we get fa4 wired up we should probably do teh same

@liangel-02
Copy link
Contributor Author

@pytorchbot merge -i

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged while ignoring the following 2 checks: trunk / win-vs2022-cpu-py3 / build, trunk / win-vs2022-cuda12.8-py3 / build

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Collaborator

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
For more information see pytorch-bot wiki.

@liangel-02
Copy link
Contributor Author

@pytorchbot merge -i

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged while ignoring the following 1 checks: trunk / macos-py3-arm64 / test (mps, 1, 1, macos-m2-15)

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

pytorchmergebot added a commit that referenced this pull request Mar 7, 2026
#176723)"

This reverts commit c405acd.

Reverted #176723 on behalf of https://github.com/zou3519 due to sorry I think this broke inductor rocm ([comment](#175897 (comment)))
@pytorchmergebot
Copy link
Collaborator

@liangel-02 your PR has been reverted as part of the stack under #175897.

@pytorchmergebot
Copy link
Collaborator

@liangel-02 your PR has been reverted as part of the stack under #175924.

pytorchmergebot added a commit that referenced this pull request Mar 10, 2026
#176723)"

This reverts commit 26dddb9.

Reverted #176723 on behalf of https://github.com/huydhn due to Sorry for reverting your change but a bunch of internal builds need to be updated to unblock this change D95758397 ([comment](#175924 (comment)))
liangel-02 added a commit that referenced this pull request Mar 10, 2026
liangel-02 added a commit that referenced this pull request Mar 10, 2026
liangel-02 added a commit that referenced this pull request Mar 10, 2026
@liangel-02
Copy link
Contributor Author

@liangel-02 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

liangel-02 added a commit that referenced this pull request Mar 11, 2026
Pull Request resolved: #176723




@imported-using-ghimport

Differential Revision: [D95996397](https://our.internmc.facebook.com/intern/diff/D95996397/)
ghstack-source-id: 350342133
liangel-02 added a commit that referenced this pull request Mar 11, 2026
@liangel-02
Copy link
Contributor Author

@pytorchbot merge -f "ignoring meta internal-only changes check" cc @huydhn

@pytorch-bot
Copy link

pytorch-bot bot commented Mar 11, 2026

❌ 🤖 pytorchbot command failed:

@pytorchbot: error: unrecognized arguments: cc @huydhn

usage: @pytorchbot [-h]
                   
                   {merge,revert,rebase,label,drci,lint,fix-lint,apply-lint,cherry-pick}
                   ...

Try @pytorchbot --help for more info.

@liangel-02
Copy link
Contributor Author

@pytorchbot merge -f "ignoring meta internal-only changes check"

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: This PR has internal changes and must be landed via Phabricator! Please try reimporting/rexporting the PR!

Details for Dev Infra team Raised by workflow job

@huydhn
Copy link
Contributor

huydhn commented Mar 11, 2026

@pytorchbot merge -f 'Ignoring meta internal-only changes check'

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-no-td Do not run TD on this PR ciflow/trunk Trigger trunk jobs on your pull request fb-exported Merged meta-exported release notes: nn release notes category Reverted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants