Skip to content

Commit

Permalink
Rename nvidia.com/sharing.mps.enabled to nvidia.com/mps.capable
Browse files Browse the repository at this point in the history
Signed-off-by: Evan Lezar <[email protected]>
  • Loading branch information
elezar committed Feb 19, 2024
1 parent c469c54 commit 500c5dd
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 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
32 changes: 16 additions & 16 deletions tests/e2e/gpu-feature-discovery_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,22 @@ var _ = NVDescribe("GPU Feature Discovery", func() {
f := framework.NewFramework("gpu-feature-discovery")

expectedLabelPatterns := k8sLabels{
"nvidia.com/gfd.timestamp": "[0-9]{10}",
"nvidia.com/cuda.driver.major": "[0-9]+",
"nvidia.com/cuda.driver.minor": "[0-9]+",
"nvidia.com/cuda.driver.rev": "[0-9]*",
"nvidia.com/cuda.runtime.major": "[0-9]+",
"nvidia.com/cuda.runtime.minor": "[0-9]+",
"nvidia.com/gpu.machine": ".*",
"nvidia.com/gpu.count": "[0-9]+",
"nvidia.com/gpu.replicas": "[0-9]+",
"nvidia.com/gpu.product": "[A-Za-z_-]+",
"nvidia.com/gpu.memory": "[0-9]+",
"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/gfd.timestamp": "[0-9]{10}",
"nvidia.com/cuda.driver.major": "[0-9]+",
"nvidia.com/cuda.driver.minor": "[0-9]+",
"nvidia.com/cuda.driver.rev": "[0-9]*",
"nvidia.com/cuda.runtime.major": "[0-9]+",
"nvidia.com/cuda.runtime.minor": "[0-9]+",
"nvidia.com/gpu.machine": ".*",
"nvidia.com/gpu.count": "[0-9]+",
"nvidia.com/gpu.replicas": "[0-9]+",
"nvidia.com/gpu.product": "[A-Za-z_-]+",
"nvidia.com/gpu.memory": "[0-9]+",
"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/mps.capable": "[true|false]",
}

Context("When deploying GFD", Ordered, func() {
Expand Down

0 comments on commit 500c5dd

Please sign in to comment.