# How can I assign different GPU for different replicas in Ray Serve?

**URL:** <https://discuss.ray.io/t/how-can-i-assign-different-gpu-for-different-replicas-in-ray-serve/6825>\
**Category:** Ray Serve\
**Created:** [July 14, 2022, 10:30am UTC](https://discuss.ray.io/t/how-can-i-assign-different-gpu-for-different-replicas-in-ray-serve/6825 "2022-07-14T10:30:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anh\_Minh\_Nguyen\_Quan](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/anh_minh_nguyen_quan/32/2879_2.png) [@Anh\_Minh\_Nguyen\_Quan](https://discuss.ray.io/u/Anh_Minh_Nguyen_Quan)\
**Post date:** [July 14, 2022, 10:30am UTC](https://discuss.ray.io/t/how-can-i-assign-different-gpu-for-different-replicas-in-ray-serve/6825/1 "2022-07-14T10:30:32Z")

</div>

Hi, I have 2 GPUs and want to start 6 instances (num\_replicas=6). How can I assign the first 3 instances to GPU-1 and the remaining 3 instances to GPU-2 ?.

---

<div class="post-metadata">

**Author:** ![architkulkarni](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/architkulkarni/32/10_2.png) [@architkulkarni](https://discuss.ray.io/u/architkulkarni)\
**Post date:** [July 14, 2022, 5:36pm UTC](https://discuss.ray.io/t/how-can-i-assign-different-gpu-for-different-replicas-in-ray-serve/6825/2 "2022-07-14T17:36:40Z")

</div>

Hi @Anh_Minh_Nguyen_Quan , I checked [GPU Support — Ray 3.0.0.dev0](https://docs.ray.io/en/master/ray-core/tasks/using-ray-with-gpus.html) and didn’t find anything about Ray supporting running tasks on specific GPUs.

However, can you try the following?  
`@serve.deployment(ray_actor_options={"num_gpus": 0.33})`  
I think this should have the effect that only 3 replicas will use each GPU.
