Skip to content

Commit

Permalink
update ci and initdevices logic (#618)
Browse files Browse the repository at this point in the history
Signed-off-by: limengxuan <[email protected]>
  • Loading branch information
archlitchi authored Nov 15, 2024
1 parent 7dc32d1 commit 1011ff1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/device/devices.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ func GetDevices() map[string]Devices {
func InitDevicesWithConfig(config *Config) {
devices = make(map[string]Devices)
DevicesToHandle = []string{}
devices[cambricon.CambriconMLUDevice] = cambricon.InitMLUDevice(config.CambriconConfig)
devices[nvidia.NvidiaGPUDevice] = nvidia.InitNvidiaDevice(config.NvidiaConfig)
devices[cambricon.CambriconMLUDevice] = cambricon.InitMLUDevice(config.CambriconConfig)
devices[hygon.HygonDCUDevice] = hygon.InitDCUDevice(config.HygonConfig)
devices[iluvatar.IluvatarGPUDevice] = iluvatar.InitIluvatarDevice(config.IluvatarConfig)
devices[mthreads.MthreadsGPUDevice] = mthreads.InitMthreadsDevice(config.MthreadsConfig)
Expand All @@ -105,6 +105,9 @@ func InitDevicesWithConfig(config *Config) {
}

func InitDevices() {
if len(devices) > 0 {
return
}
config, err := LoadConfig(configFile)
klog.Infoln("reading config=", config, "configfile=", configFile)
if err != nil {
Expand Down

0 comments on commit 1011ff1

Please sign in to comment.