You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/11/25 07:44:47 UTC

[GitHub] [tvm] merrymercy commented on a change in pull request #6972: [AutoScheduler] Print the time used for measurement

merrymercy commented on a change in pull request #6972:
URL: https://github.com/apache/tvm/pull/6972#discussion_r530163560



##########
File path: src/auto_scheduler/utils.h
##########
@@ -253,6 +254,16 @@ inline std::string Chars(const char& str, int times) {
   return ret.str();
 }
 
+/*! \brief Print the time elapsed */
+inline void PrintTimeElapsed(std::chrono::time_point<std::chrono::high_resolution_clock> t_begin,

Review comment:
       I feel that
   `
   double duration = std::chrono::duration_cast<std::chrono::duration<double>>(
                           std::chrono::high_resolution_clock::now() - t_begin)
                           .count();
   `
   is too long and makes the readbility worse. This is the reason for creating `PrintElapsedTime`




----------------------------------------------------------------
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:
users@infra.apache.org