Skip to content
07-848 2005

V-Ray for Maya

vray gpuDeviceSelect

This page provides information about the vray gpuDeviceSelect command in MEL.

Last updated 7 July 2026

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:

<code><span class="line"><span>vray gpuDeviceSelect <engine_type > [list [-all | -enabled] | set <list_of_devices>]</span></span></code>

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

<code><span class="line"><span>vray gpuDeviceSelect -help</span></span></code>

<code><span class="line"><span>vray gpuDeviceSelect help</span></span></code>

Argument

Description

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:

-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:

<code data-v-c2b1f83f=""><span data-v-c2b1f83f="" class="line">vray gpuDeviceSelect 2 list -enabled</span></code>

This command returns a string array with all enabled devices.

Set CUDA device for render:

<code data-v-c2b1f83f=""><span data-v-c2b1f83f="" class="line">vray gpuDeviceSelect 2 set "NVIDIA CUDA GeForce GTX 750 Ti GPU index0"</span></code>

Set CUDA devices for render:

<code data-v-c2b1f83f=""><span data-v-c2b1f83f="" class="line">vray gpuDeviceSelect 2 set {"NVIDIA CUDA GeForce GTX 750 Ti GPU index0", "NVIDIA CUDA GeForce GTX 1080 GPU index1", "c++/cpu"}</span></code>

Set RTX device for render:

<code data-v-c2b1f83f=""><span data-v-c2b1f83f="" class="line">vray gpuDeviceSelect 3 set {"NVIDIA CUDA Quadro RTX 4000 GPU index1"}</span></code>