Skip to content
Snippets Groups Projects
Commit 6e002e30 authored by rarbore2's avatar rarbore2
Browse files

Fix crash in einsum

parent 3d380bdf
No related branches found
No related tags found
1 merge request!141Fix crash in einsum
test-job: test-cpu:
stage: test stage: test
script: script:
- cargo test --features=opencv - cargo test --features=opencv
test-gpu:
stage: test
script:
- cargo test --features=cuda,opencv - cargo test --features=cuda,opencv
...@@ -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),
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment