Skip to content

Make tbe.ssd.ssd_config canonical; ops_common is now a shim#5874

Open
q10 wants to merge 1 commit into
pytorch:mainfrom
q10:export-D107684315
Open

Make tbe.ssd.ssd_config canonical; ops_common is now a shim#5874
q10 wants to merge 1 commit into
pytorch:mainfrom
q10:export-D107684315

Conversation

@q10

@q10 q10 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

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

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
@meta-cla meta-cla Bot added the cla signed label Jun 11, 2026
@meta-codesync

meta-codesync Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

@q10 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D107684315.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant