Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Fioti authored and Joe Fioti committed Jan 7, 2024
1 parent 4e5300c commit 1a1ba52
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
18 changes: 16 additions & 2 deletions src/compilers/generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,14 @@ impl Compiler for ArithmeticElimination {
{
continue;
}
move_outgoing_edge(add, x, &mut graph.graph);
for output in graph
.get_dests(add)
.into_iter()
.map(|(o, _)| o)
.collect::<Vec<_>>()
{
move_incoming_edge(add, output, &mut graph.graph);
}
move_references(
&mut remap,
&mut graph.no_delete,
Expand Down Expand Up @@ -470,7 +477,14 @@ impl Compiler for ArithmeticElimination {
{
continue;
}
move_outgoing_edge(mul, a, &mut graph.graph);
for output in graph
.get_dests(mul)
.into_iter()
.map(|(o, _)| o)
.collect::<Vec<_>>()
{
move_incoming_edge(mul, output, &mut graph.graph);
}
move_references(
&mut remap,
&mut graph.no_delete,
Expand Down
1 change: 0 additions & 1 deletion src/nn/embedding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ mod tests {
let mut b = model.forward(a).retrieve();
let mut batch_out = model.forward(batch).retrieve();

// Uncommenting these lines causes the test to crash
cx.compile(GenericCompiler::<()>::default(), (&mut b, &mut batch_out));

cx.execute();
Expand Down

0 comments on commit 1a1ba52

Please sign in to comment.