|
| 1 | +From 0ae23f93ef41d348a489e9dd2fbc76ef0468005e Mon Sep 17 00:00:00 2001 |
| 2 | +From: Evan Lezar < [email protected]> |
| 3 | +Date: Mon, 10 Mar 2025 14:44:45 +0200 |
| 4 | +Subject: [PATCH] Ensure that generated CDI specs do not contain |
| 5 | + enable-cuda-compat hooks |
| 6 | + |
| 7 | +Signed-off-by: Evan Lezar < [email protected]> |
| 8 | +--- |
| 9 | + internal/cdi/cdi.go | 4 ++++ |
| 10 | + 1 file changed, 4 insertions(+) |
| 11 | + |
| 12 | +diff --git a/internal/cdi/cdi.go b/internal/cdi/cdi.go |
| 13 | +index 2b3761d9..810e4395 100644 |
| 14 | +--- a/internal/cdi/cdi.go |
| 15 | ++++ b/internal/cdi/cdi.go |
| 16 | +@@ -126,6 +126,8 @@ func New(infolib info.Interface, nvmllib nvml.Interface, devicelib device.Interf |
| 17 | + nvcdi.WithDeviceNamers(deviceNamer), |
| 18 | + nvcdi.WithVendor(c.vendor), |
| 19 | + nvcdi.WithClass("gpu"), |
| 20 | ++ // TODO: This should be removed once the use of a NVIDIA Container Toolkit >= v1.17.5 is commonplace. |
| 21 | ++ nvcdi.WithDisabledHook(nvcdi.HookEnableCudaCompat), |
| 22 | + ) |
| 23 | + if err != nil { |
| 24 | + return nil, fmt.Errorf("failed to create nvcdi library: %v", err) |
| 25 | +@@ -154,6 +156,8 @@ func New(infolib info.Interface, nvmllib nvml.Interface, devicelib device.Interf |
| 26 | + nvcdi.WithDevRoot(c.devRoot), |
| 27 | + nvcdi.WithVendor(c.vendor), |
| 28 | + nvcdi.WithMode(mode), |
| 29 | ++ // TODO: This should be removed once the use of a NVIDIA Container Toolkit >= v1.17.5 is commonplace. |
| 30 | ++ nvcdi.WithDisabledHook(nvcdi.HookEnableCudaCompat), |
| 31 | + ) |
| 32 | + if err != nil { |
| 33 | + return nil, fmt.Errorf("failed to create nvcdi library: %v", err) |
| 34 | +-- |
| 35 | +2.51.0 |
| 36 | + |
0 commit comments