Skip to content

Commit

Permalink
Merge pull request #533 from elezar/rename-mps-capable
Browse files Browse the repository at this point in the history
Rename nvidia.com/sharing.mps.enabled to nvidia.com/mps.capable
  • Loading branch information
elezar authored Feb 21, 2024
2 parents 35c1393 + a42bda3 commit 4d9e794
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ spec:
{{- end }}
nodeSelector:
# We only deploy this pod if the following sharing label is applied.
nvidia.com/sharing.mps.enabled: "true"
nvidia.com/mps.capable: "true"
{{- with .Values.nodeSelector }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion internal/lm/nvml.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,6 @@ func newSharingLabeler(config *spec.Config) Labeler {
}

return Labels{
"nvidia.com/sharing.mps.enabled": strconv.FormatBool(mpsEnabled),
"nvidia.com/mps.capable": strconv.FormatBool(mpsEnabled),
}
}
10 changes: 5 additions & 5 deletions internal/lm/nvml_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@ func TestSharingLabeler(t *testing.T) {
{
descrition: "nil config",
expectedLabels: map[string]string{
"nvidia.com/sharing.mps.enabled": "false",
"nvidia.com/mps.capable": "false",
},
},
{
descrition: "empty config",
config: &spec.Config{},
expectedLabels: map[string]string{
"nvidia.com/sharing.mps.enabled": "false",
"nvidia.com/mps.capable": "false",
},
},
{
Expand All @@ -111,7 +111,7 @@ func TestSharingLabeler(t *testing.T) {
},
},
expectedLabels: map[string]string{
"nvidia.com/sharing.mps.enabled": "false",
"nvidia.com/mps.capable": "false",
},
},
{
Expand All @@ -128,7 +128,7 @@ func TestSharingLabeler(t *testing.T) {
},
},
expectedLabels: map[string]string{
"nvidia.com/sharing.mps.enabled": "false",
"nvidia.com/mps.capable": "false",
},
},
{
Expand All @@ -145,7 +145,7 @@ func TestSharingLabeler(t *testing.T) {
},
},
expectedLabels: map[string]string{
"nvidia.com/sharing.mps.enabled": "true",
"nvidia.com/mps.capable": "true",
},
},
}
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/gpu-feature-discovery_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ var _ = NVDescribe("GPU Feature Discovery", func() {
"nvidia.com/mig.capable": "[true|false]",
"nvidia.com/gpu.compute.major": "[0-9]+",
"nvidia.com/gpu.compute.minor": "[0-9]+",
"nvidia.com/sharing.mps.enabled": "[true|false]",
"nvidia.com/mps.capable": "[true|false]",
}

Context("When deploying GFD", Ordered, func() {
Expand Down
3 changes: 1 addition & 2 deletions tests/expected-output-mig-mixed.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,4 @@ nvidia\.com\/mig-[0-9]+g\.[0-9]+gb\.engines\.jpeg=[0-9]+
nvidia\.com\/mig-[0-9]+g\.[0-9]+gb\.engines\.ofa=[0-9]+
nvidia\.com\/mig-[0-9]+g\.[0-9]+gb\.slices\.gi=[0-9]+
nvidia\.com\/mig-[0-9]+g\.[0-9]+gb\.slices\.ci=[0-9]+
nvidia\.com\/sharing\.mps\.enabled=[true|false]

nvidia\.com\/mps\.capable=[true|false]
2 changes: 1 addition & 1 deletion tests/expected-output-mig-none.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ nvidia\.com\/gpu\.family=[a-z]+
nvidia\.com\/mig\.capable=[true|false]
nvidia\.com\/gpu\.compute\.major=[0-9]+
nvidia\.com\/gpu\.compute\.minor=[0-9]+
nvidia\.com\/sharing\.mps\.enabled=[true|false]
nvidia\.com\/mps\.capable=[true|false]
2 changes: 1 addition & 1 deletion tests/expected-output-mig-single.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ nvidia\.com\/gpu\.engines\.jpeg=[0-9]+
nvidia\.com\/gpu\.engines\.ofa=[0-9]+
nvidia\.com\/gpu\.slices\.gi=[0-9]+
nvidia\.com\/gpu\.slices\.ci=[0-9]+
nvidia\.com\/sharing\.mps\.enabled=[true|false]
nvidia\.com\/mps\.capable=[true|false]
2 changes: 1 addition & 1 deletion tests/expected-output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ nvidia\.com\/gpu\.family=[a-z]+
nvidia\.com\/mig\.capable=[true|false]
nvidia\.com\/gpu\.compute\.major=[0-9]+
nvidia\.com\/gpu\.compute\.minor=[0-9]+
nvidia\.com\/sharing\.mps\.enabled=[true|false]
nvidia\.com\/mps\.capable=[true|false]

0 comments on commit 4d9e794

Please sign in to comment.