[Mlir-commits] [mlir] [mlir][linalg] fix segmentation fault in isContractionBody function (PR #108703)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Sep 18 01:04:08 PDT 2024
================
@@ -222,7 +222,7 @@ bool mlir::linalg::detail::isContractionBody(
Value contributed = getSourceSkipUnary(
isa<BlockArgument>(reductionLHS) ? reductionRHS : reductionLHS);
Operation *elementwiseOp = contributed.getDefiningOp();
- if (elementwiseOp->getNumResults() != 1 ||
+ if (!elementwiseOp || elementwiseOp->getNumResults() != 1 ||
----------------
BRUCE11111 wrote:
Hi~ Added a test to the existing test method. This test can reproduce the problem of the current method.
https://github.com/llvm/llvm-project/pull/108703
More information about the Mlir-commits
mailing list