Thanks @ricardoV94 for your response!
It is great to know that
Specifying more cores then (than) chains doesn’t matter if that’s the question.
This confirms my guess.
PyMC uses at most one for each chain, it doesn’t try to somehow split the work needed for a single chain across multiple cores (other then what PyTensor automatically does for some computations, but that’s has nothing to do with the cores argument in
sample
)
Yes, at the initialization stage, there is one core used by 100% while others remain idle. I notice the uneven utilization of multiple cores when the sampling starts.
About initialization. We compile the needed functions once on the main process before splitting for multi core sampling. You may be noticing that when you say initialization uses cores unevenly?
Will try this… I notice that some pages on PyTensor Doc website are still under construction. Look forward to reading more about the user cases/examples of PyTensor in/with PyMC.
Btw, on the Pytensor side this could be helpful: Multi cores support in PyTensor — PyTensor dev documentation