From c1b745e5fd0db62156eab09731711ee51b83020b Mon Sep 17 00:00:00 2001 From: JackCaoG <59073027+JackCaoG@users.noreply.github.com> Date: Thu, 9 May 2024 10:22:55 -0700 Subject: [PATCH] add a metrics to track persistent cache loading time (#7039) --- torch_xla/csrc/runtime/cache.h | 1 + 1 file changed, 1 insertion(+) diff --git a/torch_xla/csrc/runtime/cache.h b/torch_xla/csrc/runtime/cache.h index bef5b099ec6..9557b2353b7 100644 --- a/torch_xla/csrc/runtime/cache.h +++ b/torch_xla/csrc/runtime/cache.h @@ -173,6 +173,7 @@ class PersistentCache : public AbstractCache { TORCH_LAZY_COUNTER("PersistentCacheMiss", 1); return nullptr; } + TORCH_LAZY_TIMED("PersistentCacheLoad"); std::stringstream ss; std::ifstream in(path, std::ios::binary); ss << in.rdbuf();