SmartFace GPU acceleration in Windows

Some services can benefit from GPU acceleration, which can be enabled in services, but also some prerequisites needs to be met on host machine.

Prerequisites installer contains cuDNN and TensorRT libraries, that are essential for using ONNX (Open Neural Network Exchange)


To use GPU acceleration, you will need to have the following on the docker host machine:


Please note that GPU acceleration is supported only on NVIDIA GPUs.

HW decoding

There is no support for HW decoding of video streams in Windows. All streams are decoded using CPU.

Neural Networks processing GPU support

SmartFace is capable of leveraging GPU to speed up biometric operations. We supports only CUDA enabled graphic cards (more VRAM memory the better).

GPU utilization can be configured via configuration files, environment variables and command line arguments. The default configuration section is:

"Gpu": {
"GpuEnabled": false,
"GpuDeviceIndex": 0,
"GpuNeuralRuntime": "Default"
}

The configuration can be set differently for each SF process (service) which enabled the configuration to match specific needs of any deployment.

Property

Values

Description

GpuEnabled

boolean (true, false)

Configures if Gpu should be utilized when neural runtime is set to default. Note that setting this property to true and not having GPU available will cause SF to not start properly

GpuDeviceIndex

integer (starting at 0)

Configures which Gpu device should be utilized. This can be used when the machine that runs SF has multiple GPU devices, as a single process and only utilize single Gpu device. Currently only relevant when using Default neural runtime

GpuNeuralRuntime

"Default", "Cuda", "Tensor"

Configures different neural network acceleration runtimes. Will only take effect when GpuEnabled is set to true. Note that runtimes other then default need to be supported by your Gpu device

During installation on windows the installers asks whether to install Gpu services. If this option is checked, then services with Gpu suffix are registered and configured to utilize Gpu


Use Tensor value only if your GPU supports tensor runtime.