Skip to content

Commit

Permalink
Switched symbolic to use egg
Browse files Browse the repository at this point in the history
  • Loading branch information
jafioti committed May 8, 2024
1 parent 60eba92 commit 25f4247
Show file tree
Hide file tree
Showing 3 changed files with 285 additions and 90 deletions.
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ regex = "1.9.5"
rustc-hash = "1.1.0"
uuid = { version = "1.7.0", features = ["v4"] }
as-any = "0.3.1"
#cas-compute = {git="https://github.com/ElectrifyPro/cas-rs", branch="dev"}
#cas-parser = {git="https://github.com/ElectrifyPro/cas-rs", branch="dev"}
egg = "0.9.5"

[dev-dependencies]
dfdx = { version = "0.13", features = ["f16"] }
Expand Down
10 changes: 6 additions & 4 deletions crates/luminal_metal/src/prim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1653,10 +1653,12 @@ impl<T: MetalFloat + 'static> Compiler for PrimitiveCompiler<T> {
.neighbors_directed(output_node, petgraph::Direction::Incoming)
.next()
.unwrap();
graph.no_delete.remove(&output_node);
graph.no_delete.insert(src);
let w = graph.to_retrieve.remove(&output_node).unwrap();
graph.to_retrieve.insert(src, w);
if graph.no_delete.remove(&output_node) {
graph.no_delete.insert(src);
}
if let Some(w) = graph.to_retrieve.remove(&output_node) {
graph.to_retrieve.insert(src, w);
}
} else {
// Create copy node
let copy_node = graph
Expand Down
Loading

0 comments on commit 25f4247

Please sign in to comment.