summaryrefslogtreecommitdiffstats
path: root/tests/compute
diff options
context:
space:
mode:
authorHarsh Aggarwal (NVIDIA) <haaggarwal@nvidia.com>2025-08-25 10:50:41 +0530
committerGitHub <noreply@github.com>2025-08-25 05:20:41 +0000
commit1562f98c07954ae17f9e7ef186f6c8eb029740ab (patch)
tree72393fc9724beff6d35c762734c69588b1002123 /tests/compute
parent7b4d02803344d52af8d979da1d0f42936d360f00 (diff)
Fix#8084: Batch-8: Enable cuda tests (#8268)
Diffstat (limited to 'tests/compute')
-rw-r--r--tests/compute/ieee754-mixed-type-nan-comparisons.slang1
-rw-r--r--tests/compute/integer-vector-diagnostic.slang2
-rw-r--r--tests/compute/matrix-layout-structured-buffer.slang1
-rw-r--r--tests/compute/spirv-array-texel-pointer-atomic.slang2
-rw-r--r--tests/compute/struct-default-init.slang1
-rw-r--r--tests/compute/struct-in-generic.slang3
-rw-r--r--tests/compute/unbounded-array-of-array-syntax.slang6
-rw-r--r--tests/compute/vector-scalar-compare.slang3
8 files changed, 14 insertions, 5 deletions
diff --git a/tests/compute/ieee754-mixed-type-nan-comparisons.slang b/tests/compute/ieee754-mixed-type-nan-comparisons.slang
index 31ce6b05b..28a90df38 100644
--- a/tests/compute/ieee754-mixed-type-nan-comparisons.slang
+++ b/tests/compute/ieee754-mixed-type-nan-comparisons.slang
@@ -1,4 +1,5 @@
//TEST:COMPARE_COMPUTE(filecheck-buffer=CHECK): -shaderobj -output-using-type
+//TEST:COMPARE_COMPUTE(filecheck-buffer=CHECK): -shaderobj -output-using-type -cuda
// Test IEEE 754 NaN comparison behavior with mixed int/float types
// Tests the type promotion logic across integer and floating-point categories
diff --git a/tests/compute/integer-vector-diagnostic.slang b/tests/compute/integer-vector-diagnostic.slang
index 98ca881ff..f53bc7ce1 100644
--- a/tests/compute/integer-vector-diagnostic.slang
+++ b/tests/compute/integer-vector-diagnostic.slang
@@ -17,4 +17,4 @@ cbuffer VectorBuffer
void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
{
outputBuffer[0] = int8Vector.x + int16Vector.y + int64Vector.z;
-} \ No newline at end of file
+}
diff --git a/tests/compute/matrix-layout-structured-buffer.slang b/tests/compute/matrix-layout-structured-buffer.slang
index 8ef7077f8..8c06bbfcd 100644
--- a/tests/compute/matrix-layout-structured-buffer.slang
+++ b/tests/compute/matrix-layout-structured-buffer.slang
@@ -9,6 +9,7 @@
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -xslang -matrix-layout-column-major -shaderobj -dx11
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -xslang -matrix-layout-row-major -shaderobj -dx12
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -xslang -matrix-layout-column-major -shaderobj -dx12
+//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -xslang -matrix-layout-row-major -shaderobj -cuda
//TEST_INPUT:ubuffer(data=[0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23], stride=48):name=gMatrices
diff --git a/tests/compute/spirv-array-texel-pointer-atomic.slang b/tests/compute/spirv-array-texel-pointer-atomic.slang
index 41ee27dfb..79d0adcfa 100644
--- a/tests/compute/spirv-array-texel-pointer-atomic.slang
+++ b/tests/compute/spirv-array-texel-pointer-atomic.slang
@@ -22,4 +22,4 @@ void computeMain(uint3 dispatchThreadID: SV_DispatchThreadID)
);
}
-//BUF: 1 \ No newline at end of file
+//BUF: 1
diff --git a/tests/compute/struct-default-init.slang b/tests/compute/struct-default-init.slang
index ce8979164..cdd4c7f2f 100644
--- a/tests/compute/struct-default-init.slang
+++ b/tests/compute/struct-default-init.slang
@@ -1,6 +1,7 @@
// struct-default-init.slang
//TEST(compute):COMPARE_COMPUTE: -shaderobj
//TEST(compute):COMPARE_COMPUTE: -vk -shaderobj
+//TEST(compute):COMPARE_COMPUTE: -cuda -shaderobj
struct Test
{
diff --git a/tests/compute/struct-in-generic.slang b/tests/compute/struct-in-generic.slang
index eb41efac6..4ad643d1c 100644
--- a/tests/compute/struct-in-generic.slang
+++ b/tests/compute/struct-in-generic.slang
@@ -1,4 +1,5 @@
//TEST(compute):COMPARE_COMPUTE: -shaderobj
+//TEST(compute):COMPARE_COMPUTE: -shaderobj -cuda
// Confirm that a struct type defined in a generic parent works
@@ -33,4 +34,4 @@ void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
float inVal = float(tid);
float outVal = test(inVal);
outputBuffer[tid] = outVal.x;
-} \ No newline at end of file
+}
diff --git a/tests/compute/unbounded-array-of-array-syntax.slang b/tests/compute/unbounded-array-of-array-syntax.slang
index c0508894a..896abda7c 100644
--- a/tests/compute/unbounded-array-of-array-syntax.slang
+++ b/tests/compute/unbounded-array-of-array-syntax.slang
@@ -1,6 +1,7 @@
//IGNORE_TEST:CPU_REFLECTION: -profile cs_5_0 -entry computeMain -target cpp
//DISABLED_TEST(compute):COMPARE_COMPUTE_EX:-cpu -compute
//TEST:SIMPLE(filecheck=DXIL):-target dxbc-assembly -entry computeMain -profile cs_5_1
+//TEST:SIMPLE(filecheck=CUDA):-target cuda -entry computeMain -profile cs_5_1
//TEST:SIMPLE(filecheck=CHECK):-target spirv-assembly -entry computeMain -profile cs_5_1 -emit-spirv-via-glsl
//DISABLED_TEST(compute):COMPARE_COMPUTE_EX:-cuda -compute
@@ -34,6 +35,9 @@ void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
// CHECK: %[[N4]] = OpLoad %int %[[N3]]
// CHECK: %{{.*}} = OpAccessChain %[[P1]] %[[B0]] %int_{{.*}}
// CHECK: OpStore %{{.*}} %[[N4]]
+ // CUDA: Array<RWStructuredBuffer<int>> g_aoa_0;
+ // CUDA: globalParams_0->g_aoa_0[index_0 >> int(2)].GetDimensions
+ // CUDA: _S1[index_0 >> int(2)]
int index = int(dispatchThreadID.x);
int baseIndex = index >> 2;
@@ -50,4 +54,4 @@ void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
innerIndex = int(bufferCount - 1);
}
outputBuffer[index] = buffer[innerIndex];
-} \ No newline at end of file
+}
diff --git a/tests/compute/vector-scalar-compare.slang b/tests/compute/vector-scalar-compare.slang
index dab993a4c..dedeeda45 100644
--- a/tests/compute/vector-scalar-compare.slang
+++ b/tests/compute/vector-scalar-compare.slang
@@ -1,5 +1,6 @@
//TEST(compute):COMPARE_COMPUTE:-dx12 -compute -shaderobj
//TEST(compute):COMPARE_COMPUTE:-vk -compute -shaderobj
+//TEST(compute):COMPARE_COMPUTE:-cuda -compute -shaderobj
// Test doing vector comparisons
@@ -23,4 +24,4 @@ void computeMain(int3 dispatchThreadID : SV_DispatchThreadID)
int index = threadInGroup.x + threadInGroup.y * 4;
outputBuffer[index] = r;
-} \ No newline at end of file
+}