Make tbe.ssd.ssd_config canonical; ops_common is now a shim#5874
Open
q10 wants to merge 1 commit into
Open
Conversation
Summary:
Third foundational diff of the BC-safe TBE type migration: make tbe.ssd.ssd_config the
canonical home for the SSD/KVZCH types and turn ops_common into a pure re-export shim.
- tbe/ssd/ssd_config.py is canonical for BackendType, EvictionPolicy, EnrichmentType,
EnrichmentResponseFormat, EnrichmentPolicy, KVZCHParams, KVZCHTBEConfig (init-time only;
no __module__ pinning required).
- tbe/ssd/__init__.py guards the heavy .common/.inference/.inference_serving/.training
imports (re-raising anything but the specific absent submodule) so the new lightweight
:tbe_ssd_config target loads cleanly under torch.package.
- split_table_batched_embeddings_ops_common.py is now a pure re-export shim: config + cache
types eager, SSD/KVZCH lazy via __getattr__ to avoid a tbe.ssd -> .training -> ops_training
import cycle; plus the construct_cache_state() forwarder. Legacy import path preserved.
- BUCK: add lightweight :tbe_ssd_config; :ssd_split_table_batched_embeddings_ops drops
ssd_config.py and deps :tbe_ssd_config. ops_common deps += :tbe_ssd_config and is marked
autodeps-skip so the tbe leaf config deps (only reachable lazily) stay pinned into every
publisher's torch.package closure (SEV-prevention hardening, S669532/S672649). Acyclic:
ops_common -> {tbe_config, tbe_cache_config, tbe_ssd_config}.
Completes the acyclic, identity-preserving redo of D103477971 (SEV S669532) for the
foundational fbgemm-internal layer.
Reviewed By: henrylhtsang
Differential Revision: D107684315
Contributor
|
@q10 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D107684315. |
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:
Third foundational diff of the BC-safe TBE type migration: make tbe.ssd.ssd_config the
canonical home for the SSD/KVZCH types and turn ops_common into a pure re-export shim.
EnrichmentResponseFormat, EnrichmentPolicy, KVZCHParams, KVZCHTBEConfig (init-time only;
no module pinning required).
imports (re-raising anything but the specific absent submodule) so the new lightweight
:tbe_ssd_config target loads cleanly under torch.package.
types eager, SSD/KVZCH lazy via getattr to avoid a tbe.ssd -> .training -> ops_training
import cycle; plus the construct_cache_state() forwarder. Legacy import path preserved.
ssd_config.py and deps :tbe_ssd_config. ops_common deps += :tbe_ssd_config and is marked
autodeps-skip so the tbe leaf config deps (only reachable lazily) stay pinned into every
publisher's torch.package closure (SEV-prevention hardening, S669532/S672649). Acyclic:
ops_common -> {tbe_config, tbe_cache_config, tbe_ssd_config}.
Completes the acyclic, identity-preserving redo of D103477971 (SEV S669532) for the
foundational fbgemm-internal layer.
Reviewed By: henrylhtsang
Differential Revision: D107684315