diff options
| author | Harsh Aggarwal (NVIDIA) <haaggarwal@nvidia.com> | 2025-08-25 10:49:37 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-25 05:19:37 +0000 |
| commit | 53fa12e1b522a229006595001421caa62e22eba8 (patch) | |
| tree | 372d00c31eedd92bd833d6258c5425e368d35abe /tests | |
| parent | 67cf1403496ed80edd26c2e0368ddd851e09103a (diff) | |
Fix#8082: Batch-6: Enable cuda tests (#8266)
Diffstat (limited to 'tests')
8 files changed, 23 insertions, 21 deletions
diff --git a/tests/compute/dynamic-generics-simple.slang b/tests/compute/dynamic-generics-simple.slang index 377afe943..c3db45420 100644 --- a/tests/compute/dynamic-generics-simple.slang +++ b/tests/compute/dynamic-generics-simple.slang @@ -1,5 +1,5 @@ //TEST(compute):COMPARE_COMPUTE:-cpu -xslang -disable-specialization -//DISABLE_TEST(compute):COMPARE_COMPUTE:-cuda -xslang -disable-specialization +//TEST(compute):COMPARE_COMPUTE:-cuda -xslang -disable-specialization // Test basic dynamic dispatch code gen diff --git a/tests/compute/struct-autodiff-default-init.slang b/tests/compute/struct-autodiff-default-init.slang index 3d6548125..12ca97c61 100644 --- a/tests/compute/struct-autodiff-default-init.slang +++ b/tests/compute/struct-autodiff-default-init.slang @@ -4,12 +4,14 @@ //TEST:SIMPLE(filecheck=METAL): -target metal -entry computeMain -stage compute //TEST:SIMPLE(filecheck=CPP): -target cpp -entry computeMain -stage compute //TEST:SIMPLE(filecheck=SPIRV): -target spirv -entry computeMain -stage compute +//TEST:SIMPLE(filecheck=CUDA): -target cuda -entry computeMain -stage compute // HLSL: computeMain // GLSL: main // METAL: computeMain // CPP: computeMain // SPIRV: OpEntryPoint +// CUDA: computeMain struct PowActivationEx : IDifferentiable { @@ -22,4 +24,4 @@ void computeMain() { PowActivationEx args; return_value[0] = args.power; -}
\ No newline at end of file +} diff --git a/tests/hlsl-intrinsic/active-mask/for-continue-ext.slang b/tests/hlsl-intrinsic/active-mask/for-continue-ext.slang index 68a449f5e..affe8d7ca 100644 --- a/tests/hlsl-intrinsic/active-mask/for-continue-ext.slang +++ b/tests/hlsl-intrinsic/active-mask/for-continue-ext.slang @@ -9,7 +9,7 @@ //DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-slang -compute //DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -dx12 -use-dxil -profile cs_6_0 -xslang -DHACK //DISABLE_TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -xslang -DHACK -//TEST(compute):COMPARE_COMPUTE_EX:-cuda -compute -render-features cuda_sm_7_0 +//TEST(compute):COMPARE_COMPUTE_EX:-cuda -compute -capability cuda_sm_7_0 //TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0], stride=4):out,name buffer RWStructuredBuffer<int> buffer; @@ -32,9 +32,9 @@ void test(uint tid) for(int ii = 0; ii < tid; ++ii) { WRITE(0, ii); - if(tid & 1) + if((tid & 1) != 0) { - if(tid & 2) + if((tid & 2) != 0) { // Note: because of the two `if(alwaysFalse) break;` branches // here, the `WRITE(3,ii)` at the end of the loop body no @@ -47,7 +47,7 @@ void test(uint tid) // the expected/desired result even in the presence of // these additional control-flow edges. #ifndef HACK - if(alwaysFalse) break; + if(alwaysFalse != 0) break; #endif WRITE(1, ii); @@ -56,7 +56,7 @@ void test(uint tid) else { #ifndef HACK - if(alwaysFalse) break; + if(alwaysFalse != 0) break; #endif WRITE(2, ii); @@ -71,4 +71,4 @@ void test(uint tid) void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) { test(dispatchThreadID.x); -}
\ No newline at end of file +} diff --git a/tests/hlsl-intrinsic/active-mask/for.slang b/tests/hlsl-intrinsic/active-mask/for.slang index ecbeaaec3..ae00b367b 100644 --- a/tests/hlsl-intrinsic/active-mask/for.slang +++ b/tests/hlsl-intrinsic/active-mask/for.slang @@ -8,7 +8,7 @@ //DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-slang -compute //DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -dx12 -use-dxil -profile cs_6_0 //DISABLE_TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -//TEST(compute):COMPARE_COMPUTE_EX:-cuda -compute -render-features cuda_sm_7_0 +//TEST(compute):COMPARE_COMPUTE_EX:-cuda -compute -capability cuda_sm_7_0 //TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0], stride=4):out,name buffer RWStructuredBuffer<int> buffer; @@ -29,4 +29,4 @@ void test(int tid) void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) { test(dispatchThreadID.x); -}
\ No newline at end of file +} diff --git a/tests/hlsl-intrinsic/active-mask/if-early-exit.slang b/tests/hlsl-intrinsic/active-mask/if-early-exit.slang index e219dbed6..bd4db0a66 100644 --- a/tests/hlsl-intrinsic/active-mask/if-early-exit.slang +++ b/tests/hlsl-intrinsic/active-mask/if-early-exit.slang @@ -8,7 +8,7 @@ //DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-slang -compute //DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -dx12 -use-dxil -profile cs_6_0 //DISABLE_TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -//TEST(compute):COMPARE_COMPUTE_EX:-cuda -compute -render-features cuda_sm_7_0 +//TEST(compute):COMPARE_COMPUTE_EX:-cuda -compute -capability cuda_sm_7_0 //TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0], stride=4):out,name buffer RWStructuredBuffer<int> buffer; @@ -19,7 +19,7 @@ RWStructuredBuffer<int> buffer; void test(int tid) { WRITE(0); - if(tid & 1) + if((tid & 1) != 0) { WRITE(1); return; @@ -35,4 +35,4 @@ void test(int tid) void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) { test(dispatchThreadID.x); -}
\ No newline at end of file +} diff --git a/tests/hlsl-intrinsic/active-mask/if-one-sided.slang b/tests/hlsl-intrinsic/active-mask/if-one-sided.slang index eda456354..fb6a857c6 100644 --- a/tests/hlsl-intrinsic/active-mask/if-one-sided.slang +++ b/tests/hlsl-intrinsic/active-mask/if-one-sided.slang @@ -6,7 +6,7 @@ //DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-slang -compute //DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -dx12 -use-dxil -profile cs_6_0 //DISABLE_TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -//TEST(compute):COMPARE_COMPUTE_EX:-cuda -compute -render-features cuda_sm_7_0 +//TEST(compute):COMPARE_COMPUTE_EX:-cuda -compute -capability cuda_sm_7_0 //TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0 0 0 0 0], stride=4):out,name buffer RWStructuredBuffer<int> buffer; @@ -17,7 +17,7 @@ RWStructuredBuffer<int> buffer; void test(int tid) { WRITE(0); - if(tid & 1) + if((tid & 1) != 0) { WRITE(1); } @@ -28,4 +28,4 @@ void test(int tid) void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) { test(dispatchThreadID.x); -}
\ No newline at end of file +} diff --git a/tests/hlsl-intrinsic/active-mask/if.slang b/tests/hlsl-intrinsic/active-mask/if.slang index 75d06c941..11c532ec1 100644 --- a/tests/hlsl-intrinsic/active-mask/if.slang +++ b/tests/hlsl-intrinsic/active-mask/if.slang @@ -6,7 +6,7 @@ //DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-slang -compute //DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -dx12 -use-dxil -profile cs_6_0 //DISABLE_TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -//TEST(compute):COMPARE_COMPUTE_EX:-cuda -compute -render-features cuda_sm_7_0 +//TEST(compute):COMPARE_COMPUTE_EX:-cuda -compute -capability cuda_sm_7_0 //TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0], stride=4):out,name buffer RWStructuredBuffer<int> buffer; @@ -17,7 +17,7 @@ RWStructuredBuffer<int> buffer; void test(int tid) { WRITE(0); - if(tid & 1) + if((tid & 1) != 0) { WRITE(1); } @@ -32,4 +32,4 @@ void test(int tid) void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) { test(dispatchThreadID.x); -}
\ No newline at end of file +} diff --git a/tests/hlsl-intrinsic/active-mask/switch-no-default.slang b/tests/hlsl-intrinsic/active-mask/switch-no-default.slang index e4705c2e8..0b8cbabe1 100644 --- a/tests/hlsl-intrinsic/active-mask/switch-no-default.slang +++ b/tests/hlsl-intrinsic/active-mask/switch-no-default.slang @@ -9,7 +9,7 @@ //DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-slang -compute //DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -dx12 -use-dxil -profile cs_6_0 -xslang -DHACK //DISABLE_TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -xslang -DHACK -//TEST(compute):COMPARE_COMPUTE_EX:-cuda -compute -render-features cuda_sm_7_0 +//TEST(compute):COMPARE_COMPUTE_EX:-cuda -compute -capability cuda_sm_7_0 //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 buffer RWStructuredBuffer<int> buffer; @@ -50,4 +50,4 @@ void test(int tid) void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) { test(dispatchThreadID.x); -}
\ No newline at end of file +} |
