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)

Most upvoted comments

One possibility is to add support for cpu/cpus in resources, 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 request cpu: 8. Would that be surprising to you?

Another choice is to add option like sky exec --cpus 20 and make it clear that by default --cpus would be set to 1. This would bring consistency between setting cpu/gpu resources. I kinda feel like adding OMP_NUM_THREADS=X is a bit too hacky.