@@ -18,7 +18,6 @@ package node
18
18
19
19
import (
20
20
"context"
21
- e2ejob "k8s.io/kubernetes/test/e2e/framework/job"
22
21
"os"
23
22
"regexp"
24
23
"time"
@@ -34,6 +33,7 @@ import (
34
33
"k8s.io/kubernetes/test/e2e/framework"
35
34
e2edebug "k8s.io/kubernetes/test/e2e/framework/debug"
36
35
e2egpu "k8s.io/kubernetes/test/e2e/framework/gpu"
36
+ e2ejob "k8s.io/kubernetes/test/e2e/framework/job"
37
37
e2emanifest "k8s.io/kubernetes/test/e2e/framework/manifest"
38
38
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
39
39
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
@@ -46,9 +46,13 @@ import (
46
46
"github.com/onsi/gomega"
47
47
)
48
48
49
- var _ = SIGDescribe (feature .GPUDevicePlugin , "Sanity test for Nvidia Device" , func () {
49
+ // NOTE: All the tests in this file are run serially because they share a limited set of GPU(s), please inspect
50
+ // the CI job definitions to see how many GPU(s) are available in the environment
51
+ // Currently the CI jobs have 2 nodes each with 4 Nvidia T4's across both GCE and AWS harness(es).
52
+
53
+ var _ = SIGDescribe (feature .GPUDevicePlugin , framework .WithSerial (), "Sanity test using nvidia-smi" , func () {
50
54
51
- f := framework .NewDefaultFramework ("nvidia-gpu " )
55
+ f := framework .NewDefaultFramework ("nvidia-gpu1 " )
52
56
f .NamespacePodSecurityLevel = admissionapi .LevelPrivileged
53
57
var podClient * e2epod.PodClient
54
58
@@ -74,6 +78,18 @@ var _ = SIGDescribe(feature.GPUDevicePlugin, "Sanity test for Nvidia Device", fu
74
78
gomega .Expect (log ).To (gomega .ContainSubstring ("Driver Version:" ))
75
79
gomega .Expect (log ).To (gomega .ContainSubstring ("CUDA Version:" ))
76
80
})
81
+ })
82
+
83
+ var _ = SIGDescribe (feature .GPUDevicePlugin , framework .WithSerial (), "Test using a Pod" , func () {
84
+
85
+ f := framework .NewDefaultFramework ("nvidia-gpu2" )
86
+ f .NamespacePodSecurityLevel = admissionapi .LevelPrivileged
87
+ var podClient * e2epod.PodClient
88
+
89
+ ginkgo .BeforeEach (func () {
90
+ e2eskipper .SkipUnlessProviderIs ("aws" , "gce" )
91
+ podClient = e2epod .NewPodClient (f )
92
+ })
77
93
78
94
f .It ("should run gpu based matrix multiplication" , func (ctx context.Context ) {
79
95
SetupEnvironmentAndSkipIfNeeded (ctx , f , f .ClientSet )
@@ -91,6 +107,16 @@ var _ = SIGDescribe(feature.GPUDevicePlugin, "Sanity test for Nvidia Device", fu
91
107
gomega .Expect (log ).To (gomega .ContainSubstring ("Matrix multiplication result:" ))
92
108
gomega .Expect (log ).To (gomega .ContainSubstring ("Time taken for 5000x5000 matrix multiplication" ))
93
109
})
110
+ })
111
+
112
+ var _ = SIGDescribe (feature .GPUDevicePlugin , framework .WithSerial (), "Test using a Job" , func () {
113
+
114
+ f := framework .NewDefaultFramework ("nvidia-gpu2" )
115
+ f .NamespacePodSecurityLevel = admissionapi .LevelPrivileged
116
+
117
+ ginkgo .BeforeEach (func () {
118
+ e2eskipper .SkipUnlessProviderIs ("aws" , "gce" )
119
+ })
94
120
95
121
f .It ("should run gpu based jobs" , func (ctx context.Context ) {
96
122
SetupEnvironmentAndSkipIfNeeded (ctx , f , f .ClientSet )
0 commit comments