skypilot: Sky exec doesn't use multi-CPU?
I submitted my job by sky exec but looks like it’s only using 1 CPU-core for my matrix computation by PyTorch Sparse.
This is different from directly running the same run commend on the server which uses all CPU-core (10x performance difference in this case).
Is it an expected behavior?
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 18 (6 by maintainers)
One possibility is to add support for
cpu/cpusinresources, and Sky will set OMP_NUM_THREADS for the user to that value. In doing so the default is still 1-thread performance, but you can requestcpu: 8. Would that be surprising to you?Another choice is to add option like
sky exec --cpus 20and make it clear that by default--cpuswould be set to 1. This would bring consistency between setting cpu/gpu resources. I kinda feel like addingOMP_NUM_THREADS=Xis a bit too hacky.