Skip to content

Commit 8083b9b

Browse files
YuzeDaiMetafacebook-github-bot
authored andcommitted
Fix UVM Cache Stats Report
Summary: Pull Request resolved: https://fburl.com/4d2jifwi Previously, we want to disable cache stats report when gflag ```FLAGS_tbe_uvm_cache_stat_report``` is non-positive but we can still see observe cache stats (cache miss when UVM cache is enabled) when ```FLAGS_tbe_uvm_cache_stat_report``` is negative. This diff fixes this error so that cache stats report can be disabled. Reviewed By: doehyun Differential Revision: D43630535 fbshipit-source-id: e267f881166721f804f04e4cdd3a35c6491452e7
1 parent 3da46da commit 8083b9b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fbgemm_gpu/codegen/embedding_forward_quantized_host.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,8 @@ Tensor int_nbit_split_embedding_uvm_caching_codegen_lookup_function(
372372
call_count = tbe_call_count[signature];
373373
}
374374

375-
if (call_count % FLAGS_tbe_uvm_cache_stat_report == 0) {
375+
if (FLAGS_tbe_uvm_cache_stat_report > 0 &&
376+
call_count % FLAGS_tbe_uvm_cache_stat_report == 0) {
376377
gather_uvm_stats = true;
377378
uvm_cache_stats = at::zeros(
378379
{kUvmCacheStatsSize},

0 commit comments

Comments
 (0)