Skip to content

Commit

Permalink
feat(script): Add run all examples script.
Browse files Browse the repository at this point in the history
  • Loading branch information
KuangjuX committed May 15, 2024
1 parent 26769c0 commit d3806a6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/rf_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,16 @@ fn main() {

subgraph.connect();

let block = ThrillerBlock::new(
let mut block = ThrillerBlock::new(
vec![Rc::new(in_edge0), Rc::new(in_edge1)],
vec![Rc::new(out_edge)],
MemoryLevel::Register,
Rc::new(subgraph),
BlockType::Reduce,
);

block.merge_access_map();

let code = block.emit().unwrap();

println!("{}", code);
Expand Down
7 changes: 7 additions & 0 deletions scripts/run_examples.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

# Run the examples in the examples directory
for file in $(find examples/ -name *.rs); do
unit=$(basename $file .rs)
make example EXAMPLE=$unit
done

0 comments on commit d3806a6

Please sign in to comment.