Skip to content

Conversation

@swolchok
Copy link
Contributor

@swolchok swolchok commented Nov 11, 2025

Stack from ghstack (oldest at bottom):

Looks like the check here is cheap and has a potentially large payoff.

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

[ghstack-poisoned]
swolchok added a commit that referenced this pull request Nov 11, 2025
…kward

Looks like the check here is cheap and has a potentially large payoff.


ghstack-source-id: 605fe5d
Pull-Request: #167588
@pytorch-bot pytorch-bot bot added ciflow/inductor oncall: distributed Add this issue/PR to distributed oncall triage queue labels Nov 11, 2025
@pytorch-bot
Copy link

pytorch-bot bot commented Nov 11, 2025

🔗 Helpful Links

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

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

✅ You can merge normally! (1 Unrelated Failure)

As of commit 035049e with merge base 573a79f (image):

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.

[ghstack-poisoned]
swolchok added a commit that referenced this pull request Nov 12, 2025
…kward

Looks like the check here is cheap and has a potentially large payoff.

ghstack-source-id: 91db704
Pull-Request: #167588
swolchok added a commit that referenced this pull request Nov 13, 2025
…kward

Looks like the check here is cheap and has a potentially large payoff.

ghstack-source-id: 4050b9c
Pull-Request: #167588
Copy link
Contributor

@ezyang ezyang left a comment

Choose a reason for hiding this comment

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

Huh, I'm surprised this actual is an improvement lol

):
# Avoid actual sharing of specs in case they're modified during (e.g.)
# sharding propagation.
grad_spec = copy.copy(dtensor_spec)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is copying really that much faster?
copy in this case I would expect is actually doing a pickle serialization/deserialization of the object to get a new copy.
Is that really faster than creating a clean object below?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is that really faster than creating a clean object below?

Yes. DTensorSpec does some relatively expensive computation in its constructor

@swolchok
Copy link
Contributor Author

@pytorchbot merge

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

jsuarez5341 pushed a commit to PufferAI/pytorch that referenced this pull request Nov 15, 2025
…kward (pytorch#167588)

Looks like the check here is cheap and has a potentially large payoff.

Pull Request resolved: pytorch#167588
Approved by: https://github.com/ezyang
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.

5 participants