Skip to content

Commit

Permalink
Order matters in fusing
Browse files Browse the repository at this point in the history
  • Loading branch information
emricksinisonos committed Oct 18, 2024
1 parent 8c55045 commit 097fe74
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions core/src/ops/matmul/optimized.rs
Original file line number Diff line number Diff line change
Expand Up @@ -470,16 +470,6 @@ impl TypedOp for OptMatMul {
let other_outlet = succ.inputs[flipped as usize];
return self.fuse_binary(model, node, patch, other_outlet, binop);
}
if let Some(op) = succ.op_as::<ops::binary::OptBinUnicast>() {
let mut binop =
if let Some(op) = op.binop.as_linalg_binop() { op } else { return Ok(None) };
let flipped = succ.inputs[0].node == node.id;
if flipped {
binop = binop.flip();
}
let other_outlet = succ.inputs[flipped as usize];
return self.fuse_binary(model, node, patch, other_outlet, binop);
}

if let Some(op) = succ.op_as::<ops::element_wise::ElementWiseOp>().map(|ew| ew.0.as_ref()) {
if let Some(op) = op.downcast_ref::<ops::math::QScale>() {
Expand Down

0 comments on commit 097fe74

Please sign in to comment.