Skip to content

Commit

Permalink
fix rewrite phases fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieupoumeyrolsonos committed Dec 10, 2024
1 parent 6af31cf commit 38f3689
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions metal/src/transform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ impl MetalTransform {
return Ok(());
}

let mut new = self.translate_model(model)?;
*model = self.translate_model(model)?;

if stop_at_phase == 2 {
return Ok(());
Expand All @@ -90,8 +90,7 @@ impl MetalTransform {
Rewriter::default()
.with_rule_for::<MetalSync>("rewire-metal-sync", rewire_metal_sync)
.with_rule_for::<MetalAxisOp>("fuse_axis_op", fuse_axis_op)
.rewrite(&(), &mut new)?;
*model = new;
.rewrite(&(), model)?;
Ok(())
}

Expand Down

0 comments on commit 38f3689

Please sign in to comment.