Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JackCaoG committed May 8, 2024
1 parent d7a6bf4 commit d0bbf89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torch_xla/csrc/runtime/cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ class PersistentCache : public AbstractCache<K, T, H, E> {
// if the key is tracked in memory, and if not it will check for a persisted
// version on disk.
TypePtr Get(const K& key) override {
TORCH_LAZY_TIMED("PersistentCacheGet");
std::lock_guard<std::mutex> slock(lock_);
TypePtr mem = memory_cache_.Get(key);
if (mem) {
Expand All @@ -174,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 d0bbf89

Please sign in to comment.