KEMBAR78
[dtensor] Add propagate_tensor_meta function that skips cache if _are_we_tracing by azahed98 · Pull Request #161334 · pytorch/pytorch · GitHub
Skip to content

Conversation

@azahed98
Copy link
Contributor

@azahed98 azahed98 commented Aug 23, 2025

Fixes an issue where the log softmax handler checked the tensor metadata cache without checking for tracing or symints.

Probably best to merge this after #160798, but not strictly blocking.

cc @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @pragupta

@azahed98 azahed98 requested review from bdhirsh and xmfan August 23, 2025 01:18
@azahed98 azahed98 added the release notes: distributed (dtensor) release notes category label Aug 23, 2025
@pytorch-bot
Copy link

pytorch-bot bot commented Aug 23, 2025

🔗 Helpful Links

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

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

✅ You can merge normally! (10 Unrelated Failures)

As of commit c94282a with merge base 2f0de0f (image):

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

BROKEN TRUNK - The following jobs failed but were 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 pytorch-bot bot added ciflow/inductor oncall: distributed Add this issue/PR to distributed oncall triage queue labels Aug 23, 2025
Copy link
Member

@xmfan xmfan left a comment

Choose a reason for hiding this comment

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

Add a comment to not use _propagate_tensor_meta directly

@azahed98 azahed98 force-pushed the fix/log_softmax_cache branch from 86cdb4b to 92c690e Compare August 25, 2025 22:49
@azahed98
Copy link
Contributor Author

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Aug 26, 2025
@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

"""
return self._propagate_tensor_meta_non_cached(op_schema)

def propagate_tensor_meta(
Copy link
Contributor

Choose a reason for hiding this comment

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

hmm @XilunWu is it an intentional decision in DTensor to have the existing _propagate_tensor_meta methods be private? @azahed98 if so we should probably keep things that way (maybe just rename _propagate_tensor_meta to _propagate_tensor_meta_cached)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

PR to rename: #161744

pytorchmergebot pushed a commit that referenced this pull request Sep 3, 2025
Rename the wrapper `propagate_tensor_meta` added in #161334 to make it clearly private, and rename the existing LRU function to accommodate.

Pull Request resolved: #161744
Approved by: https://github.com/bdhirsh
markc-614 pushed a commit to markc-614/pytorch that referenced this pull request Sep 17, 2025
…_we_tracing (pytorch#161334)

Fixes an issue where the log softmax handler checked the tensor metadata cache without checking for tracing or symints.

Probably best to merge this after pytorch#160798, but not strictly blocking.

Pull Request resolved: pytorch#161334
Approved by: https://github.com/xmfan
markc-614 pushed a commit to markc-614/pytorch that referenced this pull request Sep 17, 2025
Rename the wrapper `propagate_tensor_meta` added in pytorch#161334 to make it clearly private, and rename the existing LRU function to accommodate.

Pull Request resolved: pytorch#161744
Approved by: https://github.com/bdhirsh
mansiag05 pushed a commit to mansiag05/pytorch that referenced this pull request Sep 22, 2025
Rename the wrapper `propagate_tensor_meta` added in pytorch#161334 to make it clearly private, and rename the existing LRU function to accommodate.

Pull Request resolved: pytorch#161744
Approved by: https://github.com/bdhirsh
dsashidh pushed a commit to dsashidh/pytorch that referenced this pull request Sep 26, 2025
Rename the wrapper `propagate_tensor_meta` added in pytorch#161334 to make it clearly private, and rename the existing LRU function to accommodate.

Pull Request resolved: pytorch#161744
Approved by: https://github.com/bdhirsh
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 oncall: distributed Add this issue/PR to distributed oncall triage queue release notes: distributed (dtensor) release notes category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants