Limit thread count for NumPy/OpenBLAS/MKL#33
Conversation
Set environment variables to limit thread count for NumPy and related libraries. In certain environments, OpenBLAS/MKL may still have thread pooling,
|
It looks good to me, but I'm wondering is there any speed comparison for this change? |
|
Thanks for your reply, I will conduct an ablation study and provide environment details few days latter. This will fix the delay caused by OpenBLAS / MKL in certain environments. |
|
Using 8 nproc: The root cause is that when running inside a Docker container, MKL fails to detect the true vCPU limit and instead attempts to utilize all physical CPUs of the host system. This leads to extreme oversubscription, which severely blocks the training procedure and degrades performance. |
|
Thanks for the quick reply.
Does this mean it only affect the program run inside the Docker or it's a general affect? |
Set environment variables to limit thread count for NumPy and related libraries.
In certain environments, OpenBLAS/MKL may still have thread pooling.