Skip to content

Commit 2dfdca1

Browse files
emlinfacebook-github-bot
authored andcommitted
add direct_write_embedding method
Summary: X-link: pytorch/FBGEMM#4800 X-link: facebookresearch/FBGEMM#1824 This method will write the input embedding directly without through optimizer Reviewed By: q10 Differential Revision: D79290124
1 parent 3243a8e commit 2dfdca1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

torchrec/distributed/batched_embedding_kernel.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,11 @@ def _populate_zero_collision_tbe_params(
321321
enable_optimizer_offloading=True,
322322
backend_return_whole_row=(backend_type == BackendType.DRAM),
323323
eviction_policy=eviction_policy,
324+
embedding_cache_mode=(
325+
config.fused_params.get("embedding_cache_mode", False)
326+
if config.fused_params
327+
else False
328+
),
324329
)
325330

326331

0 commit comments

Comments
 (0)