From 04736444a95a2585502599fd970102bc78ee5e38 Mon Sep 17 00:00:00 2001 From: Bianco95 Date: Mon, 22 Apr 2024 14:36:36 +0200 Subject: [PATCH] Revert "updated error handling with NVIDIA drivers are not available" This reverts commit 9abb59f15148e3d1afacbf060d713aa03e1fbd8a. --- pkg/docker/gpustrategies/NvidiaHandler.go | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/pkg/docker/gpustrategies/NvidiaHandler.go b/pkg/docker/gpustrategies/NvidiaHandler.go index 5a39120..5c454f0 100644 --- a/pkg/docker/gpustrategies/NvidiaHandler.go +++ b/pkg/docker/gpustrategies/NvidiaHandler.go @@ -30,7 +30,6 @@ type GPUManager struct { GPUSpecsMutex sync.Mutex // Mutex to make GPUSpecsList access atomic Vendor string Ctx context.Context - NVMLstatus bool } type GPUManagerInterface interface { @@ -50,10 +49,8 @@ func (a *GPUManager) Init() error { ret := nvml.Init() if ret != nvml.SUCCESS { - a.NVMLstatus = false return fmt.Errorf("Unable to initialize NVML") } - a.NVMLstatus = true return nil } @@ -61,10 +58,6 @@ func (a *GPUManager) Init() error { // Discover implements the Discover function of the GPUManager interface func (a *GPUManager) Discover() error { - if !a.NVMLstatus { - return fmt.Errorf("NVML is not initialized") - } - log.G(a.Ctx).Info("Discovering GPUs...") count, ret := nvml.DeviceGetCount() @@ -112,10 +105,6 @@ func (a *GPUManager) Discover() error { func (a *GPUManager) Check() error { - if !a.NVMLstatus { - return fmt.Errorf("NVML is not initialized") - } - log.G(a.Ctx).Info("Checking the availability of GPUs...") cli, err := client.NewEnvClient() @@ -170,10 +159,6 @@ func (a *GPUManager) Check() error { func (a *GPUManager) Shutdown() error { - if !a.NVMLstatus { - return fmt.Errorf("NVML is not initialized") - } - log.G(a.Ctx).Info("Shutting down NVML...") ret := nvml.Shutdown()