File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ func DecodeContainerDevices(str string) (c ContainerDevices, count int) {
217217 devcores , _ := strconv .ParseInt (tmpstr [3 ], 10 , 32 )
218218 tmpdev .Usedcores = int32 (devcores )
219219 contdev = append (contdev , tmpdev )
220- klog .V (4 ).Infoln ("val=" , val )
220+ klog .V (4 ).Infoln ("val=" , val )
221221 }
222222 }
223223 //klog.V(4).Infoln("contdev=", contdev)
@@ -592,6 +592,12 @@ func LoadNvidiaConfig() *config.NvidiaConfig {
592592 klog .InfoS ("readFrom device cm error" , err .Error ())
593593 }
594594 klog .Infoln ("Loaded config=" , nvidiaConfig )
595+ // Sync the loaded config back to global variables so that
596+ // register.go and plugin.go can use the correct values
597+ config .DeviceSplitCount = nvidiaConfig .DeviceSplitCount
598+ config .DeviceCoresScaling = nvidiaConfig .DeviceCoreScaling
599+ config .GPUMemoryFactor = nvidiaConfig .GPUMemoryFactor
600+
595601 return & nvidiaConfig
596602}
597603
You can’t perform that action at this time.
0 commit comments