Skip to content

Commit

Permalink
resource: Fix resourceLabeler's sharingDisabled to check if a strateg…
Browse files Browse the repository at this point in the history
…y is defined
  • Loading branch information
danielkleinstein committed Oct 28, 2024
1 parent 9c0e0df commit 39063d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/lm/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ func (rl resourceLabeler) getReplicas() int {
// sharingDisabled checks whether the resourceLabeler has sharing disabled
// TODO: The nil check here is because we call NewGPUResourceLabeler with a nil config when sharing is disabled.
func (rl resourceLabeler) sharingDisabled() bool {
return rl.sharing == nil
return rl.sharing == nil || (rl.sharing.SharingStrategy() == spec.SharingStrategyNone)
}

// isShared checks whether the resource is shared.
Expand Down

0 comments on commit 39063d1

Please sign in to comment.