GPU interface

The GPU interface enables GPU pass-through (direct access to the host system’s GPUs) inside the workshop to improve the performance of GPU-intensive applications.

By using the interface, the SDK publisher allows the workshop to directly access the host’s GPU devices, which may be required for various GPU-intensive workloads.

GPU interface plug

An essential element here is the GPU interface plug, which is declared in the SDK definition.

Its structure includes just the name of the plug and the interface; both must be set to gpu.

Defining the plug in an SDK allows the workshops using this SDK to directly access the host’s GPU devices, which may be required for various GPU-intensive workloads.

GPU interface slot

To let SDKs in a workshop access the host’s GPUs, Workshop provides a GPU interface slot that multiple GPU interface plugs can access.

When the SDK is installed at runtime during launch and refresh operations, Workshop checks that the plug targeting the slot passes validation; if it does, it can be connected.

Connection

The interface is connected automatically at launch or refresh, provided that the plug can be matched to the slot by its name or via a connections entry in the definition, both subject to Workshop’s validation rules.

After the workshop has started, the workshop connect and workshop disconnect commands can be used to manage the connection manually.

Establishing a connection means the host’s GPUs are directly available inside the workshop via the GPU pass-through mechanism.

To check if the interface is connected:

$ workshop connections --all

  INTERFACE  PLUG            SLOT           NOTES
  ...
  gpu        ws/gpu-sdk:gpu  ws/system:gpu  -

This means the host’s GPUs are directly available inside the workshop:

$ workshop shell ws
workshop@ws-8584e571$ ls -h /dev/dri/

  card0  renderD128

workshop@ws-8584e571$ nvidia-smi

See also

Explanation:

Reference: