summaryrefslogtreecommitdiff
path: root/tests/autodiff/was
diff options
context:
space:
mode:
authorHarsh Aggarwal (NVIDIA) <haaggarwal@nvidia.com>2025-08-18 10:46:47 +0530
committerGitHub <noreply@github.com>2025-08-18 05:16:47 +0000
commitc3df36043c67a94ea51cd7b1ce10a84e52f8d744 (patch)
treecac5155cdc8f1aac4f8df7dc7ca1415549158788 /tests/autodiff/was
parent8ba38bcd6e64bc922bc62843375eaa9ef01b6675 (diff)
Enable CUDA Test Enablement - Batch 1: Autodiff Tests (1-16) (#8139)
Diffstat (limited to 'tests/autodiff/was')
-rw-r--r--tests/autodiff/was/warped-sampling-1d.slang18
-rw-r--r--tests/autodiff/was/warped-sampling-1d.slang.expected.txt11
2 files changed, 15 insertions, 14 deletions
diff --git a/tests/autodiff/was/warped-sampling-1d.slang b/tests/autodiff/was/warped-sampling-1d.slang
index 3a2ca8f92..38e1410fa 100644
--- a/tests/autodiff/was/warped-sampling-1d.slang
+++ b/tests/autodiff/was/warped-sampling-1d.slang
@@ -1,4 +1,5 @@
-//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj -output-using-type -profile cs_5_1 -dx12
+//TEST(compute):COMPARE_COMPUTE_EX(filecheck-buffer=CHECK):-slang -compute -shaderobj -output-using-type -profile cs_5_1 -dx12 -compute-dispatch 4,1,1
+//TEST(compute):COMPARE_COMPUTE_EX(filecheck-buffer=CHECK):-slang -compute -shaderobj -output-using-type -profile cs_5_1 -cuda -compute-dispatch 4,1,1
//TEST_INPUT:ubuffer(data=[0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0], stride=4):out,name=endpointDifferentialBuffer
RWStructuredBuffer<float> endpointDifferentialBuffer;
@@ -256,7 +257,7 @@ float renderSample(inout PRNG prng)
return shadeIntersection(isect) * isect.wt;
}
-[numthreads(1000, 1, 1)]
+[numthreads(256, 1, 1)]
void computeMain(uint3 threadIdx : SV_DispatchThreadID,)
{
uint seed = (threadIdx.x * threadIdx.x) * 30 + 3;
@@ -284,4 +285,15 @@ void computeMain(uint3 threadIdx : SV_DispatchThreadID,)
// Expect: Approximately 0.0 in endpointDifferentialBuffer[2]
// Expect: Approximately 0.0 in endpointDifferentialBuffer[3]
//
-} \ No newline at end of file
+}
+// CHECK: type: float
+// CHECK-NEXT: -0.{{9[5-9][0-9]}}000
+// CHECK-NEXT: 0.{{9[5-9][0-9]}}000
+// CHECK-NEXT: 0.000000
+// CHECK-NEXT: 0.004000
+// CHECK-NEXT: 0.000000
+// CHECK-NEXT: 0.000000
+// CHECK-NEXT: 0.000000
+// CHECK-NEXT: 0.000000
+// CHECK-NEXT: 0.000000
+// CHECK-NEXT: 0.000000
diff --git a/tests/autodiff/was/warped-sampling-1d.slang.expected.txt b/tests/autodiff/was/warped-sampling-1d.slang.expected.txt
deleted file mode 100644
index 84272b50a..000000000
--- a/tests/autodiff/was/warped-sampling-1d.slang.expected.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-type: float
--0.954000
-0.950000
--0.000000
-0.004000
-0.000000
-0.000000
-0.000000
-0.000000
-0.000000
-0.000000 \ No newline at end of file