Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ jobs:
image:
- intel-fpga-admissionwebhook
- intel-fpga-initcontainer
- intel-gpu-fakedev
- intel-gpu-initcontainer
- intel-gpu-plugin
- intel-fpga-plugin
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ cmd/fpga_crihook/fpga_crihook
cmd/dlb_plugin/dlb_plugin
cmd/fpga_plugin/fpga_plugin
cmd/fpga_tool/fpga_tool
cmd/gpu_fakedev/gpu_fakedev
cmd/gpu_nfdhook/gpu_nfdhook
cmd/gpu_plugin/gpu_plugin
cmd/iaa_plugin/iaa_plugin
Expand All @@ -32,4 +33,4 @@ _build
_work

*.tgz
charts/operator/crds
charts/operator/crds
8 changes: 8 additions & 0 deletions build/docker/templates/intel-gpu-fakedev.Dockerfile.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#define _ENTRYPOINT_ /usr/local/bin/intel_gpu_fakedev
ARG CMD=gpu_fakedev

#include "default_plugin.docker"

LABEL name='intel-gpu-fakedev'
LABEL summary='Fake device file generator for Intel® GPU plugin'
LABEL description='Fake device file generator provides fake sysfs+devfs content for Intel GPU plugin from its initcontainer, for scalability testing'
47 changes: 47 additions & 0 deletions cmd/gpu_fakedev/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Fake (GPU) device file generator

Table of Contents
* [Introduction](#introduction)
* [Configuration](#configuration)
* [Potential improvements](#potential-improvements)
* [Related tools](#related-tools)

## Introduction

This is a tool for generating (large number of) fake device files for
k8s device scheduling scalability testing. But it can also be used
just to test (GPU) device plugin functionality without having
corresponding device HW.

Its "intel-gpu-fakedev" container is intended to be run as first init
container in a device plugin pod, so that device plugin (and its NFD
labeler) see the fake (sysfs + devfs) files generated by the tool,
instead of real host sysfs and devfs content.

## Configuration

[Configs](configs/) subdirectory contains example JSON configuration
file(s) for the generator. Currently there's only one example JSON
file, but each new device variant adding feature(s) that have specific
support in device plugin, could have their own fake device config.

## Potential improvements

If support for mixed device environment is needed, tool can be updated
to use node / configuration file mapping. Such mappings could be e.g.
in configuration files themselves as node name include / exlude lists,
and tool would use first configuration file matching the node it's
running on. For now, one would need to use different pod / config
specs for different nodes to achieve that...

Currently JSON config file options and the generated files are tied to
what GPU plugin uses, but if needed, they could be changed to fake
also sysfs + devfs device files used by other plugins.

## Related tools

[fakedev-exporter](#https://github.com/intel/fakedev-exporter) project
can be used to schedule suitably configured fake workloads on the fake
devices, and to provide provide fake activity metrics for them to
Prometheus, that look like they were reported by real Prometheus
metric exporters for real workloads running on real devices.
8 changes: 8 additions & 0 deletions cmd/gpu_fakedev/configs/8x-DG1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Info": "8x 4 GiB DG1 [Iris Xe MAX Graphics] GPUs",
"DevCount": 8,
"DevMemSize": 4294967296,
"Capabilities": {
"platform": "fake_DG1",
}
}
Loading