harvard-acc / ALADDIN

A pre-RTL, power-performance model for fixed-function accelerators
Other
161 stars 54 forks source link

Benchmarking math functions #42

Open cansudemirkiran opened 3 years ago

cansudemirkiran commented 3 years ago

Hi, Is Aladdin not supporting external library functions like ? I tried running exp, it can compile when I add the -lm flag to the makefile and creates a trace, so I saw this output "dynamic_trace.gz: Stopping logging at inst 443." but when I ran Aladdin, it doesn't show any computation/cycle count and reaches the end of the trace immediately. Do you have a suggestion to solve the issue? Thanks.

xyzsam commented 3 years ago

LLVM-Tracer has a list of intrinsic math functions and other functions for which it will not trace, but instead will emit a special math opcode (code). It can't trace into them by definition since the tracer doesn't have access to the source code, so they get modeled specially as a black box operation instead. What math function were you using and having difficulty with?

cansudemirkiran commented 3 years ago

Thanks for the quick response. I see, I want to use "exp" and "sqrt".