Mdev-GPU

From Open-IOV
Jump to navigation Jump to search

This page makes use of terms that are defined in the OpenMdev Glossary.

If you're curious what a given term means you can check there for a definition.


This page will be used to document the internals of the Mdev-GPU package.

Currently Mdev-GPU supports registering mediated callbacks with the Mediated Core and the creation of arbitrary mdev devices.

Mdev-GPU's source code can be found here.

Module docs can be found here.

Compilation

Compiling Mdev-GPU from source is very simple however it can take a long time to complete (10 minutes for existing sources).

If you'd like to compile Mdev-GPU yourself you can do so by cloning the repo and running the following two commands from within the repository directory:

curl -sSL https://get.haskellstack.org/ | sh

stack install

These commands will generate all binaries provided by Mdev-GPU under the path ~/.local/bin/.

If you would prefer not to wait for the program to compile you can find pre-compiled x86_64 binaries under the Releases section of the repository on GitHub.

Installation

The binaries compiled on your local machine by Stack in the ~/.local/bin/ path or downloaded from Releases on GitHub should be copied to /usr/bin/. This can be accomplished both via install script (currently testing in LibVF.IO) or via management layer-agnostic package.

Configuration

The Mdev-GPU repository provides Systemd service and example configuration in the /etc/ path. On installation the /etc/ files should be copied to the user's computer in the same path.

Systemd

GVM/Mdev-GPU

Configuration for Mdev-GPU can be found in the path /etc/gvm/mdev-gpu/. This path will by default contain the file generate-vgpu-types.yaml which you can configure to specify your desired Virtual GPU (vGPU) topologies as they are presented in the sysfsdev mdev_bus path and as seen by tools such as mdevctl. Once you have configured the available types your liking you can refresh the supported types registered with the Mediated Core by restarting the mdev-post.service or by manually invoking mdev-cli.