0

I have 1 GPU and 32 CPUs available in my machine. Is it possible in Ray to use them separatelly? For instance, one task gets allocated with 1 CPU and another task with 1 GPU? If I use

    tune.run(trainer_fn, 
             num_samples=32,
             resources_per_trial={"GPU": 1, "CPU": 1},
             ...

That only runs one train because there is only one GPU available. I know I can use something like 0.1 GPU and that runs multiple trains but I have no way to know which one should use the CPU and which should use the GPU.

desertnaut
  • 57,590
  • 26
  • 140
  • 166

1 Answers1

0

The best way to do this is to use the Ray Tune experiment API and then tune.run_experiments: https://docs.ray.io/en/latest/tune/api_docs/execution.html#tune-run-experiments

Kai
  • 241
  • 1
  • 3