[GitHub] cjolivier01 commented on a change in pull request #9932: Fixing couple of bugs in profiler

2018-03-01 Thread GitBox
cjolivier01 commented on a change in pull request #9932: Fixing couple of bugs 
in profiler
URL: https://github.com/apache/incubator-mxnet/pull/9932#discussion_r171709894
 
 

 ##
 File path: src/profiler/profiler.h
 ##
 @@ -131,8 +131,9 @@ struct ProfileStat {
   size_t process_id_ = current_process_id();
 
   /*! \brief id of thread which operation run on */
-  std::thread::id thread_id_ = std::this_thread::get_id();  // Not yet seen a
-// case where this 
isn't valid
+  size_t thread_id_ = std::hash{}(std::this_thread::get_id());
 
 Review comment:
   only once


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] cjolivier01 commented on a change in pull request #9932: Fixing couple of bugs in profiler

2018-03-01 Thread GitBox
cjolivier01 commented on a change in pull request #9932: Fixing couple of bugs 
in profiler
URL: https://github.com/apache/incubator-mxnet/pull/9932#discussion_r171710020
 
 

 ##
 File path: src/profiler/profiler.h
 ##
 @@ -131,8 +131,9 @@ struct ProfileStat {
   size_t process_id_ = current_process_id();
 
   /*! \brief id of thread which operation run on */
-  std::thread::id thread_id_ = std::this_thread::get_id();  // Not yet seen a
-// case where this 
isn't valid
+  size_t thread_id_ = std::hash{}(std::this_thread::get_id());
 
 Review comment:
   it's no longer thread_id_ if you do this...


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] cjolivier01 commented on a change in pull request #9932: Fixing couple of bugs in profiler

2018-02-28 Thread GitBox
cjolivier01 commented on a change in pull request #9932: Fixing couple of bugs 
in profiler
URL: https://github.com/apache/incubator-mxnet/pull/9932#discussion_r171445123
 
 

 ##
 File path: src/profiler/profiler.h
 ##
 @@ -131,8 +131,9 @@ struct ProfileStat {
   size_t process_id_ = current_process_id();
 
   /*! \brief id of thread which operation run on */
-  std::thread::id thread_id_ = std::this_thread::get_id();  // Not yet seen a
-// case where this 
isn't valid
+  size_t thread_id_ = std::hash{}(std::this_thread::get_id());
+  // thread getid returns a hex, hashing it to get a size_t
 
 Review comment:
   nit: usually comment goes above the code?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] cjolivier01 commented on a change in pull request #9932: Fixing couple of bugs in profiler

2018-02-28 Thread GitBox
cjolivier01 commented on a change in pull request #9932: Fixing couple of bugs 
in profiler
URL: https://github.com/apache/incubator-mxnet/pull/9932#discussion_r171444921
 
 

 ##
 File path: src/profiler/profiler.h
 ##
 @@ -131,8 +131,9 @@ struct ProfileStat {
   size_t process_id_ = current_process_id();
 
   /*! \brief id of thread which operation run on */
-  std::thread::id thread_id_ = std::this_thread::get_id();  // Not yet seen a
-// case where this 
isn't valid
+  size_t thread_id_ = std::hash{}(std::this_thread::get_id());
 
 Review comment:
   why do it here instead of emit time?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services