Rename profiler metadata key (#63743)
authorHan Guangyun <guangyunhan@microsoft.com>
Thu, 9 Sep 2021 20:02:56 +0000 (13:02 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 9 Sep 2021 20:06:16 +0000 (13:06 -0700)
Summary:
rename metadata key to be the same with variable name

Pull Request resolved: https://github.com/pytorch/pytorch/pull/63743

Reviewed By: albanD

Differential Revision: D30839501

Pulled By: gdankel

fbshipit-source-id: b9b4e670dcc9557b8d8d0730baea0ad39a1a0ca4

torch/csrc/autograd/profiler_kineto.cpp

index da1ae6f..ce96f84 100644 (file)
@@ -154,10 +154,10 @@ struct KinetoThreadLocalState : public ProfilerThreadLocalState {
             "Addr", std::to_string(reinterpret_cast<intptr_t>(ptr)));
         act.addMetadata("Bytes", std::to_string(alloc_size));
         if (total_allocated >= 0) {
-          act.addMetadata("Allocated Bytes", std::to_string(total_allocated));
+          act.addMetadata("Total Allocated", std::to_string(total_allocated));
         }
         if (total_reserved >= 0) {
-          act.addMetadata("Reserved Bytes", std::to_string(total_reserved));
+          act.addMetadata("Total Reserved", std::to_string(total_reserved));
         }
 #endif // USE_KINETO