Skip to content

Commit 967d11e

Browse files
cyyevermeta-codesync[bot]
authored andcommitted
Fix int64 key truncation in DramKV inference eviction loop (#5876)
Summary: X-link: https://github.com/facebookresearch/FBGEMM/pull/2805 `FeatureEvict::start_inference_eviction_loop` collected evicted keys into a `std::vector<int>`, but embedding keys are `int64_t`. Pushing a 64-bit key into an `int` vector truncates it to 32 bits. Pull Request resolved: #5876 Reviewed By: henrylhtsang Differential Revision: D108339752 Pulled By: q10 fbshipit-source-id: eb30ac9528b777f2d9541abea9641ceb5c9c66cd
1 parent 0f5414f commit 967d11e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fbgemm_gpu/src/dram_kv_embedding_cache/feature_evict.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ class FeatureEvict {
689689
auto* pool = kv_store_.pool_by(shard_id);
690690
auto mem_pool_lock = pool->acquire_lock();
691691

692-
std::vector<int> evicting_keys;
692+
std::vector<int64_t> evicting_keys;
693693
evicting_keys.reserve(block_nums_snapshot_[shard_id] / 100);
694694
while (!should_exit_evict_loop(shard_id)) {
695695
auto* block =

0 commit comments

Comments
 (0)