Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fake-gpu support #1846

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Conversation

hsyrjaos
Copy link

This adds fake-gpu support to gpu-device plugin. With this any cluster running gpu-plugin could be batch to support fake-gpus.
This fixes also one bug related pkg/deviceplugin/api.go /sys/dev/char access which was hard coded to /sys.
pkg/fakedri/fakedir.go is copy from cmd/gpu_fakedev/gpu_fakedev.go only modified to usable as a package and klog support added.

Copy link
Contributor

@eero-t eero-t left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

golangci-lint has couple of complaints:

  • gofmt -s not done
  • main() too complex => maybe split WSL checks out, e.g. to wslOptsOK()

and TestCDIDeviceInclusion test fails, so it needs to be updated:
gpu_plugin_test.go:1202: Received device tree isn't expected

Copy link
Contributor

@tkatila tkatila left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR includes xpumanager_sidecar binary.

Copy link
Contributor

@tkatila tkatila left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR includes xpumanager_sidecar binary!

@hsyrjaos
Copy link
Author

hsyrjaos commented Sep 30, 2024 via email

@tkatila
Copy link
Contributor

tkatila commented Sep 30, 2024

I'd check the code one more time if I were you. The functions that generate the device spec files should take into account the prefix. So if the fake devices/files are properly created they should be used without issues.

@hsyrjaos hsyrjaos requested a review from tkatila October 4, 2024 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants