From 67f1071b1b4f36e81f341ea886cba508f095f342 Mon Sep 17 00:00:00 2001 From: Victor Lomuller Date: Thu, 25 Jul 2024 17:31:23 +0100 Subject: [PATCH 1/2] [NFC] fix build issue in NDEBUG mode --- sycl-fusion/passes/kernel-fusion/SYCLSpecConstMaterializer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sycl-fusion/passes/kernel-fusion/SYCLSpecConstMaterializer.cpp b/sycl-fusion/passes/kernel-fusion/SYCLSpecConstMaterializer.cpp index 1e4af859600c8..b1f54ee21b78d 100644 --- a/sycl-fusion/passes/kernel-fusion/SYCLSpecConstMaterializer.cpp +++ b/sycl-fusion/passes/kernel-fusion/SYCLSpecConstMaterializer.cpp @@ -285,7 +285,9 @@ PreservedAnalyses SYCLSpecConstMaterializer::run(Function &F, if (const char *DebugEnv = std::getenv("SYCL_JIT_COMPILER_DEBUG")) if (strstr(DebugEnv, DEBUG_TYPE)) { DebugFlag = true; +#ifndef NDEBUG llvm::setCurrentDebugType(DEBUG_TYPE); +#endif } Mod = F.getParent(); From a0ea9a6cd2b047201df878feeac0a49d2cc9c836 Mon Sep 17 00:00:00 2001 From: Victor Lomuller Date: Thu, 25 Jul 2024 17:58:56 +0100 Subject: [PATCH 2/2] fix macos --- .../jit-compiler/lib/translation/KernelTranslation.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sycl-fusion/jit-compiler/lib/translation/KernelTranslation.cpp b/sycl-fusion/jit-compiler/lib/translation/KernelTranslation.cpp index 0d45a22c9e5a1..2065be52f5ae2 100644 --- a/sycl-fusion/jit-compiler/lib/translation/KernelTranslation.cpp +++ b/sycl-fusion/jit-compiler/lib/translation/KernelTranslation.cpp @@ -229,7 +229,8 @@ KernelTranslator::translateToSPIRV(llvm::Module &Mod, JITContext &JITCtx) { llvm::Expected KernelTranslator::translateToPTX( SYCLKernelInfo &KernelInfo, llvm::Module &Mod, JITContext &JITCtx, - const std::string &TargetCPU, const std::string &TargetFeatures) { + [[maybe_unused]] const std::string &TargetCPU, + [[maybe_unused]] const std::string &TargetFeatures) { #ifndef FUSION_JIT_SUPPORT_PTX (void)KernelInfo; (void)Mod; @@ -310,7 +311,8 @@ llvm::Expected KernelTranslator::translateToPTX( llvm::Expected KernelTranslator::translateToAMDGCN( SYCLKernelInfo &KernelInfo, llvm::Module &Mod, JITContext &JITCtx, - const std::string &TargetCPU, const std::string &TargetFeatures) { + [[maybe_unused]] const std::string &TargetCPU, + [[maybe_unused]] const std::string &TargetFeatures) { #ifndef FUSION_JIT_SUPPORT_AMDGCN (void)KernelInfo; (void)Mod;