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


##########
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:
   "SetTid after Gettid" not means "we set affinity for a nonexistent thread", 
thread already there it just not yet execute the "SetTid" function.



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

Reply via email to