From f4449d9376f0a5c32274fd812d135f3595159bae Mon Sep 17 00:00:00 2001 From: "Sami Kiminki (NVIDIA)" <235843927+skiminki-nv@users.noreply.github.com> Date: Mon, 6 Oct 2025 23:55:39 +0300 Subject: Add check for NVRTC backend in unit test cudaCodeGenBug (#8611) Test `slang-unit-test-tool/cudaCodeGenBug.internal` requires that the CUDA toolkit is available. Add a check for the NVRTC backend to avoid a failure when this is not the case. Fixes #6636 --- tools/slang-unit-test/unit-test-find-check-entrypoint.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/slang-unit-test/unit-test-find-check-entrypoint.cpp b/tools/slang-unit-test/unit-test-find-check-entrypoint.cpp index 79a797c5a..7a8715b38 100644 --- a/tools/slang-unit-test/unit-test-find-check-entrypoint.cpp +++ b/tools/slang-unit-test/unit-test-find-check-entrypoint.cpp @@ -78,6 +78,13 @@ SLANG_UNIT_TEST(findAndCheckEntryPoint) // tests/compute/simple.slang should cover the same issue. SLANG_UNIT_TEST(cudaCodeGenBug) { + // We need the CUDA backend for this test + if (!SLANG_SUCCEEDED( + unitTestContext->slangGlobalSession->checkPassThroughSupport(SLANG_PASS_THROUGH_NVRTC))) + { + SLANG_IGNORE_TEST; + } + // Source for a module that contains an undecorated entrypoint. const char* userSourceBody = R"( RWStructuredBuffer outputBuffer; -- cgit v1.2.3