leezu commented on a change in pull request #18306:
URL: https://github.com/apache/incubator-mxnet/pull/18306#discussion_r424777153



##########
File path: src/profiler/storage_profiler.h
##########
@@ -52,6 +54,12 @@ class DeviceStorageProfiler {
       if (prof->IsProfiling(profiler::Profiler::kMemory)) {
         Init();
         const size_t idx = prof->DeviceIndex(handle.ctx.dev_type, 
handle.ctx.dev_id);
+        // sleep for a few seconds until the mem_counters_ is fully initialized
+        size_t timeout = 1000;

Review comment:
       Should we throw an error if the timeout is not sufficient instead of 
using uninitialized data?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to