-
Notifications
You must be signed in to change notification settings - Fork 205
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
base: main
Are you sure you want to change the base?
Fake-gpu support #1846
Conversation
There was a problem hiding this 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 donemain()
too complex => maybe split WSL checks out, e.g. towslOptsOK()
and TestCDIDeviceInclusion
test fails, so it needs to be updated:
gpu_plugin_test.go:1202: Received device tree isn't expected
deployments/gpu_plugin/overlays/fractional_resources/kustomization.yaml
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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.
There was a problem hiding this 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!
Fakedev support still use same different sys and dev set by Path like /tmp in examples. if it is /tmp then /tmp/sys /tmp/dev are used, and that really is root cause of the issue here in api.go as it is using hard coded path /dev and accessing /dev/char/ where fake major:minor won't exist and then generates error this has happen also before so that pr won't change that without that change in api.go. But as said error won't really matter as normally fakedev user pods won't access any actual devices so it is just ugly and confusing info in the plugin log.
________________________________
From: Tuomas Katila ***@***.***>
Sent: Monday, September 30, 2024 8:18 AM
To: intel/intel-device-plugins-for-kubernetes ***@***.***>
Cc: Syrja, Harri ***@***.***>; Author ***@***.***>
Subject: Re: [intel/intel-device-plugins-for-kubernetes] Fake-gpu support (PR #1846)
@tkatila commented on this pull request.
________________________________
In pkg/deviceplugin/api.go<#1846 (comment)>:
- for _, node := range nodes {
- devPaths = append(devPaths, node.HostPath)
+ // If devPaths are provided, use them; otherwise, generate from nodes
+ if len(devPaths) > 0 && devPaths[0] != "" {
+ devPathsComputed = devPaths
Previously fakedev support used different sysfs and devfs directories. Can those be used to again to expose the fake dev-devices?
In general, I'm against this particular change as it changes the internal API with no real added functionality.
—
Reply to this email directly, view it on GitHub<#1846 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AV5AIMOSA3NW46CGMAT7QT3ZZDNJ7AVCNFSM6AAAAABOR26OM2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDGMZWGQYTAMJSHA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in Helsinki
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
|
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 |
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.