Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions torchrec/distributed/batched_embedding_kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,13 +477,15 @@ def _populate_zero_collision_tbe_params(
else False
)
)

tbe_params["kv_zch_params"] = KVZCHParams(
bucket_offsets=bucket_offsets,
bucket_sizes=bucket_sizes,
enable_optimizer_offloading=True,
backend_return_whole_row=(backend_type == BackendType.DRAM),
eviction_policy=eviction_policy,
embedding_cache_mode=embedding_cache_mode_,
load_ckpt_without_opt=eviction_tbe_config.load_ckpt_without_opt,
)


Expand Down
3 changes: 3 additions & 0 deletions torchrec/distributed/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,7 @@ class KeyValueParams:
enable_raw_embedding_streaming: Optional[bool]: enable raw embedding streaming for SSD TBE
res_store_shards: Optional[int] = None: the number of shards to store the raw embeddings
kvzch_tbe_config: Optional[KVZCHTBEConfig]: KVZCH config for TBE
load_ckpt_without_opt: bool: whether it is st publish

# Parameter Server (PS) Attributes
ps_hosts (Optional[Tuple[Tuple[str, int]]]): List of PS host ip addresses
Expand All @@ -690,6 +691,7 @@ class KeyValueParams:
)
res_store_shards: Optional[int] = None # shards to store the raw embeddings
kvzch_tbe_config: Optional[KVZCHTBEConfig] = None
load_ckpt_without_opt: bool = False # is st publish

# Parameter Server (PS) Attributes
ps_hosts: Optional[Tuple[Tuple[str, int], ...]] = None
Expand Down Expand Up @@ -719,6 +721,7 @@ def __hash__(self) -> int:
self.enable_raw_embedding_streaming,
self.res_store_shards,
self.kvzch_tbe_config,
self.load_ckpt_without_opt,
)
)

Expand Down