# How to use fraction GPU in \`ray.tune.Tuner\`?

**URL:** <https://discuss.ray.io/t/how-to-use-fraction-gpu-in-ray-tune-tuner/11863>\
**Category:** Ray Train\
**Created:** [August 20, 2023, 12:52am UTC](https://discuss.ray.io/t/how-to-use-fraction-gpu-in-ray-tune-tuner/11863 "2023-08-20T00:52:00Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![matthewdeng](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/matthewdeng/32/1446_2.png) [@matthewdeng](https://discuss.ray.io/u/matthewdeng)\
**Post date:** [August 20, 2023, 4:04pm UTC](https://discuss.ray.io/t/how-to-use-fraction-gpu-in-ray-tune-tuner/11863/2 "2023-08-20T16:04:35Z")

</div>

Hey! What is the total amount of resources you want to schedule for a single `TorchTrainer`?

Based on your current `ScalingConfig`, each Trainer/Trial will request a total of

```auto
trainer_resources + num_workers * resources_per_worker

```

where

```auto
trainer_resources=1 CPU
num_workers=2
resources_per_worker=0.5 GPU

```

So in this case, you’ll be requesting a total of 1 CPU and 1 GPU - does that match the output you’re seeing in the console output?

---

_[View the full topic](https://discuss.ray.io/t/how-to-use-fraction-gpu-in-ray-tune-tuner/11863)._
