Skip to content

Commit 004c4af

Browse files
EddyLXJfacebook-github-bot
authored andcommitted
Adding KVZCHEvictionTBEConfig in FBGEEM
Summary: See diff D85604160, this KVZCHEvictionTBEConfig is in FBGEMM and used in torchrec. Both FBGEEM and torchrec are open source in github. It is required to land first, otherwise torchrec github build will throw error {F1983027645} Differential Revision: D83896528
1 parent ab1cea1 commit 004c4af

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

fbgemm_gpu/fbgemm_gpu/split_table_batched_embeddings_ops_common.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,19 @@ def validate(self) -> None:
240240
), "backend_return_whole_row can only be enabled when enable_optimizer_offloading is enabled"
241241

242242

243+
class KVZCHEvictionTBEConfig(NamedTuple):
244+
# Eviction trigger model for kvzch table: 0: disabled, 1: iteration, 2: mem_util, 3: manual, 4: id count, 5: free_mem
245+
kvzch_eviction_trigger_mode: Optional[int] = None
246+
# Minimum free memory (in GB) required before triggering eviction when using free_mem trigger mode.
247+
eviction_free_mem_threshold_gb: Optional[int] = None
248+
# Number of batches between checks for free memory threshold when using free_mem trigger mode.
249+
eviction_free_mem_check_interval_batch: Optional[int] = None
250+
# The width of each feature score bucket used for threshold calculation in feature score-based eviction.
251+
threshold_calculation_bucket_stride: Optional[float] = None
252+
# Total number of feature score buckets used for threshold calculation in feature score-based eviction.
253+
threshold_calculation_bucket_num: Optional[int] = None
254+
255+
243256
class BackendType(enum.IntEnum):
244257
SSD = 0
245258
DRAM = 1

0 commit comments

Comments
 (0)