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 2022/03/24 15:10:59 UTC
[GitHub] [tvm] cconvey opened a new pull request #10765: [runtime-rpc] Detect time_evaluator infinite loop
cconvey opened a new pull request #10765:
URL: https://github.com/apache/tvm/pull/10765
Reports/terminates when the RPC runtime's `time_evaluator`
is stuck in an infinite loop because `min_repeat_ms` > 0,
but the platform's timers are reporting the target-function's
running time as 0 nanoseconds.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] Lunderberg commented on pull request #10765: [runtime-rpc] Detect time_evaluator infinite loop
Posted by GitBox <gi...@apache.org>.
Lunderberg commented on pull request #10765:
URL: https://github.com/apache/tvm/pull/10765#issuecomment-1078073492
I like this! I do have have some worry that it could give false positives when measuring a very fast function using a low-resolution clock. The default timer uses `std::chrono::high_resolution_clock`, but it could be overridden. Can we add a condition to the check, such that it only triggers if more than ~10 ms has passed on the host?
--
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.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] cconvey commented on pull request #10765: [runtime-rpc] Detect time_evaluator infinite loop
Posted by GitBox <gi...@apache.org>.
cconvey commented on pull request #10765:
URL: https://github.com/apache/tvm/pull/10765#issuecomment-1077736008
CC: @Lunderberg @areusch @masahi @mehrdadh
--
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.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] tkonolige commented on a change in pull request #10765: [runtime-rpc] Detect time_evaluator infinite loop
Posted by GitBox <gi...@apache.org>.
tkonolige commented on a change in pull request #10765:
URL: https://github.com/apache/tvm/pull/10765#discussion_r834953641
##########
File path: src/runtime/rpc/rpc_module.cc
##########
@@ -395,6 +395,16 @@ PackedFunc WrapTimeEvaluator(PackedFunc pf, Device dev, int number, int repeat,
}
t->Stop();
int64_t t_nanos = t->SyncAndGetElapsedNanos();
+
+ if ((min_repeat_ms > 0) && (t_nanos == 0)) {
+ // We're almost certainly caught in an infinite loop, perahsp because something
+ // in the timing mechanism isn't working as expected.
+ LOG(FATAL) << __FILE__ << ":" << __LINE__ << ": "
Review comment:
`LOG(FATAL)` already contains file and line information, so you don't need to add it here.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] cconvey commented on a change in pull request #10765: [runtime-rpc] Detect time_evaluator infinite loop
Posted by GitBox <gi...@apache.org>.
cconvey commented on a change in pull request #10765:
URL: https://github.com/apache/tvm/pull/10765#discussion_r840935540
##########
File path: src/runtime/rpc/rpc_module.cc
##########
@@ -395,6 +395,16 @@ PackedFunc WrapTimeEvaluator(PackedFunc pf, Device dev, int number, int repeat,
}
t->Stop();
int64_t t_nanos = t->SyncAndGetElapsedNanos();
+
+ if ((min_repeat_ms > 0) && (t_nanos == 0)) {
+ // We're almost certainly caught in an infinite loop, perahsp because something
+ // in the timing mechanism isn't working as expected.
+ LOG(FATAL) << __FILE__ << ":" << __LINE__ << ": "
Review comment:
Reasonable assumption, but actually it wasn't. I've fixed this by enabling customized logging when this file is compiled for Hexagon.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org