@@ -58,8 +58,6 @@ func (a *GPUManager) Init() error {
5858// Discover implements the Discover function of the GPUManager interface
5959func (a * GPUManager ) Discover () error {
6060
61- log .G (a .Ctx ).Info ("Discovering GPUs..." )
62-
6361 count , ret := nvml .DeviceGetCount ()
6462 if ret != nvml .SUCCESS {
6563 return fmt .Errorf ("Unable to get device count: %v" , nvml .ErrorString (ret ))
@@ -92,21 +90,19 @@ func (a *GPUManager) Discover() error {
9290
9391 // print the GPUSpecsList if the length is greater than 0
9492 if len (a .GPUSpecsList ) > 0 {
95- log .G (a .Ctx ).Info ("Discovered GPUs:" )
93+ log .G (a .Ctx ).Info ("\u2705 Discovered GPUs:" )
9694 for _ , gpuSpec := range a .GPUSpecsList {
97- log .G (a .Ctx ).Info (fmt .Sprintf ("Name: %s, UUID: %s, Type: %s, Available: %t, Index: %d" , gpuSpec .Name , gpuSpec .UUID , gpuSpec .Type , gpuSpec .Available , gpuSpec .Index ))
95+ log .G (a .Ctx ).Info (fmt .Sprintf ("\u2705 Name: %s, UUID: %s, Type: %s, Available: %t, Index: %d" , gpuSpec .Name , gpuSpec .UUID , gpuSpec .Type , gpuSpec .Available , gpuSpec .Index ))
9896 }
9997 } else {
100- log .G (a .Ctx ).Info ("No GPUs discovered" )
98+ log .G (a .Ctx ).Info (" \u2705 No GPUs discovered" )
10199 }
102100
103101 return nil
104102}
105103
106104func (a * GPUManager ) Check () error {
107105
108- log .G (a .Ctx ).Info ("Checking the availability of GPUs..." )
109-
110106 cli , err := client .NewEnvClient ()
111107 if err != nil {
112108 return fmt .Errorf ("unable to create a new Docker client: %v" , err )
@@ -148,9 +144,9 @@ func (a *GPUManager) Check() error {
148144 // print the GPUSpecsList that are not available
149145 for _ , gpuSpec := range a .GPUSpecsList {
150146 if ! gpuSpec .Available {
151- log .G (a .Ctx ).Info (fmt .Sprintf ("GPU with UUID %s is not available. It is in use by container %s" , gpuSpec .UUID , gpuSpec .ContainerID ))
147+ log .G (a .Ctx ).Info (fmt .Sprintf ("\u274C GPU with UUID %s is not available. It is in use by container %s" , gpuSpec .UUID , gpuSpec .ContainerID ))
152148 } else {
153- log .G (a .Ctx ).Info (fmt .Sprintf ("GPU with UUID %s is available" , gpuSpec .UUID ))
149+ log .G (a .Ctx ).Info (fmt .Sprintf ("\u2705 GPU with UUID %s is available" , gpuSpec .UUID ))
154150 }
155151 }
156152
@@ -159,8 +155,6 @@ func (a *GPUManager) Check() error {
159155
160156func (a * GPUManager ) Shutdown () error {
161157
162- log .G (a .Ctx ).Info ("Shutting down NVML..." )
163-
164158 ret := nvml .Shutdown ()
165159 if ret != nvml .SUCCESS {
166160 return fmt .Errorf ("Unable to shutdown NVML: %v" , nvml .ErrorString (ret ))
@@ -193,8 +187,6 @@ func (a *GPUManager) Assign(UUID string, containerID string) error {
193187
194188func (a * GPUManager ) Release (containerID string ) error {
195189
196- log .G (a .Ctx ).Info ("Releasing GPU from container " + containerID )
197-
198190 a .GPUSpecsMutex .Lock ()
199191 defer a .GPUSpecsMutex .Unlock ()
200192
@@ -210,8 +202,6 @@ func (a *GPUManager) Release(containerID string) error {
210202 }
211203 }
212204
213- log .G (a .Ctx ).Info ("Correctly released GPU from container " + containerID )
214-
215205 return nil
216206}
217207
@@ -252,8 +242,6 @@ func (a *GPUManager) GetAndAssignAvailableGPUs(numGPUs int, containerID string)
252242// dump the GPUSpecsList into a JSON file
253243func (a * GPUManager ) Dump () error {
254244
255- log .G (a .Ctx ).Info ("Dumping the GPUSpecsList into a JSON file..." )
256-
257245 // Convert the array to JSON format
258246 jsonData , err := json .MarshalIndent (a .GPUSpecsList , "" , " " )
259247 if err != nil {
0 commit comments