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/08/05 07:31:45 UTC

[GitHub] [tvm] huajsj commented on a diff in pull request #11599: [Bugfix][Runtime] Fix sched_setaffinity in Android

huajsj commented on code in PR #11599:
URL: https://github.com/apache/tvm/pull/11599#discussion_r938528880


##########
src/runtime/threading_backend.cc:
##########
@@ -321,12 +350,25 @@ class ThreadGroup::Impl {
     }
   }
 
+#ifndef __hexagon__
+  pid_t Tid() {
+#if defined(_WIN32)
+    return GetCurrentThreadId();
+#else
+    return syscall(SYS_gettid);
+#endif
+  }
+  void SetTid(size_t index) { threads_tid_[index] = Tid(); }
+  pid_t GetTid(size_t thread_index) { return threads_tid_[thread_index]; }

Review Comment:
   > Returns -1, indicating that the affinity setting failed. In line with expectations
   
    this sounds not make sense, why "affinity setting failed" is " In line with expectations", why need to expect "affinity setting failed"?



-- 
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