From dacc485407fafd2b52290055c42b97060ab1610e Mon Sep 17 00:00:00 2001 From: Megvii Engine Team Date: Sun, 11 Oct 2020 08:45:23 +0800 Subject: [PATCH] fix(build/windows/macos): fix build caused by 40ca9ea80e GitOrigin-RevId: b4868a08f63286f24f76ab457dbbc786a2e85936 --- imperative/src/impl/profiler.cpp | 3 ++- imperative/src/include/megbrain/imperative/profiler.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/imperative/src/impl/profiler.cpp b/imperative/src/impl/profiler.cpp index 681cccbea..ccb98081d 100644 --- a/imperative/src/impl/profiler.cpp +++ b/imperative/src/impl/profiler.cpp @@ -83,7 +83,8 @@ size_t TensorRecorder::record_tensor(const TensorPtr& tensor) { return id; } else { auto id = m_next_id++; - m_tensor_map.insert({tensor.get(), {std::weak_ptr{tensor}, id}}); + m_tensor_map.insert( + {tensor.get(), {std::weak_ptr{tensor}, id}}); return id; } } diff --git a/imperative/src/include/megbrain/imperative/profiler.h b/imperative/src/include/megbrain/imperative/profiler.h index d1cd37deb..b24522420 100644 --- a/imperative/src/include/megbrain/imperative/profiler.h +++ b/imperative/src/include/megbrain/imperative/profiler.h @@ -40,8 +40,8 @@ struct ProfileEntry { std::vector> device_list; std::vector inputs; std::vector outputs; - ssize_t memory = 0; - ssize_t computation = 0; + long long memory = 0; + long long computation = 0; #if MGB_ENABLE_JSON std::shared_ptr param; #endif -- GitLab