GPU processing with Spatial Analyst

Available with Spatial Analyst license.

Spatial Analyst now offers enhanced performance with the use of Graphics Processing Unit (GPU) processing for some tools. This technology takes advantage of the computing power of the graphics card in modern computers to improve the performance of certain operations.

The following tools currently support GPU processing:

What is GPU processing?

A GPU is a hardware component in your computer with the primary purpose of accelerating the rendering of graphics in the screen display. Recently, the processing power of GPUs has been directed to perform general computing tasks.

For tools that are GPU accelerated, the raster processing task is directed to the GPU instead of the Central Processing Unit (CPU). There are certain types of operations that benefit from this approach. In those cases, the software divides the processing task into many small portions, which are sent to the GPU for computation. The GPU then performs the calculations in parallel for all these small portions at a faster rate. The resulting data is sent back, and the software reassembles the individual components into a final complete product.

Supported GPU cards and drivers

There are different solutions available in the market for GPU processing. Currently, only NVIDIA GPUs with CUDA compute capability of version 3.0 or later are supported. Your system must have an appropriate card installed to have access to this capability.

To check the types of graphics card on a Windows computer, open the Device Manager of your system and expand Display Adaptors. The brand names and types of your graphics card are listed there. If you do not have an NVIDIA brand graphics card listed, you will not be able to access this capability and the tool will use CPU only.

If you have an NVIDIA graphics card, you need to check the type of the GPU installed on your system using the NVIDIA Control Panel:

  1. Right-click an empty area of your desktop. In the context menu, click NVIDIA Control Panel.
  2. In the control panel window, go to the Help menu and click System Information. All the NVIDIA graphics cards, their driver versions, and other properties is displayed.

Once you determine the type of NVIDIA GPU card, look up its CUDA compute capability from the NVIDIA help page for CUDA GPUs nvidia.com. In the relevant section, locate your specific GPU card and take note of the Compute Capability value listed for it. It must be 3.0 or higher to be supported by the tool.

When a GPU card is installed on a machine, it comes with a default driver. Before executing an analysis tool that uses a GPU, you must update your GPU card drivers to the latest available version from the NVIDIA driver update page nvidia.com.

GPU configuration

The tool will use only one GPU for computation. However, if your computer has only one GPU, it will be used both for display and for computation. In that scenario, a warning message will be reported at tool execution time indicating that the display may appear unresponsive. Therefore, for spatial analysis, it is recommended that you use two GPUs: one for display and the other for computation.

In the case of multiple GPUs in your system, the first GPU in the TCC (Tesla Compute Cluster) driver mode will be used by default. If there is no GPU available in the TCC driver mode, the first GPU (with index 0) will be used, unless specified otherwise. To specify a GPU or to disable it, see the following:

  • To use a different GPU, you can specify it through the system environment variable CUDA_VISIBLE_DEVICES. To do so, first create this environment variable if it doesn't already exist in your system. Then set its value to the index value (0 for the first one, 1 for the second one, and so on) that represents the GPU device you want to use, and restart your application.
  • If you do not want the analysis to use any of the GPU devices installed in your system, you can set the system environment variable CUDA_VISIBLE_DEVICES to -1 and restart your application. The tool will then execute using the CPU only.
  • To enable your tool to use a GPU device again, either delete the system environment variable CUDA_VISIBLE_DEVICES or set the value of this environment variable to the index value of the GPU device you want to use, and restart your application.

For more information on the environment variable CUDA_VISIBLE_DEVICES, see the CUDA Toolkit Programming Guide nvidia.com.

The following subsections describe recommended configuration steps for achieving optimal execution when using the GPU capability.

Set the TCC driver mode

For NVIDIA GPUs, the GPU used for computation should be set to use the TCC driver, rather than the default Windows Display Driver Model (WDDM) driver. TCC mode allows the GPU to operate more efficiently.

To enable the TCC driver mode, use the NVIDIA System Management Interface control program typically found at C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe. For example, the command 'nvidia-smi -dm 1 -i 2' switches the card with device id 2 to display mode 1 (TCC).

Note:

If you are running ArcGIS Server, the GPU used for computation must be in the TCC driver mode.

Disable the ECC mode

Disable the Error Correcting Code (ECC) mode for the GPU used for computation, since it reduces the memory available on the GPU.

To disable the ECC mode, use the NVIDIA System Management Interface (nvidia-smi) control program typically found at C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe. For example, the command 'nvidia-smi -e 0 -i 1' should disable the ECC mode for the GPU with device id 1.

Increase the TDR setting

If the GPU used for computation is in the WDDM driver mode, it’s possible for the Windows display device driver to reboot the GPU if any computation takes longer than a couple of seconds. This is known as Windows Timeout Detection and Recovery (TDR) condition. If this happens, the tool will fail to complete the execution, and a GPU error will be returned.

There is a modification you can make to a registry key, TdrDelay, to avoid this scenario. By setting it to an appropriate value (for example, 60 seconds), there will be time for a lengthy operation to complete before the TDR condition is triggered. On most Windows systems, the path to the TdrDelay key in the registry is HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\GraphicsDrivers. If the TdrDelay key does not exist, you must create it in this path. Note that when you create or change this registry value, you should make a backup of the registry first. You must reboot your machine for the change to take effect. The Microsoft Developers Network has more details on setting TDR Delay microsoft.com.

Caution:

Esri cannot be responsible for any system problems that may occur if the registry was improperly modified. Be sure to take appropriate steps to ensure that you have a valid registry backup to revert to should any problems be encountered, or have a qualified systems analyst perform the change.

Related topics