Categorize TorchRec / FBGEMM TBE init and sharding as EMBEDDING (#21)#21
Closed
Chenguang-Zhu wants to merge 1 commit into
Closed
Categorize TorchRec / FBGEMM TBE init and sharding as EMBEDDING (#21)#21Chenguang-Zhu wants to merge 1 commit into
Chenguang-Zhu wants to merge 1 commit into
Conversation
|
@Chenguang-Zhu has exported this pull request. If you are a Meta employee, you can view the originating Diff in D103992615. |
…bookresearch#21) Summary: Adds two new rules: 1. **EMBEDDING name rule** — frame name in: `{_init_dmp, _shard_modules_impl, _create_shard_module, shard, apply_2d_emb_sharding, _create_lookups, create_lookup, _create_embedding_kernel, init_parameters, _init_fbgemm_regroup, _apply_split, _apply_cache_state}`. 2. **EMBEDDING filename rule** — filename contains any of: - torchrec/distributed/embedding_lookup.py - torchrec/distributed/embeddingbag.py - torchrec/distributed/batched_embedding_kernel.py - torchrec/distributed/embedding_sharding.py - torchrec/distributed/sharding/ - fbgemm_gpu/split_table_batched_embeddings_ops_training.py - fbgemm_gpu/split_table_batched_embeddings_ops_training_common.py Note: `torchrec/distributed/model_parallel.py` is intentionally NOT in the filename rule because it wraps the entire forward pass of every sharded model — including all dense activations. Init paths through it are already covered by the `_init_dmp` name rule. Order-of-rules detail: inserted **before** the existing `"forward"` substring rule (and therefore also ahead of all PARAMETER rules) so that names like `init_parameters` (which contains "param") and any TBE init that transitively traces forward stay categorized as EMBEDDING. Differential Revision: D103992615
8a184fb to
be9544c
Compare
|
This pull request has been merged in c75845f. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Adds two new rules:
EMBEDDING name rule — frame name in:
{_init_dmp, _shard_modules_impl, _create_shard_module, shard, apply_2d_emb_sharding, _create_lookups, create_lookup, _create_embedding_kernel, init_parameters, _init_fbgemm_regroup, _apply_split, _apply_cache_state}.EMBEDDING filename rule — filename contains any of:
Note:
torchrec/distributed/model_parallel.pyis intentionally NOT inthe filename rule because it wraps the entire forward pass of every
sharded model — including all dense activations. Init paths through it
are already covered by the
_init_dmpname rule.Order-of-rules detail: inserted before the existing
"forward"substring rule (and therefore also ahead of all PARAMETER rules) so
that names like
init_parameters(which contains "param") and anyTBE init that transitively traces forward stay categorized as
EMBEDDING.
Differential Revision: D103992615