Skip to content

Commit

Permalink
fix unroll with block
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses committed Mar 10, 2024
1 parent e98d0a1 commit 514c9e9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/enzyme_ad/jax/Passes/EnzymeHLOUnroll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,11 @@ struct WhileUnroll : public OpRewritePattern<mlir::stablehlo::WhileOp> {

auto iters = (*limit.begin()) - (*start.begin());

IRMapping operandMap;

SmallVector<Value> results(op.getOperands().begin(),
op.getOperands().end());

for (size_t iter = 0; iter < iters.getSExtValue(); iter++) {
IRMapping operandMap;
operandMap.map(loopBodyBlock->getArguments(), results);

Block::iterator srcBlockEnd = std::prev(loopBodyBlock->end(), 2);
Expand Down

0 comments on commit 514c9e9

Please sign in to comment.