GPU ID (Environment setting)

Tools that honor the GPU ID environment identify the GPU to use to process your data.

Usage notes

  • Identify the compute GPU to use if more than one is available.
  • Use the NVIDIA System Management Interface (nvidia-smi) command tool, which is included with CUDA, to check the order and status of GPUs. The nvidia-smi command tool also supplies information such as GPU load, memory load, temperature, and other GPU performance characteristics.
  • It is recommended that you use one GPU for display only—with the monitors connected to it—and set the other GPU for computing only. This will ensure that the compute and display GPUs will not interfere with each other and will maximize efficiency.

Dialog syntax

Set the GPU identification number to use to process your data.

  • GPU ID—The GPU identification number to use to process your data. The default is 0.

Scripting syntax

arcpy.env.gpuId = GPU_ID

ParameterExplanation

gpuId

The GPU identification number to use to process your data. This is an integer and the default value is 0.

gpuId syntax

Script example

import arcpy

# Set the gpu id to 1
arcpy.env.gpuId = "1"