Skip to content

Commit 19e9fc7

Browse files
zkoopmansgvisor-bot
authored andcommitted
Add all CUDA tests
Add all CUDA test suites except for a few lingering failing tests. Most of the failures are build problems where make fails for some reason. Also, have the `MaxSupportedCUDAVersion` method take an image so we choose the CUDA image per test. PiperOrigin-RevId: 762043438
1 parent 8980842 commit 19e9fc7

File tree

2 files changed

+21
-11
lines changed

2 files changed

+21
-11
lines changed

test/gpu/cuda_12_8_test.go

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,7 @@ import (
2727
var testSuiteCompatibility = map[string]cuda.Compatibility{}
2828

2929
// TODO(b/388095023): Enable these tests once they are tested.
30-
var skippedTestSuites = map[string]string{
31-
"3_CUDA_Features": "TODO: not yet tested",
32-
"4_CUDA_Libraries": "TODO: not yet tested",
33-
"5_Domain_Specific": "TODO: not yet tested",
34-
"6_Performance": "TODO: not yet tested",
35-
"7_libNVVM": "TODO: not yet tested",
36-
}
30+
var skippedTestSuites = map[string]string{}
3731

3832
var testCompatibility = map[string]cuda.Compatibility{}
3933

@@ -44,10 +38,22 @@ var exclusiveTests = map[string]struct{}{}
4438
// alwaysSkippedTests don't run at all, ever, and are not verified when
4539
// --cuda_verify_compatibility is set.
4640
// Each test is mapped to a reason why it should be skipped.
47-
var alwaysSkippedTests = map[string]string{}
41+
// TODO(zkoopmans): Enable these tests once they pass.
42+
var alwaysSkippedTests = map[string]string{
43+
"4_CUDA_Libraries/cudaNvSci": "TODO - Debug",
44+
"5_Domain_Specific/simpleD3D11": "TODO - Debug",
45+
"5_Domain_Specific/simpleD3D12": "TODO - Debug",
46+
"5_Domain_Specific/simpleD3D11Texture": "TODO - Debug",
47+
"7_libNVVM/syscalls": "TODO - Debug",
48+
"7_libNVVM/cuda-shared-memory": "TODO - Debug",
49+
"7_libNVVM/device-side-launch": "TODO - Debug",
50+
}
4851

52+
// TestCuda12_8 tests basic CUDA workloads for CUDA 12.8.
4953
func TestCuda12_8(t *testing.T) {
5054
ctx := context.Background()
55+
const image = "gpu/cuda-tests-12-8"
56+
5157
cudaVersion, err := dockerutil.MaxSuportedCUDAVersion(ctx, t)
5258
if err != nil {
5359
t.Fatalf("failed to get CUDA version: %v", err)
@@ -62,7 +68,7 @@ func TestCuda12_8(t *testing.T) {
6268
FlakyTests: flakyTests,
6369
ExclusiveTests: exclusiveTests,
6470
AlwaysSkippedTests: alwaysSkippedTests,
65-
Image: "gpu/cuda-tests-12-8",
71+
Image: image,
6672
}
6773
cuda.RunCudaTests(ctx, t, args)
6874
}

test/gpu/smoke_test.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ func TestGPUHello(t *testing.T) {
5353

5454
func TestGPUHello_12_8(t *testing.T) {
5555
ctx := context.Background()
56+
const image = "gpu/cuda-tests-12-8"
57+
5658
cudaVersion, err := dockerutil.MaxSuportedCUDAVersion(ctx, t)
5759
if err != nil {
5860
t.Fatalf("failed to get CUDA version: %v", err)
@@ -61,7 +63,7 @@ func TestGPUHello_12_8(t *testing.T) {
6163
if !cudaVersion.IsAtLeast(dockerutil.MustParseCudaVersion("12.8")) {
6264
t.Skipf("CUDA version %s is not at least 12.8, skipping test", cudaVersion)
6365
}
64-
runGPUHello(ctx, t, "gpu/cuda-tests-12-8")
66+
runGPUHello(ctx, t, image)
6567
}
6668

6769
func runGPUHello(ctx context.Context, t *testing.T, image string) {
@@ -87,14 +89,16 @@ func TestCUDASmokeTests(t *testing.T) {
8789

8890
func TestCUDASmokeTests_12_8(t *testing.T) {
8991
ctx := context.Background()
92+
const image = "gpu/cuda-tests-12-8"
93+
9094
cudaVersion, err := dockerutil.MaxSuportedCUDAVersion(ctx, t)
9195
if err != nil {
9296
t.Fatalf("failed to get CUDA version: %v", err)
9397
}
9498
if !cudaVersion.IsAtLeast(dockerutil.MustParseCudaVersion("12.8")) {
9599
t.Skipf("CUDA version %s is not at least 12.8, skipping test", cudaVersion)
96100
}
97-
runCUDASmokeTests(ctx, t, "gpu/cuda-tests-12-8")
101+
runCUDASmokeTests(ctx, t, image)
98102
}
99103

100104
func runCUDASmokeTests(ctx context.Context, t *testing.T, image string) {

0 commit comments

Comments
 (0)