Skip to content

Commit

Permalink
add a metrics to track persistent cache loading time (pytorch#7039)
Browse files Browse the repository at this point in the history
  • Loading branch information
JackCaoG authored May 9, 2024
1 parent 5bbe5c8 commit c1b745e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions torch_xla/csrc/runtime/cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ class PersistentCache : public AbstractCache<K, T, H, E> {
TORCH_LAZY_COUNTER("PersistentCacheMiss", 1);
return nullptr;
}
TORCH_LAZY_TIMED("PersistentCacheLoad");
std::stringstream ss;
std::ifstream in(path, std::ios::binary);
ss << in.rdbuf();
Expand Down

0 comments on commit c1b745e

Please sign in to comment.