Skip to content

Conversation

@jackalcooper
Copy link
Contributor

No description provided.

@llvmbot
Copy link
Member

llvmbot commented Dec 12, 2025

@llvm/pr-subscribers-mlir

@llvm/pr-subscribers-mlir-execution-engine

Author: Shenghang Tsai (jackalcooper)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/171997.diff

1 Files Affected:

  • (modified) mlir/lib/CAPI/ExecutionEngine/ExecutionEngine.cpp (-4)
diff --git a/mlir/lib/CAPI/ExecutionEngine/ExecutionEngine.cpp b/mlir/lib/CAPI/ExecutionEngine/ExecutionEngine.cpp
index 81d86ad29af13..ec6f89effb709 100644
--- a/mlir/lib/CAPI/ExecutionEngine/ExecutionEngine.cpp
+++ b/mlir/lib/CAPI/ExecutionEngine/ExecutionEngine.cpp
@@ -38,8 +38,6 @@ mlirExecutionEngineCreate(MlirModule op, int optLevel, int numPaths,
 
   auto tmBuilderOrError = llvm::orc::JITTargetMachineBuilder::detectHost();
   if (!tmBuilderOrError) {
-    llvm::errs() << "Failed to create a JITTargetMachineBuilder for the host "
-                    "because: \n";
     consumeError(tmBuilderOrError.takeError());
     return MlirExecutionEngine{nullptr};
   }
@@ -47,7 +45,6 @@ mlirExecutionEngineCreate(MlirModule op, int optLevel, int numPaths,
     tmBuilderOrError->setRelocationModel(llvm::Reloc::PIC_);
   auto tmOrError = tmBuilderOrError->createTargetMachine();
   if (!tmOrError) {
-    llvm::errs() << "Failed to create a TargetMachine for the host because: \n";
     consumeError(tmOrError.takeError());
     return MlirExecutionEngine{nullptr};
   }
@@ -68,7 +65,6 @@ mlirExecutionEngineCreate(MlirModule op, int optLevel, int numPaths,
   auto jitOrError = ExecutionEngine::create(unwrap(op), jitOptions,
                                             std::move(tmOrError.get()));
   if (!jitOrError) {
-    llvm::errs() << "Failed to create an ExecutionEngine because: \n";
     consumeError(jitOrError.takeError());
     return MlirExecutionEngine{nullptr};
   }

@joker-eph joker-eph changed the title [mlir][ExecutionEngine] Don't print prefix when propagating errors [mlir][ExecutionEngine] Remove stderr printing when propagating errors Dec 12, 2025
@jackalcooper
Copy link
Contributor Author

Hi @makslevental , could you merge this?

@makslevental makslevental merged commit 7ac0177 into llvm:main Dec 15, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants