From 86e20a7c0f045899a11fcfd328cfea561ae01a77 Mon Sep 17 00:00:00 2001 From: Kashyap Chamarthy Date: Fri, 13 Mar 2026 15:15:15 +0100 Subject: [PATCH] Report false for JIT support on RISC-V Content-type: text/plain Currently, the CAPI execution engine test from the MLIR test suite fails[1] on Fedora (hardware: SiFive "HiFive Premier P550"). Nikita Popov notes[2] that MLIR ExecutionEngine is still on "RuntimeDyld": "RuntimeDyld has since been superseded by JITLink, which has much better support for many architectures. MLIR ExecutionEngine needs to be migrated to JITLink." Until this gets sorted out, add a temporary workaround to report "false" for JIT support on RISC-V. [1] https://github.com/llvm/llvm-project/issues/162655 [2] https://github.com/llvm/llvm-project/issues/170647 Suggested-by: Nikita Popov Signed-off-by: Kashyap Chamarthy --- mlir/lib/ExecutionEngine/JitRunner.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mlir/lib/ExecutionEngine/JitRunner.cpp b/mlir/lib/ExecutionEngine/JitRunner.cpp index db0516533afcb3643d05851c0baf9ae6a046c1d7..fb144bace0aa86547889ac187c9f86d8d6785082 100644 --- a/mlir/lib/ExecutionEngine/JitRunner.cpp +++ b/mlir/lib/ExecutionEngine/JitRunner.cpp @@ -315,6 +315,15 @@ int mlir::JitRunnerMain(int argc, char **argv, const DialectRegistry ®istry, llvm::cl::ParseCommandLineOptions(argc, argv, "MLIR CPU execution driver\n"); if (options.hostSupportsJit) { +// JIT is _supposed_ to be supported on RISC-V +// MLIR is still using 'RuntimeDyld' until it is migrated to JITLink, +// use this temporary workaround: +// See: https://github.com/llvm/llvm-project/issues/162656 and +// https://github.com/llvm/llvm-project/issues/170647 +#ifdef __riscv + llvm::outs() << "false\n"; + return 0; +#endif auto j = llvm::orc::LLJITBuilder().create(); if (j) llvm::outs() << "true\n"; -- 2.52.0