Skip To Content

GPU ID (Environment setting)

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

Usage notes

  • Identify which 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 on 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 to 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

ParametersExplanation

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"

Related topics