Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Groverkss committed Aug 22, 2023
1 parent 5439bf9 commit 8813bbd
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,17 +286,16 @@ struct RaiseSpecialOpsPass : public RaiseSpecialOpsBase<RaiseSpecialOpsPass> {
IRRewriter rewriter(&getContext());

getOperation()->walk([&](linalg::GenericOp op) {
rewriter.setInsertionPoint(op);

// Try raising to tensor.export.
rewriter.setInsertionPoint(op);
FailureOr<linalg::GenericOp> maybeNewOp =
raiseTensorExtractToInput(op, rewriter);
// Update op if we succeeded.
if (succeeded(maybeNewOp)) {
op = maybeNewOp.value();
op = *maybeNewOp;
}

// Try raising to a view-like operation.
rewriter.setInsertionPoint(op);
(void)tryRaiseToView(op, rewriter);
});

Expand Down

0 comments on commit 8813bbd

Please sign in to comment.