[Mlir-commits] [mlir] 20f36a2 - [MLIR][GPU] Improve error message on invalid pass option
Mehdi Amini
llvmlistbot at llvm.org
Sat Feb 28 15:18:32 PST 2026
Author: Mehdi Amini
Date: 2026-02-28T15:18:14-08:00
New Revision: 20f36a2ff10fd5c4ca821a3382b44440a6429b88
URL: https://github.com/llvm/llvm-project/commit/20f36a2ff10fd5c4ca821a3382b44440a6429b88
DIFF: https://github.com/llvm/llvm-project/commit/20f36a2ff10fd5c4ca821a3382b44440a6429b88.diff
LOG: [MLIR][GPU] Improve error message on invalid pass option
This provides a more helpful message to the user when passing invalid command
line options
Added:
Modified:
mlir/lib/Dialect/GPU/Transforms/ModuleToBinary.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/GPU/Transforms/ModuleToBinary.cpp b/mlir/lib/Dialect/GPU/Transforms/ModuleToBinary.cpp
index 1452c67021c30..93e07bef5af79 100644
--- a/mlir/lib/Dialect/GPU/Transforms/ModuleToBinary.cpp
+++ b/mlir/lib/Dialect/GPU/Transforms/ModuleToBinary.cpp
@@ -45,7 +45,10 @@ void GpuModuleToBinaryPass::runOnOperation() {
.Cases({"fatbinary", "fatbin"}, CompilationTarget::Fatbin)
.Default(std::nullopt);
if (!targetFormat) {
- getOperation()->emitError() << "Invalid format specified.";
+ getOperation()->emitError()
+ << "Invalid format specified: '" << compilationTarget
+ << "' (expected one of: offloading, llvm, assembly, isa, binary, bin, "
+ "fatbinary, fatbin)";
return signalPassFailure();
}
More information about the Mlir-commits
mailing list