Migrate fbgemm internals off the ops_common shim to leaf imports#5892
Closed
q10 wants to merge 1 commit into
Closed
Migrate fbgemm internals off the ops_common shim to leaf imports#5892q10 wants to merge 1 commit into
q10 wants to merge 1 commit into
Conversation
Summary: Fourth foundational diff: point fbgemm-internal modules at the canonical tbe.* leaf modules instead of the split_table_batched_embeddings_ops_common shim. This breaks the latent import cycle the shim would otherwise create (ops_training -> ops_common shim -> tbe.ssd.ssd_config -> tbe.ssd.__init__ -> .training -> ops_training): with internals importing from the leaves directly, importing ops_training no longer pulls the shim, so the ssd package __init__ is not re-entered mid-import. Migrated to leaf imports (tbe.config.embedding_config / tbe.cache.cache_config): - split_table_batched_embeddings_ops_training.py (+ construct_cache_state -> CacheState.construct) - split_table_batched_embeddings_ops_inference.py (+ construct_cache_state -> CacheState.construct, 2 call sites) - split_embedding_configs.py (EmbeddingLocation, SplitState) - split_table_batched_embeddings_ops_training_common.py (PoolingMode) - split_embedding_inference_converter.py (EmbeddingLocation) - sparse_ops.py (PoolingMode) - tbe/bench/embedding_ops_common_config.py, tbe/bench/benchmark_click_interface.py The ops_common shim remains for external BC. autodeps updated BUCK deps. Reviewed By: cthi Differential Revision: D107684316
Contributor
|
@q10 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D107684316. |
Contributor
|
This pull request has been merged in 8e24452. |
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:
Fourth foundational diff: point fbgemm-internal modules at the canonical tbe.*
leaf modules instead of the split_table_batched_embeddings_ops_common shim.
This breaks the latent import cycle the shim would otherwise create
(ops_training -> ops_common shim -> tbe.ssd.ssd_config -> tbe.ssd.init ->
.training -> ops_training): with internals importing from the leaves directly,
importing ops_training no longer pulls the shim, so the ssd package init is
not re-entered mid-import.
Migrated to leaf imports (tbe.config.embedding_config / tbe.cache.cache_config):
CacheState.construct)
CacheState.construct, 2 call sites)
The ops_common shim remains for external BC. autodeps updated BUCK deps.
Reviewed By: cthi
Differential Revision: D107684316