You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding new ID_COUNT eviction trigger condition (#4829)
Summary:
X-link: meta-pytorch/torchrec#3357
Pull Request resolved: #4829
X-link: facebookresearch/FBGEMM#1855
ID COUNT Trigger is based on total num of id in all kvzch tables. Memory usage is cross all tables but eviction trigger is for tbe, like:
if target total memory is 10G tbe1 has table [table0, table1], training_id_eviction_trigger_count is [200, 300] tbe2 has table [table2], training_id_eviction_trigger_count is [500] then the target memory for table0 is 2G, table1 is 3G, table2 is 5G, but the trigger condition is tbe level. If currently total id num in tbe1 is [100, 350], in this case tbe1 will not trigger evict even num in table1 is greater than 300 because total num. 100 + 350 = 450 < 500. If total id num in tbe1 is [100, 450], it will trigger eviction on tbe1 only for table1, because num in table0 100 < 200.
Reviewed By: emlin
Differential Revision: D81151216
fbshipit-source-id: 693bd47e950cc63498b4cdfc7691636197c832dc
self.kv_zch_params.eviction_policy.eviction_step_intervals, # trigger_step_interval if trigger mode is iteration
696
696
eviction_mem_threshold_gb, # mem_util_threshold_in_GB if trigger mode is mem_util
697
697
self.kv_zch_params.eviction_policy.ttls_in_mins, # ttls_in_mins for each table if eviction strategy is timestamp
698
698
self.kv_zch_params.eviction_policy.counter_thresholds, # counter_thresholds for each table if eviction strategy is counter
699
699
self.kv_zch_params.eviction_policy.counter_decay_rates, # counter_decay_rates for each table if eviction strategy is counter
700
700
self.kv_zch_params.eviction_policy.feature_score_counter_decay_rates, # feature_score_counter_decay_rates for each table if eviction strategy is feature score
701
-
self.kv_zch_params.eviction_policy.max_training_id_num_per_table, # max_training_id_num for each table
702
-
self.kv_zch_params.eviction_policy.target_eviction_percent_per_table, # target_eviction_percent for each table
701
+
self.kv_zch_params.eviction_policy.training_id_eviction_trigger_count, # training_id_eviction_trigger_count for each table
702
+
self.kv_zch_params.eviction_policy.training_id_keep_count, # training_id_keep_count for each table
703
703
self.kv_zch_params.eviction_policy.l2_weight_thresholds, # l2_weight_thresholds for each table if eviction strategy is feature l2 norm
0 commit comments