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 2021/12/31 03:23:33 UTC

[GitHub] [tvm] huajsj commented on a change in pull request #9802: [Runtime][ThreadPool]Refactor affinity function and support CPU affinity list setting.

huajsj commented on a change in pull request #9802:
URL: https://github.com/apache/tvm/pull/9802#discussion_r776916184



##########
File path: include/tvm/runtime/threading_backend.h
##########
@@ -64,21 +85,24 @@ class ThreadGroup {
   enum AffinityMode : int {
     kBig = 1,
     kLittle = -1,
+    kSpecify = -2,
   };
 
   /*!
    * \brief configure the CPU id affinity
    *
    * \param mode The preferred CPU type (1 = big, -1 = little).
    * \param nthreads The number of threads to use (0 = use all).
+   * \param cpus A list of cpu to use for affinity setting.

Review comment:
       @HungYangChang , here we use a list of cpu id as parameters, if the 4 small cores have id [0, 1, 2,3] , then the first cpus list is {0, 1, 2, 3},  the command "cat /proc/cpuinfo" can be used to find cpu id information in linux.
   you also can refer "TVMBackendAffinityConfigure" in "threading_backend_test.cc" for use case.




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