Skip to content
Mobrief
Research

Academic or research source. Check the methodology, sample size, and whether it's been replicated.

Fix test interaction: clean up DTensorSpec pytree registration

register_constant(DTensorSpec) in the export test helper was permanently modifying global pytree state, causing subsequent compiled DTensor tests to fail. With DTensorSpec registered as a pytree...

2-Minute Brief
  • According to PyTorch Releases: register_constant(DTensorSpec) in the export test helper was permanently modifying global pytree state, causing subsequent compiled DTensor tests to fail. With DTensorSpec registered as a pytree constant, dynamo no longer decomposes glu into simpler ops that have sharding strategies, so aten.glu.default gets passed through to DTensor dispatch which can't handle it. Wrap in try/finally to deregister after use. Introduced in PR #163609 Authored with Claude. Pull Request resolved: #176128 Approved
Read Original

Fix test interaction: clean up DTensorSpec pytree registration

TLDR

register_constant(DTensorSpec) in the export test helper was permanently modifying global pytree state, causing subsequent compiled DTensor tests to fail. With DTensorSpec registered as a pytree...

Artifacts
Code
2-Minute Brief
  • According to PyTorch Releases: register_constant(DTensorSpec) in the export test helper was permanently modifying global pytree state, causing subsequent compiled DTensor tests to fail. With DTensorSpec registered as a pytree constant, dynamo no longer decomposes glu into simpler ops that have sharding strategies, so aten.glu.default gets passed through to DTensor dispatch which can't handle it. Wrap in try/finally to deregister after use. Introduced in PR #163609 Authored with Claude. Pull Request resolved: #176128 Approved
Open
O open S save B back M mode