-
Notifications
You must be signed in to change notification settings - Fork 527
Support for precompiled GDRCopy #2516
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -3140,8 +3140,8 @@ func transformGDRCopyContainer(obj *appsv1.DaemonSet, config *gpuv1.ClusterPolic | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| obj.Spec.Template.Spec.Containers = append(obj.Spec.Template.Spec.Containers[:i], obj.Spec.Template.Spec.Containers[i+1:]...) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return nil | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if config.Driver.UsePrecompiledDrivers() { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return fmt.Errorf("GDRCopy is not supported along with pre-compiled NVIDIA drivers") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if config.Driver.UsePrecompiledDrivers() && !config.GDRCopy.UsePrecompiledDrivers() { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return fmt.Errorf("GDRCopy is not supported along with pre-compiled NVIDIA drivers unless gdrcopy.usePrecompiled is also enabled") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| gdrcopyContainer := &obj.Spec.Template.Spec.Containers[i] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -3425,9 +3425,14 @@ func resolveDriverTag(n ClusterPolicyController, driverSpec interface{}) (string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| case *gpuv1.GDRCopySpec: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| spec := driverSpec.(*gpuv1.GDRCopySpec) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| image, err = gpuv1.ImagePath(spec) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if err != nil { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return "", err | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if spec.UsePrecompiledDrivers() { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // use per kernel version tag | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| image = spec.Repository + "/" + spec.Image + ":" + spec.Version + "-" + n.currentKernelVersion | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This assumes repository, image and version are all separately specified. Existing configuration supports providing full image reference in image with empty repository/version. gpu-operator/api/nvidia/v1/clusterpolicy_types.go Lines 2054 to 2083 in 5775206
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| image, err = gpuv1.ImagePath(spec) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if err != nil { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return "", err | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| default: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return "", fmt.Errorf("invalid type to construct image path: %v", v) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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.
Nvidiadriver reconciler still marks any
usePrecompiled: trueplus enabled GDRCopy as unsupported before it reaches the new precompiled-image logic. Thus spec.gdrcopy.usePrecompiled: true cannot work for NVIDIADriver resources.gpu-operator/controllers/nvidiadriver_controller.go
Line 156 in 5775206