LLVM Discussion Forums

Mlir-cpu-runner printing GFLOPS?

Hello, In the tutorial https://github.com/bondhugula/llvm-project/blob/hop/mlir/docs/HighPerfCodeGen.md calls to mlir-cpu-runner seem to print execution speeds in GFLOP/s. Is this possible in either the main branch, or Uday Bondhugula’s fork?

Best,
Dumitru

I’m not aware of anything like this upstream. The runner is intended for simple end-to-end testing using JIT.

This isn’t upstream, but it’s pretty straightforward to add to RunnerUtils if you want to experiment. Just add the two functions print_flops, rtclock to lib/ExecutionEngine/RunnerUtils.cpp. Here is an example. You can then call these from your MLIR file.

1 Like

We had this question before and the ability to “benchmark” code seems generally useful. Do we expect to have benchmarks to avoid performance regressions in MLIR at some point?

In any case, this seems useful enough to upstream.

Sure - here’s the patch: D76912.

I hope so, we should likely look into integrating with the rest of LLVM test suite and LNT, unless someone has a better proposal to track performance upstream