[Mlir-commits] [mlir] [MLIR][CMake] Downgrade ocloc not found diagnostic from WARNING to STATUS (PR #198296)

Harrison Hao llvmlistbot at llvm.org
Mon May 18 06:24:11 PDT 2026


https://github.com/harrisonGPU created https://github.com/llvm/llvm-project/pull/198296

When ocloc is not found, the CMake configuration emits a WARNING which
can be noisy for users who have no interest in Intel XeVM native binary
compilation (e.g., those targeting only AMDGPU or NVPTX). Downgrade the
diagnostic to STATUS since this is an expected configuration when ocloc
is not installed. 
For example:
```bash
CMake Warning at /llvm-project/mlir/lib/Target/LLVM/CMakeLists.txt:246 (message):
ocloc not found, MLIRXeVMTarget will not be able to use ocloc for native
binary compilation.
```

>From 8b3965607094e86603cf65d04018f2390a08533d Mon Sep 17 00:00:00 2001
From: Harrison Hao <tsworld1314 at gmail.com>
Date: Mon, 18 May 2026 21:20:30 +0800
Subject: [PATCH] [MLIR][CMake] Downgrade ocloc not found diagnostic from
 WARNING to STATUS

---
 mlir/lib/Target/LLVM/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mlir/lib/Target/LLVM/CMakeLists.txt b/mlir/lib/Target/LLVM/CMakeLists.txt
index f9e02bbba9117..bd1d66d1e43af 100644
--- a/mlir/lib/Target/LLVM/CMakeLists.txt
+++ b/mlir/lib/Target/LLVM/CMakeLists.txt
@@ -243,7 +243,7 @@ if (NOT LLVM_BUILD_LLVM_DYLIB)
     set(MLIR_XEVM_OCLOC_LIB_AVAILABLE 1)
   else()
     set(MLIR_XEVM_OCLOC_LIB_AVAILABLE 0)
-    message(WARNING "ocloc not found, MLIRXeVMTarget will not be able to use ocloc for native binary compilation.")
+    message(STATUS "ocloc not found, MLIRXeVMTarget will not be able to use ocloc for native binary compilation.")
   endif()
 else()
   set(MLIR_XEVM_OCLOC_LIB_AVAILABLE 0)



More information about the Mlir-commits mailing list