Skip to content

Commit

Permalink
Merge remote-tracking branch 'main/main' into om4
Browse files Browse the repository at this point in the history
  • Loading branch information
TrevorHansen committed Jan 7, 2024
2 parents 9b97503 + 6e88612 commit 6da1944
Show file tree
Hide file tree
Showing 16 changed files with 22 additions and 4 deletions.
1 change: 1 addition & 0 deletions data/flexc/03d369d0-bb23-477a-8ea1-a452efc850fe.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/flexc/4a29e9e7-a232-4608-b7d2-37796d0ecd97.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/flexc/5cd5008c-4481-4751-90cf-0a0e23cd3d30.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/flexc/67addae9-f7db-4ebb-a02e-e1e045f87fc4.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/flexc/757f44bf-7134-426f-9d2f-71bc2dec1b36.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/flexc/7bdc5ff7-82f5-4bd0-a8c6-f3a735e016dc.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/flexc/85a0fc72-1972-4bc8-ab98-d0d468095601.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/flexc/86d12271-435d-463d-a7b4-e671423f0ced.json

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions data/flexc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
This dataset comes from a CGRA mapping tool called 'FlexC': https://arxiv.org/abs/2309.09112.

The e-graphs were derived by running equality saturation on the dataflow of loop bodies found in C code.
A simple cost model considers e-node operations to be either free (cost 0), costly (cost 1), or unavailable (cost 10 000).
The 'unavailable' cost of 10 000 encodes an infinite cost: picking these nodes would result in CGRA mapping failure.
As this is dataflow rewriting, extraction should ideally consider DAG cost.
1 change: 1 addition & 0 deletions data/flexc/a097ffbc-8fe4-4919-b6b3-342b0a3acb1b.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/flexc/b87bf0f2-74dc-40f2-b601-cd31937b81d5.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/flexc/db344dbd-fb20-4e9e-badb-076d7a3809bc.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/flexc/fdbbd205-1519-4880-9a24-07b2ea772d16.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/flexc/fea54919-328c-4f00-aedc-2698d17914b6.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/flexc/ff14944f-3228-48c8-8d8b-2ae849bbddef.json

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions src/extract/faster_greedy_dag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ impl FasterGreedyDagExtractor {
best_cost: Cost,
) -> CostSet {
let node = &egraph[&node_id];
let cid = egraph.nid_to_cid(&node_id);

// No children -> easy.
if node.children.is_empty() {
return CostSet {
costs: Default::default(),
costs: HashMap::from([(cid.clone(), node.cost)]),
total: node.cost,
choice: node_id.clone(),
};
Expand All @@ -41,8 +41,6 @@ impl FasterGreedyDagExtractor {
childrens_classes.sort();
childrens_classes.dedup();

let cid = egraph.nid_to_cid(&node_id);

let first_cost = costs.get(&childrens_classes[0]).unwrap();

if childrens_classes.contains(cid)
Expand Down

0 comments on commit 6da1944

Please sign in to comment.