Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/agent/qrm-plugins/gpu/baseplugin/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ func NewBasePlugin(

// Run starts the asynchronous tasks of the plugin
func (p *BasePlugin) Run(stopCh <-chan struct{}) {
go p.DeviceTopologyRegistry.Run(stopCh)
go func() {
select {
case <-p.stateInitializedCh:
Expand All @@ -108,7 +109,6 @@ func (p *BasePlugin) Run(stopCh <-chan struct{}) {
return
}
}()
go p.DeviceTopologyRegistry.Run(stopCh)
}

// GetState may return a nil state because the state is only initialized when InitState is called.
Expand Down
2 changes: 2 additions & 0 deletions pkg/agent/qrm-plugins/gpu/staticpolicy/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ func (p *StaticPolicy) Start() (err error) {
periodicalhandler.ReadyToStartHandlersByGroup(appqrm.QRMGPUPluginPeriodicalHandlerGroupName)
}, 5*time.Second, p.stopCh)

p.BasePlugin.Run(p.stopCh)

return nil
}

Expand Down
7 changes: 6 additions & 1 deletion pkg/util/machine/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,12 @@ func (r *DeviceTopologyRegistry) GetLatestDeviceTopology(deviceNames []string) (
return nil, err
}

return PickLatestDeviceTopology(topologiesMap), nil
latestTopology := PickLatestDeviceTopology(topologiesMap)
if latestTopology == nil {
return nil, fmt.Errorf("no latest device topology")
}

return latestTopology, nil
}

// GetDeviceNUMAAffinity retrieves a map of a certain device A to the list of devices in device B that it has an affinity with.
Expand Down
Loading