Skip to content

Conversation

@pianpwk
Copy link

@pianpwk pianpwk commented Jan 26, 2026

DEPENDENCY: Requires pytorch/pytorch branch cost-model-consolidation which adds all_to_all_cost and include_compute_cost to torch.distributed.tensor._collective_utils.

Changes:

  • Remove local all_to_all_cost function (now imported from PyTorch)
  • Remove copy-pasted redistribute_cost function
  • Use PyTorch's redistribute_cost with include_compute_cost=True
  • Deprecate order parameter (PyTorch now uses _gen_transform_infos for optimal ordering)
  • Add comprehensive tests for cost model functions

This consolidation:

  • Reduces code duplication between PyTorch and Autoparallel
  • Ensures cost models stay in sync across projects
  • Removes the 5x hack in all_to_all_cost (calibration moved to PyTorch)

Authored with Claude.

DEPENDENCY: Requires pytorch/pytorch branch `cost-model-consolidation`
which adds `all_to_all_cost` and `include_compute_cost` to
`torch.distributed.tensor._collective_utils`.

Changes:
- Remove local `all_to_all_cost` function (now imported from PyTorch)
- Remove copy-pasted `redistribute_cost` function
- Use PyTorch's `redistribute_cost` with `include_compute_cost=True`
- Deprecate `order` parameter (PyTorch now uses _gen_transform_infos
  for optimal ordering)
- Add comprehensive tests for cost model functions

This consolidation:
- Reduces code duplication between PyTorch and Autoparallel
- Ensures cost models stay in sync across projects
- Removes the 5x hack in all_to_all_cost (calibration moved to PyTorch)

Authored with Claude.
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jan 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant