Skip to content

Conversation

aliafzal
Copy link
Contributor

Summary: This diff introduces additional logging of the complete sharding plan in a human-readable format, making it easily accessible for any review and analysis through the planner db dataset.

Differential Revision: D82945862

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 22, 2025
@facebook-github-bot
Copy link
Contributor

@aliafzal has exported this pull request. If you are a Meta employee, you can view the originating diff in D82945862.

@facebook-github-bot
Copy link
Contributor

@aliafzal has exported this pull request. If you are a Meta employee, you can view the originating diff in D82945862.

aliafzal added a commit to aliafzal/torchrec that referenced this pull request Sep 23, 2025
Summary:

internal
This diff introduces additional logging of the complete sharding plan in a human-readable format, making it easily accessible for any review and analysis through the planner db dataset.

Differential Revision: D82945862
@facebook-github-bot
Copy link
Contributor

@aliafzal has exported this pull request. If you are a Meta employee, you can view the originating diff in D82945862.

Summary:

Integrate PlanLoader functionality within the EmbeddingShardingPlanner to enable loading and reusing pre-computed sharding plans. This integration extends the OSS planner with plan loading capabilities.

This diff includes:
* PlanLoader Integration in EmbeddingShardingPlanner:
   - Added optional `plan_loader` parameter to EmbeddingShardingPlanner constructor
   - Integrated plan validation using context hash comparison to ensure loaded plans are compatible with current planner configuration
   - Fallback to normal planning when plan loader returns null

* Plan Loading Workflow:Check if loaded plan context hash matches current planner context
  * If mismatch detected → raise PlannerError
  * If validation passes → load sharding options from storage
  * Map loaded sharding options to current search space using storage_hash
  * Skip planning phase and use pre-computed plan if available

* Search Space Reconstruction:
   * Mapping of loaded sharding options to enumerated search space
   * Preserving all original ShardingOption metadata while replacing shard assignments

Differential Revision: D81279558
Summary:

internal
This diff introduces additional logging of the complete sharding plan in a human-readable format, making it easily accessible for any review and analysis through the planner db dataset.

Differential Revision: D82945862
@facebook-github-bot
Copy link
Contributor

@aliafzal has exported this pull request. If you are a Meta employee, you can view the originating diff in D82945862.

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 Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants