Square Enix © Goodbye Kansas

Table of Contents

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



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


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



engine_typeSelects the engine type, where "0" is not considered, "2" is for CUDA and "3" is for RTX.


-all - All available NVidia devices;
-enabled - Only enabled NVidia devices.

setSets which NVidia devices to use with V-Ray GPU render.
The CPU can also be used as a CUDA device with V-Ray GPU.



List enabled devices:

vray gpuDeviceSelect 2 list -enabled

This command will return a string array with all enabled NVidia 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"}