Skip to content

Use TORCH_SYM_CHECK in nll_loss_nd_symint for symbolic size comparison to avoid DDE #175956

Closed
laithsakka wants to merge 11 commits intogh/laithsakka/412/basefrom
gh/laithsakka/412/head
Closed

Use TORCH_SYM_CHECK in nll_loss_nd_symint for symbolic size comparison to avoid DDE #175956
laithsakka wants to merge 11 commits intogh/laithsakka/412/basefrom
gh/laithsakka/412/head

Conversation

@laithsakka
Copy link
Contributor

@laithsakka laithsakka commented Feb 27, 2026

Stack from ghstack (oldest at bottom):

encountered while running
python benchmarks/dynamo/huggingface.py --only AllenaiLongformerBase --backend inductor --performance --inference --unbacked-batch-only

@pytorch-bot
Copy link

pytorch-bot bot commented Feb 27, 2026

🔗 Helpful Links

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

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 c1ab3be with merge base 07efc60 (image):

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

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

UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:

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

@pytorch-bot
Copy link

pytorch-bot bot commented Feb 27, 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.

laithsakka added a commit that referenced this pull request Feb 27, 2026
@laithsakka laithsakka changed the title Use TORCH_SYM_CHECK in nll_loss_nd_symint for symbolic size comparison Use TORCH_SYM_CHECK in nll_loss_nd_symint for symbolic size comparison to avoid DDE Feb 27, 2026
raise AssertionError(
f"size mismatch (got input: {self.shape}, target: {target.shape})"
)
torch._check(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Double check, we might have Python bindings to torch._check_sym or something? Even if it's not documented well? Or at least torch._check_assert

Copy link
Contributor Author

Choose a reason for hiding this comment

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

torch._check shall behave like TORCH_SYM_CHECK
the issue was sym_or does not short circuit addressed, so i get access out of bounds.
addressed

@laithsakka laithsakka marked this pull request as draft February 27, 2026 19:29
…ze comparison to avoid DDE "


encountered while running
python benchmarks/dynamo/huggingface.py --only AllenaiLongformerBase --backend inductor --performance --inference --unbacked-batch-only


[ghstack-poisoned]
laithsakka added a commit that referenced this pull request Feb 27, 2026
@laithsakka laithsakka marked this pull request as ready for review February 27, 2026 20:25
@laithsakka laithsakka marked this pull request as draft February 27, 2026 23:24
…ze comparison to avoid DDE "


encountered while running
python benchmarks/dynamo/huggingface.py --only AllenaiLongformerBase --backend inductor --performance --inference --unbacked-batch-only


[ghstack-poisoned]
laithsakka added a commit that referenced this pull request Feb 28, 2026
…ze comparison to avoid DDE "


encountered while running
python benchmarks/dynamo/huggingface.py --only AllenaiLongformerBase --backend inductor --performance --inference --unbacked-batch-only


[ghstack-poisoned]
laithsakka added a commit that referenced this pull request Feb 28, 2026
…ze comparison to avoid DDE "


encountered while running
python benchmarks/dynamo/huggingface.py --only AllenaiLongformerBase --backend inductor --performance --inference --unbacked-batch-only


[ghstack-poisoned]
laithsakka added a commit that referenced this pull request Feb 28, 2026
@laithsakka laithsakka marked this pull request as ready for review February 28, 2026 22:20
laithsakka added a commit that referenced this pull request Mar 2, 2026
…ze comparison to avoid DDE "


encountered while running
python benchmarks/dynamo/huggingface.py --only AllenaiLongformerBase --backend inductor --performance --inference --unbacked-batch-only


[ghstack-poisoned]
laithsakka added a commit that referenced this pull request Mar 2, 2026
…ze comparison to avoid DDE "


encountered while running
python benchmarks/dynamo/huggingface.py --only AllenaiLongformerBase --backend inductor --performance --inference --unbacked-batch-only


[ghstack-poisoned]
Copy link
Contributor

@jansel jansel left a comment

Choose a reason for hiding this comment

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

Failing tests?

@laithsakka
Copy link
Contributor Author

Failing tests?

i messed up the rebase it was clean

…ze comparison to avoid DDE "


encountered while running
python benchmarks/dynamo/huggingface.py --only AllenaiLongformerBase --backend inductor --performance --inference --unbacked-batch-only


[ghstack-poisoned]
laithsakka added a commit that referenced this pull request Mar 3, 2026
…ze comparison to avoid DDE "


encountered while running
python benchmarks/dynamo/huggingface.py --only AllenaiLongformerBase --backend inductor --performance --inference --unbacked-batch-only


[ghstack-poisoned]
…ze comparison to avoid DDE "


encountered while running
python benchmarks/dynamo/huggingface.py --only AllenaiLongformerBase --backend inductor --performance --inference --unbacked-batch-only


[ghstack-poisoned]
@laithsakka
Copy link
Contributor Author

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Mar 5, 2026
@pytorchmergebot
Copy link
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

pytorchmergebot pushed a commit that referenced this pull request Mar 10, 2026
Adds min and max parameters to mark_unbacked() to allow specifying
value range constraints for unbacked dimensions.

When an unbacked symbol is created with min/max bounds, torch._check()
calls are emitted to establish the constraints (e.g., torch._check(u0 >= 1)).

Pull Request resolved: #176313
Approved by: https://github.com/Lucaskabela, https://github.com/mlazos
ghstack dependencies: #175946, #175956
sandy-gags pushed a commit to sandy-gags/pytorch that referenced this pull request Mar 12, 2026
sandy-gags pushed a commit to sandy-gags/pytorch that referenced this pull request Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/inductor ciflow/trunk Trigger trunk jobs on your pull request Merged topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants