-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathconfig.sh
More file actions
executable file
·66 lines (50 loc) · 1.99 KB
/
config.sh
File metadata and controls
executable file
·66 lines (50 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
export HECATE=$( cd -- "$( dirname -- "$BASH_SOURCE[0]" )" &> /dev/null && pwd )
alias hopt=$HECATE/build/bin/hecate-opt
alias hopt-debug=$HECATE/build-debug/bin/hecate-opt
mkdir -p $HECATE/examples/traced
mkdir -p $HECATE/examples/optimized/eva
mkdir -p $HECATE/examples/optimized/elasm
build-hopt()(
cd $HECATE/build
ninja
)
build-hoptd()(
cd $HECATE/build-debug
ninja
)
hc-trace()(
cd $HECATE/examples
python3 $HECATE/examples/benchmarks/$1.py
)
hc-test()(
cd $HECATE/examples
python3 $HECATE/examples/tests/$3.py $1 $2
)
hopt-print(){
hopt --$1 --ckks-config="$HECATE/config.json" --waterline=$2 --enable-debug-printer $HECATE/examples/traced/$3.mlir --mlir-print-debuginfo --mlir-pretty-debuginfo --mlir-print-local-scope --mlir-timing -o $HECATE/examples/optimized/$1/$3.$2.mlir
}
hopt-debug-print(){
hopt-debug --$1 --ckks-config="$HECATE/config.json" --waterline=$2 --enable-debug-printer $HECATE/examples/traced/$3.mlir --mlir-print-debuginfo --mlir-pretty-debuginfo --mlir-print-local-scope --mlir-disable-threading --mlir-timing --mlir-print-ir-after-failure
}
hopt-debug-print-all(){
hopt-debug --$1 --ckks-config="$HECATE/config.json" --waterline=$2 --enable-debug-printer $HECATE/examples/traced/$3.mlir --mlir-print-debuginfo --mlir-pretty-debuginfo --mlir-print-local-scope --mlir-disable-threading --mlir-timing --mlir-print-ir-after-failure --debug
}
hopt-timing-only(){
hopt --$1 --ckks-config="$HECATE/config.json" --waterline=$2 $HECATE/examples/traced/$3.mlir --mlir-timing -o $HECATE/examples/optimized/$1/$3.$2.mlir
}
hopt-silent(){
hopt --$1 --ckks-config="$HECATE/config.json" --waterline=$2 $HECATE/examples/traced/$3.mlir -o $HECATE/examples/optimized/$1/$3.$2.mlir
}
hc-opt-test() {
hopt-silent $1 $2 $3 && hc-test $1 $2 $3
}
hc-opt-test-timing() {
hopt-timing-only $1 $2 $3 && hc-test $1 $2 $3
}
alias hoptd=hopt-debug-print
alias hopta=hopt-debug-print-all
alias hopts=hopt-silent
alias hoptt=hopt-timing-only
alias hoptp=hopt-print
alias hcot=hc-opt-test
alias hcott=hc-opt-test-timing