Skip to content

Commit e516e00

Browse files
committed
Test MOAR GPU stuff
Signed-off-by: Davanum Srinivas <[email protected]>
1 parent 08e6500 commit e516e00

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

test/e2e/node/gpu.go

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,9 @@ var _ = SIGDescribe(feature.GPUDevicePlugin, framework.WithSerial(), "Sanity tes
6161
podClient = e2epod.NewPodClient(f)
6262
})
6363

64-
f.It("should run nvidia-smi cli", func(ctx context.Context) {
64+
f.It("should run nvidia-smi and cuda-demo-suite", func(ctx context.Context) {
6565
SetupEnvironmentAndSkipIfNeeded(ctx, f, f.ClientSet)
6666
pod := testNvidiaCLIPod()
67-
pod.Spec.Containers[0].Command = []string{"nvidia-smi"}
6867

6968
ginkgo.By("Creating a pod that runs nvidia-smi")
7069
createAndValidatePod(ctx, f, podClient, pod)
@@ -103,6 +102,8 @@ var _ = SIGDescribe(feature.GPUDevicePlugin, framework.WithSerial(), "Test using
103102
framework.ExpectNoError(err)
104103

105104
ginkgo.By("Checking output from nvidia-smi")
105+
framework.Logf("Got container logs for %s:\n%v", pod.Spec.Containers[0].Name, log)
106+
106107
gomega.Expect(log).To(gomega.ContainSubstring("TensorFlow version"))
107108
gomega.Expect(log).To(gomega.ContainSubstring("Matrix multiplication result:"))
108109
gomega.Expect(log).To(gomega.ContainSubstring("Time taken for 5000x5000 matrix multiplication"))
@@ -178,7 +179,20 @@ func testNvidiaCLIPod() *v1.Pod {
178179
Containers: []v1.Container{
179180
{
180181
Name: "nvidia-smi",
181-
Image: "nvidia/cuda:12.3.2-runtime-ubuntu22.04",
182+
Image: "nvidia/cuda:12.5.0-devel-ubuntu22.04",
183+
Command: []string{
184+
"bash",
185+
"-c",
186+
`
187+
nvidia-smi
188+
apt-get update -y && \
189+
DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unauthenticated cuda-demo-suite-12-5
190+
/usr/local/cuda/extras/demo_suite/deviceQuery
191+
/usr/local/cuda/extras/demo_suite/vectorAdd
192+
/usr/local/cuda/extras/demo_suite/bandwidthTest --device=all --csv
193+
/usr/local/cuda/extras/demo_suite/busGrind -a
194+
`,
195+
},
182196
Resources: v1.ResourceRequirements{
183197
Limits: v1.ResourceList{
184198
"nvidia.com/gpu": resource.MustParse("1"),

0 commit comments

Comments
 (0)