Skip to content

Commit

Permalink
fix(inventory): fix copy-paste error when matching gpu interface (#224)
Browse files Browse the repository at this point in the history
Signed-off-by: Artur Troian <[email protected]>
  • Loading branch information
troian authored Mar 28, 2024
1 parent 442dec2 commit f83ea24
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cluster/kube/operators/clients/inventory/inventory.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ func tryAdjustGPU(rp *inventoryV1.GPU, res *types.GPU, sparams *crd.SchedulerPar
}

if attr != nil {
if attr.RAM != "" && attr.RAM != info.MemorySize {
if (attr.RAM != "") && (attr.RAM != info.MemorySize) {
continue
}

if attr.Interface != "" && attr.RAM != info.Interface {
if (attr.Interface != "") && (attr.Interface != info.Interface) {
continue
}
}
Expand Down
4 changes: 2 additions & 2 deletions cluster/types/v1beta3/clients/inventory/inventory.go
Original file line number Diff line number Diff line change
Expand Up @@ -387,11 +387,11 @@ func tryAdjustGPU(rp *inventoryV1.GPU, res *types.GPU, sparams *crd.SchedulerPar
}

if attr != nil {
if attr.RAM != "" && attr.RAM != info.MemorySize {
if (attr.RAM != "") && (attr.RAM != info.MemorySize) {
continue
}

if attr.Interface != "" && attr.RAM != info.Interface {
if (attr.Interface != "") && (attr.Interface != info.Interface) {
continue
}
}
Expand Down

0 comments on commit f83ea24

Please sign in to comment.