From b2273964ba15c5f5d21fa2f7b9fec507af4832dc Mon Sep 17 00:00:00 2001 From: Julian Oppermann Date: Mon, 25 Nov 2024 18:05:02 +0000 Subject: [PATCH 1/2] Fix unused variable Signed-off-by: Julian Oppermann --- sycl-jit/jit-compiler/lib/rtc/DeviceCompilation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl-jit/jit-compiler/lib/rtc/DeviceCompilation.cpp b/sycl-jit/jit-compiler/lib/rtc/DeviceCompilation.cpp index a89635b79ed46..a8822c1e4eec9 100644 --- a/sycl-jit/jit-compiler/lib/rtc/DeviceCompilation.cpp +++ b/sycl-jit/jit-compiler/lib/rtc/DeviceCompilation.cpp @@ -402,7 +402,7 @@ Expected jit_compiler::performPostLink( ModuleDesc{std::unique_ptr{&Module}}, SPLIT_NONE, /*IROutputOnly=*/false, /*EmitOnlyKernelsAsEntryPoints=*/true); - bool SplitOccurred = Splitter->remainingSplits() > 1; + [[maybe_unused]] bool SplitOccurred = Splitter->remainingSplits() > 1; assert(!SplitOccurred); // TODO: Call `verifyNoCrossModuleDeviceGlobalUsage` if device globals shall From 0756693d17e4b619db72b58034f3ed5ab91a632d Mon Sep 17 00:00:00 2001 From: Julian Oppermann Date: Mon, 25 Nov 2024 18:13:20 +0000 Subject: [PATCH 2/2] Cleaner solution. Signed-off-by: Julian Oppermann --- sycl-jit/jit-compiler/lib/rtc/DeviceCompilation.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sycl-jit/jit-compiler/lib/rtc/DeviceCompilation.cpp b/sycl-jit/jit-compiler/lib/rtc/DeviceCompilation.cpp index a8822c1e4eec9..910bfef64cd0f 100644 --- a/sycl-jit/jit-compiler/lib/rtc/DeviceCompilation.cpp +++ b/sycl-jit/jit-compiler/lib/rtc/DeviceCompilation.cpp @@ -402,8 +402,7 @@ Expected jit_compiler::performPostLink( ModuleDesc{std::unique_ptr{&Module}}, SPLIT_NONE, /*IROutputOnly=*/false, /*EmitOnlyKernelsAsEntryPoints=*/true); - [[maybe_unused]] bool SplitOccurred = Splitter->remainingSplits() > 1; - assert(!SplitOccurred); + assert(Splitter->remainingSplits() == 1); // TODO: Call `verifyNoCrossModuleDeviceGlobalUsage` if device globals shall // be processed.