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/07/20 02:37:22 UTC
[GitHub] [tvm] sunjiweiswift commented on a diff in pull request #11599: [Bugfix][Runtime] Fix sched_setaffinity in Android
sunjiweiswift commented on code in PR #11599:
URL: https://github.com/apache/tvm/pull/11599#discussion_r925109751
##########
src/runtime/threading_backend.cc:
##########
@@ -101,13 +109,19 @@ class QuRTThread {
};
#endif // __hexagon__
thread_local int max_concurrency = 0;
+
class ThreadGroup::Impl {
public:
Impl(int num_workers, std::function<void(int)> worker_callback, bool exclude_worker0)
: num_workers_(num_workers) {
ICHECK_GE(num_workers, 1) << "Requested a non-positive number of worker threads.";
for (int i = exclude_worker0; i < num_workers_; ++i) {
- threads_.emplace_back([worker_callback, i] { worker_callback(i); });
+ threads_.emplace_back([worker_callback, i, this] {
+#ifndef __hexagon__
+ SetTid();
Review Comment:
@huajsj @areusch
--
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