From 63ca2325d7f6afdbf07e8f00975fab01ec516302 Mon Sep 17 00:00:00 2001 From: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Date: Wed, 18 Jun 2025 07:15:35 -0700 Subject: Fix false negative result for CUDA with recent versions (#7409) * Fix false negative result for CUDA with recent versions From CUDA version 12.8 and above, nvrtc returns an exit code treated as an error. Some of slang-test test cases had to change from TEST to DIAGONOSTIC_TEST to handle it properly. --- tests/diagnostics/syntax-error-op-line.slang | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'tests/diagnostics/syntax-error-op-line.slang') diff --git a/tests/diagnostics/syntax-error-op-line.slang b/tests/diagnostics/syntax-error-op-line.slang index 5459575c9..00c91aeb5 100644 --- a/tests/diagnostics/syntax-error-op-line.slang +++ b/tests/diagnostics/syntax-error-op-line.slang @@ -1,22 +1,23 @@ // syntax-error-op-line.slang // NOTE! That although this is a 'diagnostic' like test, it tests using downstream compiler -// the downstream compiler being present is a requirement, so we mark as a 'TEST' so that +// the downstream compiler being present is a requirement, so we mark as a 'TEST' so that // those tests are made. -//TEST:SIMPLE_LINE:-entry computeMain -target spirv -emit-spirv-via-glsl -//TEST:SIMPLE_LINE:-entry computeMain -target dxil -profile cs_6_0 -//TEST:SIMPLE_LINE:-entry computeMain -target dxbc -//TEST:SIMPLE_LINE:-entry computeMain -target shader-dll -//TEST:SIMPLE_LINE:-entry computeMain -target ptx +//TEST:SIMPLE(filecheck=CHK):-entry computeMain -target spirv -emit-spirv-via-glsl +//TEST:SIMPLE(filecheck=CHK):-entry computeMain -target dxil -profile cs_6_0 +//TEST:SIMPLE(filecheck=CHK):-entry computeMain -target dxbc +//TEST:SIMPLE(filecheck=CHK):-entry computeMain -target shader-dll +//TEST:SIMPLE(filecheck=CHK):-entry computeMain -target ptx [shader("compute")] [numthreads(4, 1, 1)] void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) { int id = int(dispatchThreadID.x); - + int v = int(dispatchThreadID.y); - + + //CHK:([[#@LINE+1]]): error v += id + __SyntaxError(); -} \ No newline at end of file +} -- cgit v1.2.3