Skip to content

Commit

Permalink
Remove input taps for const in rewrite rule
Browse files Browse the repository at this point in the history
  • Loading branch information
hubertdelajonquieresonos committed Dec 9, 2024
1 parent 3f3099d commit da47b81
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions metal/src/rewrite_rules/rewire_metal_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,8 @@ pub fn rewire_metal_sync_after_const(
rule_ensure!(sync_cpu_op.kind == MetalSyncKind::ToCpu);

let mut patch = TypedModelPatch::default();

let konst_input = patch.taps(model, &node.inputs)?;
let out =
patch.wire_node(format!("{node_name}"), Const(cpu_const.into(), None), &konst_input)?;
patch.wire_node(format!("{node_name}"), Const(cpu_const.into(), None), &[])?;
patch.shunt_outside(model, sync_cpu.id.into(), out[0])?;
Ok(Some(patch))
}

0 comments on commit da47b81

Please sign in to comment.