Open topic with navigation

# Enable GPU Acceleration

Media Server can use a graphics card (GPU) to perform some processing tasks. Using a GPU rather than the CPU can significantly increase the speed of training and analysis tasks that use Convolutional Neural Networks.

Tasks that benefit from a GPU are:

- Image classification.
- Face demographics analysis.
- Face recognition.
- Object class recognition.
- Vehicle make recognition.

## GPU Requirements

To accelerate processing by using a GPU, your system must have a NVIDIA graphics card with CUDA compute capability version 3.0 to 6.1 (Kepler, Maxwell, and Pascal micro-architecture). All Quadro and Tesla series cards that meet this requirement are supported. GeForce GTX series cards that meet this requirement are supported, but only with headless Linux operating systems. Tegra series cards are not supported, but you can request support by contacting Micro Focus. Media Server has been tested with NVIDIA Quadro K6000, Quadro M6000, and Tesla K80 graphics cards.

The number and size of concurrent tasks that you can run on the GPU is constrained by the amount of memory available on the graphics card. To achieve the best performance, the amount of memory in the machine must match or exceed the amount of RAM available on the GPU(s). For example, if you have two GPUs and each has 12 GB RAM, the machine must have at least 24 GB RAM to use the full performance of the GPUs.

Only one Media Server can use each GPU. To run several instances of Media Server with GPU support on the same physical machine, the machine must have multiple GPUs. In the configuration file for each Media Server, you must set the `GPUDeviceID` parameter to specify which GPU to use (set this parameter to a different value for each Media Server).

If you are installing Media Server on a virtual machine, the virtual machine might need additional configuration to use the GPU successfully.

## Install Media Server

Install Media Server as described in one of the following sections:

- Install Media Server on Windows
- Install Media Server on UNIX
- Install Media Server from the ZIP Package

NOTE:

If you install GPU Media Server on Ubuntu, Micro Focus recommends that you install a headless version of Ubuntu server.

## Install the NVIDIA CUDA Driver

To use GPU acceleration, you must install the NVIDIA CUDA driver:

- version 376.51 or later on Linux.
- version 375.26 or later on Windows.

This can be installed independently, or by installing the CUDA toolkit version 8.0. Micro Focus recommends installing the driver only because this is easier and faster, and only installs the required components.

To install the NVIDIA CUDA driver on Windows

- Download the driver from http://www.nvidia.co.uk/Download/index.aspx?lang=en-uk. If asked to choose a "Download Type", select "Optimal Driver for Enterprise" because this option provides stable, supported drivers. After downloading the driver, run the installation program as an administrator, and follow the on-screen instructions.

To install the NVIDIA CUDA driver on Linux

1. Verify that your machine is running a supported operating system. Run the following command:

       lsb_release -a

   The operating system is described:

       Distributor ID: Ubuntu
       Description:    Ubuntu 14.04.3 LTS
       Release:        14.04
       Codename:       trusty

2. Verify that a CUDA-compatible card is available. Run the following command:

       lspci | grep -i nvidia | grep -i VGA

   This should produce output similar to:

       0f:00.0 VGA compatible controller: NVIDIA Corporation GF106GL [Quadro 2000] (rev a1)
       28:00.0 VGA compatible controller: NVIDIA Corporation GK110GL [Quadro K6000] (rev a1)

   You must verify that one or more of these GPUs support CUDA Compute Capability version 3.0 to 6.1. In the previous example, the Quadro 2000 GPU is not supported.

3. Install the essential utilities required to install the NVIDIA driver, by running the following command.

       sudo apt-get install build-essential

4. Install the NVIDIA driver by running the following commands.

       sudo apt-get purge nvidia*
       sudo add-apt-repository ppa:graphics-drivers/ppa
       sudo apt-get update
       sudo apt-get install nvidia-376
       sudo reboot

5. Verify that the driver installation was successful by running the `nvidia-smi` command. The driver version must be reported as the following version (or later):

       376.51

## Configure the GPU (Windows only)

Perform this step only if you are running Media Server on Windows. This step is not necessary on Linux.

To use a GPU to accelerate Media Server processing tasks, you must place the GPU in TCC mode. In this mode the graphics card is used for computation only and does not provide output for a display. Unless you use TCC mode, the GPU does not provide adequate performance and can be slower than using a CPU. Many GPUs are not in TCC mode by default, so you must place the card in TCC mode using the `nvidia-smi` tool.

## Configure Media Server

To configure Media Server to use a GPU

1. Open the Media Server configuration file in a text editor.

2. In the `[Server]` section, set the following configuration parameters:

   `CUDAVersion` | Specifies whether to enable GPU support and which CUDA version to use. Set this parameter to `8`.
   `GPUDeviceID` | (Optional) If the server has more than one GPU, set this parameter to the device ID of the GPU to use. You can find the device ID for each graphics card in the application log when Media Server starts. To find out which GPU device ID corresponds to which GPU, match the PCI Bus ID logged by Media Server to the PCI Bus ID output by the `nvidia-smi` command, which also provides the GPU name.

   For example:

       [Server]
       ...
       CUDAVersion=8

3. Save and close the configuration file.

## Verify that Media Server is Using the GPU

To determine whether Media Server is using a GPU, start Media Server and open the application log. The log should show the following after Media Server starts:

    GPU devices available for use
    GPU deviceID 0 (Hex PCIBusId: ..)
    GPU deviceID 1 (Hex PCIBusId: ..)
    GPU deviceID 2 (Hex PCIBusId: ..)
    GPU deviceID 3 (Hex PCIBusId: ..)
    GPU mode used for MediaServer
    GPU Memory: ... bytes free ... bytes total
    GPU deviceID currently used: 2 (Hex PCIBusId: ..)

If installation was unsuccessful, Media Server does not start and logs the reason to the application log.

© 2018 Micro Focus or one of its affiliates | Send documentation feedback to Micro Focus Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm