[Mlir-commits] [mlir] [MLIR][Linalg] improve silenceable failure msg for `lower_pack` (NFC) (PR #75053)
Matthias Springer
llvmlistbot at llvm.org
Mon Dec 11 17:33:56 PST 2023
================
@@ -1126,7 +1126,7 @@ DiagnosedSilenceableFailure transform::LowerUnPackOp::applyToOne(
FailureOr<LowerUnPackOpResult> res = lowerUnPack(rewriter, target);
if (failed(res)) {
return mlir::emitSilenceableFailure(target->getLoc())
----------------
matthias-springer wrote:
The error is usually attached to the transform op. You can add a note that points to the payload op.
E.g.:
```c++
DiagnosedSilenceableFailure diag = emitSilenceableError()
<< "cannot lower to transpose + collapse + extract";
diag.attachNote(target->getLoc()) << "target payload op";
return diag;
```
https://github.com/llvm/llvm-project/pull/75053
More information about the Mlir-commits
mailing list