Skip to content

Commit

Permalink
Merge pull request #3924 from archlitchi/fixNPE
Browse files Browse the repository at this point in the history
fix NPU issue on vc-scheduler
  • Loading branch information
volcano-sh-bot authored Dec 28, 2024
2 parents 8b08e85 + 10a3311 commit 5b817b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/scheduler/api/devices/nvidia/vgpu/device_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func NewGPUDevices(name string, node *v1.Node) *GPUDevices {
return nil
}
nodedevices := decodeNodeDevices(name, annos)
if len(nodedevices.Device) == 0 {
if (nodedevices == nil) || len(nodedevices.Device) == 0 {
return nil
}
for _, val := range nodedevices.Device {
Expand Down

0 comments on commit 5b817b1

Please sign in to comment.