Hello @FrozenGene @hjiang,
I have tried building pipeline executing on Hikey970 whcih contains 4 big cores and small cores. (Inspired by [RFC][Tracking Issue] Pipeline Executor For Compute graph pipeline · Issue #8596 · apache/tvm (github.com)) I am wondering if I have two processes running at the same time, is it possible to pin one of them on CPU 0-3 and another on CPU 4-7?
Here is what I did so far:
- Split model into N subgraph (for example N = 2, I create mods[0],mods[1])
- create by subgraph module 1 and module 2 by using graph_executor.GraphModule
- Using multiprocessing to create the process for each module and set CPU affinity by using the following code
from tvm._ffi import get_global_func config_threadpool_X = get_global_func('runtime.config_threadpool') config_threadpool_1(-1, 4) # In the process of module 1 config_threadpool_2(1, 4) # In the process of module 2
However, it seems like config_threadpool would change the CPU affinity globally, which means that if I setconfig_threadpool on the process of module 1, it would affect another process. Can you please check that? If so, if I have two processes running at the same time, is it possible to pin one of them on CPU 0-3 and the other on CPU 4-7?
This post is a follow-up question of How to manually controll CPU affinity in multithreading scenario? ,and this question is also related to my previous question : Can TVM split work into different layers, and assign layers into different cores? - #30 by popojames