---
title: "vray gpuDeviceSelect"
canonical: "https://documentation.chaos.com/space/VMAYA/111748410/vray%20gpuDeviceSelect"
format: markdown
---
This page provides information about the vray gpuDeviceSelect command in MEL.

 

## **Overview**

---

This command creates a list of the available GPU device(s) and/or sets them to render with V-Ray GPU directly through MEL.


## **Syntax**

---

The vray gpuDeviceSelect runs in the following way:

 

```
vray gpuDeviceSelect <engine_type > [list [-all | -enabled] | set <list_of_devices>]
```

 

To type all the available options you can run the command with **help** argument:

```
vray gpuDeviceSelect -help
```

```
vray gpuDeviceSelect help
```


| **Argument** | **Description** |
| --- | --- |
| **engine_type** | Selects the engine type, where "0" is not considered, "1" is for OpenCL, "2" is for CUDA, "3" is for RTX, "4" is for Metal, "5" is for MetalRT, and "6" is for HIP |
| **list** | Lists:<br>-**all** - All available devices;  
-**enabled** - Only enabled devices. |
| **set** | Sets which devices to use with V-Ray GPU render.   
The CPU can also be used as a CUDA device with V-Ray GPU. |

 

## **Examples**

---

**List enabled devices: **

```
vray gpuDeviceSelect 2 list -enabled
```

This command returns a <span style="color: #202124">string array </span>with all enabled devices.

 

**Set CUDA device for render: **

```
vray gpuDeviceSelect 2 set "NVIDIA CUDA GeForce GTX 750 Ti GPU index0"
```

 

**Set CUDA devices for render:**

```
vray gpuDeviceSelect 2 set {"NVIDIA CUDA GeForce GTX 750 Ti GPU index0", "NVIDIA CUDA GeForce GTX 1080 GPU index1", "c++/cpu"}
```

 

**Set RTX device for render: **

```
vray gpuDeviceSelect 3 set {"NVIDIA CUDA Quadro RTX 4000 GPU index1"}
```