Skip to content
Snippets Groups Projects

Fix crash in einsum

Merged rarbore2 requested to merge fix_einsum into main
2 files
+ 7
4
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 2
3
@@ -235,12 +235,11 @@ impl<'a> EinsumContext<'a> {
@@ -235,12 +235,11 @@ impl<'a> EinsumContext<'a> {
control: _,
control: _,
init: _,
init: _,
reduct: _,
reduct: _,
} => {
} if let Some(reduce) = self.so_far.get(&id) => {
let reduce = self.so_far[&id];
// Substitute opaque uses of thread ID nodes in inner expression
// Substitute opaque uses of thread ID nodes in inner expression
// with thread ID math expression, and increment inner-fork
// with thread ID math expression, and increment inner-fork
// dimensions (alpha renaming).
// dimensions (alpha renaming).
return self.substitute_new_dims(reduce);
return self.substitute_new_dims(*reduce);
}
}
_ => MathExpr::OpaqueNode(id),
_ => MathExpr::OpaqueNode(id),
};
};
Loading