Difference between revisions of "Mdev-GPU"
Line 30: | Line 30: | ||
=== Configuration === | === Configuration === | ||
The Mdev-GPU repository provides Systemd service and example configuration in the [https://github.com/Arc-Compute/Mdev-GPU/tree/master/etc /etc/ | The Mdev-GPU repository provides Systemd service and example configuration in the [https://github.com/Arc-Compute/Mdev-GPU/tree/master/etc /etc/ folder]. On installation the directories & files contained in the repository's /etc/ folder should be copied to the absolute path <code>/etc/</code> on the user's computer. | ||
==== Systemd ==== | ==== Systemd ==== | ||
GVM/Mdev-GPU exposes several of it's functions as Systemd services. | |||
As of the 0.1.0.0 release the following Systemd services are available: | |||
* '''mdev-post.service''' | |||
===== mdev-post.service ===== | |||
As the name would suggest '''[https://github.com/Arc-Compute/Mdev-GPU/blob/master/etc/systemd/system/mdev-post.service mdev-post.service]''' posts the GPU(s) in a state where they are ready to be virtualized. When the service is invoked the mdev-cli util registers Mdev callbacks and supported mediated device (Mdev) types with the Mediated Core according to the user's specified configuration at '''<code>/etc/gvm/mdev-gpu/generate-vgpu-types.yaml</code>'''. If you'd like to place your configuration file elsewhere and still have your configuration invoked on boot you can edit the systemd service [https://github.com/Arc-Compute/Mdev-GPU/blob/9993fd0781ddddfcca2cb9bee6455ea2c024cc23/etc/systemd/system/mdev-post.service#L10 ExecStart= line] to specify an alternative path. | |||
==== GVM/Mdev-GPU ==== | ==== GVM/Mdev-GPU ==== | ||
Configuration for Mdev-GPU can be found in the path '''<code>/etc/gvm/mdev-gpu/</code>'''. This path will by default contain the file <code>'''generate-vgpu-types.yaml'''</code> 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 [https://github.com/mdevctl/mdevctl mdevctl]. Once you have configured the available types your liking you can refresh the supported types registered with the [https://openmdev.io/index.php/Virtual_IO_Internals#Mediated_Core Mediated Core] by restarting the '''mdev-post.service''' or by manually invoking mdev-cli. | Configuration for Mdev-GPU can be found in the path '''<code>/etc/gvm/mdev-gpu/</code>'''. This path will by default contain the file <code>'''generate-vgpu-types.yaml'''</code> 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 [https://github.com/mdevctl/mdevctl mdevctl]. Once you have configured the available types your liking you can refresh the supported types registered with the [https://openmdev.io/index.php/Virtual_IO_Internals#Mediated_Core Mediated Core] by restarting the '''mdev-post.service''' or by manually invoking mdev-cli. | ||
===== generate-vgpu-types.yaml ===== |
Revision as of 19:27, 2 August 2022
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/ folder. On installation the directories & files contained in the repository's /etc/ folder should be copied to the absolute path /etc/
on the user's computer.
Systemd
GVM/Mdev-GPU exposes several of it's functions as Systemd services.
As of the 0.1.0.0 release the following Systemd services are available:
- mdev-post.service
mdev-post.service
As the name would suggest mdev-post.service posts the GPU(s) in a state where they are ready to be virtualized. When the service is invoked the mdev-cli util registers Mdev callbacks and supported mediated device (Mdev) types with the Mediated Core according to the user's specified configuration at /etc/gvm/mdev-gpu/generate-vgpu-types.yaml
. If you'd like to place your configuration file elsewhere and still have your configuration invoked on boot you can edit the systemd service ExecStart= line to specify an alternative path.
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.