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 2020/02/03 08:02:58 UTC
[GitHub] [incubator-tvm] FrozenGene commented on a change in pull request
#4747: [ThreadPool] Solve ARM BIG.LITTLE heterogeneous multicores
FrozenGene commented on a change in pull request #4747: [ThreadPool] Solve ARM BIG.LITTLE heterogeneous multicores
URL: https://github.com/apache/incubator-tvm/pull/4747#discussion_r373962677
##########
File path: src/runtime/threading_backend.cc
##########
@@ -133,34 +133,42 @@ class ThreadGroup::Impl {
#endif
}
if (exclude_worker0) { // master thread run task
-#if defined(__ANDROID__)
- SetFullCpuAffinity();
-#else
- // if we set TVM_BIND_MASTER_THREAD to be 1, we will bind master thread
- // to core 0.
- const char* bind_master_thread = getenv("TVM_BIND_MASTER_THREAD");
- if (bind_master_thread && atoi(bind_master_thread) == 1) {
- cpu_set_t cpuset;
- CPU_ZERO(&cpuset);
- if (reverse) {
- CPU_SET(sorted_order_[sorted_order_.size() - 1], &cpuset);
- } else {
- CPU_SET(sorted_order_[0], &cpuset);
- }
- pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
- }
- pthread_atfork(nullptr, nullptr, ThreadGroup::Impl::SetFullCpuAffinity);
-#endif
+ // Master thread will have free migration on needed cores.
Review comment:
Done
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services