zxybazh commented on a change in pull request #9056:
URL: https://github.com/apache/tvm/pull/9056#discussion_r713468524
##########
File path: src/support/parallel_for.cc
##########
@@ -93,5 +93,52 @@ void parallel_for(int begin, int end, const
std::function<void(int)>& f, int ste
}
}
+void parallel_for_dynamic(int begin, int end, int num_threads,
+ const std::function<void(int thread_id, int
task_id)>& f) {
+ // Step 1. Sanity checks
+ if (begin == end) {
+ return;
+ }
+ CHECK_LT(begin, end) << "ValueError: The interval [begin, end) requires
`begin <= end`";
Review comment:
Ah, I got it. Thanks for the clarification. Just thinking `[begin, end)`
and `begin <= end` might better be consistent.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]