Skip to content

Commit

Permalink
fix: apply force cast only if at least 1 input is not quantized
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienBalianSonos committed Mar 1, 2024
1 parent 739a01f commit b8466cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nnef/src/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,10 @@ impl Registry {
b = builder.wire_as_outlets(tract_core::ops::cast::cast(a_dt), &[b])?[0];
b_dt = a_dt;
};
let operating_dt = bin.1.operating_datum_type(a_dt, b_dt)?;
a = builder.wire_as_outlets(tract_core::ops::cast::cast(operating_dt), &[a])?[0];
b = builder.wire_as_outlets(tract_core::ops::cast::cast(operating_dt), &[b])?[0];
}
let operating_dt = bin.1.operating_datum_type(a_dt, b_dt)?;
a = builder.wire_as_outlets(tract_core::ops::cast::cast(operating_dt), &[a])?[0];
b = builder.wire_as_outlets(tract_core::ops::cast::cast(operating_dt), &[b])?[0];
let inputs = multi_rank_broadcast(builder, &[a, b])?;

let c_dt: Option<DatumType> = dt.first().cloned().and_then(|dt| dt);
Expand Down

0 comments on commit b8466cd

Please sign in to comment.