Skip to content

Commit

Permalink
updated cost model from jit
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrantq committed Jan 7, 2025
1 parent 213107b commit 72a2a94
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 45 deletions.
5 changes: 4 additions & 1 deletion example/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@ FPOPTFLAGS += -mllvm --enzyme-enable-fpopt \
-mllvm --enzyme-print-fpopt \
-mllvm --fpopt-log-path=example.txt \
-mllvm --fpopt-target-func-regex=example \
-mllvm --fpopt-enable-herbie=1 \
-mllvm --fpopt-enable-solver \
-mllvm --fpopt-enable-pt \
-mllvm --fpopt-comp-cost-budget=0 \
-mllvm --fpopt-num-samples=1000 \
-mllvm --fpopt-show-table \
-mllvm --fpopt-cost-model-path=../microbm/cm.csv
-mllvm --fpopt-cache-path=cache \
-mllvm --fpopt-widen-range=10 \
-mllvm --fpopt-cost-model-path=/home/sbrantq/sync/FPBench/microbm/cm.csv

SRC ?= example.c
LOGGER ?= fp-logger.cpp
Expand Down
2 changes: 1 addition & 1 deletion experiments/ablation.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"-mllvm",
"--fpopt-num-samples=1024",
"-mllvm",
"--fpopt-cost-model-path=../microbm/cm.csv",
"--fpopt-cost-model-path=/home/sbrantq/sync/FPBench/microbm/cm.csv",
"-mllvm",
"-fpopt-cache-path=cache",
]
Expand Down
2 changes: 1 addition & 1 deletion experiments/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"-mllvm",
"--fpopt-num-samples=1024",
"-mllvm",
"--fpopt-cost-model-path=../microbm/cm.csv",
"--fpopt-cost-model-path=/home/sbrantq/sync/FPBench/microbm/cm.csv",
"-mllvm",
"-fpopt-cache-path=cache",
]
Expand Down
84 changes: 42 additions & 42 deletions microbm/cm.csv
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
fneg,float,19
fadd,float,19
fsub,float,19
fmul,float,19
fdiv,float,19
fcmp,float,15
fpext_float_to_double,float,19
fmuladd,float,19
sin,float,91
cos,float,98
tan,float,243
exp,float,125
log,float,76
sqrt,float,30
expm1,float,76
log1p,float,79
cbrt,float,618
pow,float,177
fabs,float,19
hypot,float,641
fma,float,74
fneg,double,19
fadd,double,19
fsub,double,19
fmul,double,19
fdiv,double,28
fcmp,double,15
fptrunc_double_to_float,double,19
fmuladd,double,19
sin,double,830
cos,double,828
tan,double,970
exp,double,166
log,double,97
sqrt,double,52
expm1,double,76
log1p,double,115
cbrt,double,237
pow,double,279
fabs,double,19
hypot,double,383
fma,double,75
fneg,float,7
fadd,float,7
fsub,float,7
fmul,float,7
fdiv,float,7
fcmp,float,6
fpext_float_to_double,float,7
fmuladd,float,7
sin,float,42
cos,float,40
tan,float,75
exp,float,44
log,float,29
sqrt,float,12
expm1,float,33
log1p,float,32
cbrt,float,175
pow,float,53
fabs,float,7
hypot,float,251
fma,float,30
fneg,double,7
fadd,double,7
fsub,double,7
fmul,double,7
fdiv,double,11
fcmp,double,6
fptrunc_double_to_float,double,7
fmuladd,double,7
sin,double,351
cos,double,353
tan,double,406
exp,double,70
log,double,33
sqrt,double,21
expm1,double,30
log1p,double,42
cbrt,double,98
pow,double,104
fabs,double,7
hypot,double,30
fma,double,29

0 comments on commit 72a2a94

Please sign in to comment.