Skip to content

Commit

Permalink
careful with einsum non matmul cases
Browse files Browse the repository at this point in the history
  • Loading branch information
kali committed Aug 23, 2024
1 parent feb5aff commit 0d16734
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/ops/einsum/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ impl TypedOp for EinSum {
_outputs: &[&TypedFact],
) -> TractResult<AxesMapping> {
let mut axes = self.axes.clone();
for input in [0, 1] {
for input in 0..inputs.len().min(2) {
if inputs[input].datum_type.is_opaque() {
while axes.axes(InOut::In(input)).next().is_some() {
axes = axes.remove_axis_occurency(InOut::In(input), 0)?;
Expand Down

0 comments on commit 0d16734

Please sign in to comment.