areusch commented on code in PR #11599:
URL: https://github.com/apache/tvm/pull/11599#discussion_r899629648
##########
src/runtime/threading_backend.cc:
##########
@@ -164,9 +172,13 @@ class ThreadGroup::Impl {
CPU_SET(id, &cpuset);
}
#if defined(__ANDROID__)
- sched_setaffinity(thread, sizeof(cpu_set_t), &cpuset);
+ if (sched_setaffinity(tid, sizeof(cpu_set_t), &cpuset) == -1) {
Review Comment:
per the man page we should check for != 0 here, correct?
##########
src/runtime/threading_backend.cc:
##########
@@ -164,9 +172,13 @@ class ThreadGroup::Impl {
CPU_SET(id, &cpuset);
}
#if defined(__ANDROID__)
- sched_setaffinity(thread, sizeof(cpu_set_t), &cpuset);
+ if (sched_setaffinity(tid, sizeof(cpu_set_t), &cpuset) == -1) {
+ LOG(WARNING) << "SetThreadAffinity fail!";
Review Comment:
possible to obtain more detail from strerror() or similar?
--
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]