[PATCH] D76912: [MLIR] Add simple runner utilities for timing

Alex Zinenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 31 01:04:12 PDT 2020


ftynse accepted this revision.
ftynse added inline comments.
This revision is now accepted and ready to land.


================
Comment at: mlir/lib/ExecutionEngine/RunnerUtils.cpp:113
+extern "C" void print_flops(double flops) {
+  std::cerr << flops / 1.0E9 << " GFLOPS" << std::endl;
+}
----------------
Ultra-nit: the code below uses C-style I/O, let's be consistent here.


================
Comment at: mlir/test/mlir-cpu-runner/sgemm_naive_codegen.mlir:1
+// RUN: mlir-opt -convert-linalg-to-loops -lower-affine -convert-loop-to-std -convert-std-to-llvm %s | mlir-cpu-runner -O3 -e main -entry-point-result=void -shared-libs=%mlir_runner_utils_dir/libmlir_runner_utils%shlibext | FileCheck %s
+
----------------
Do we actually need the entire sgemm with non-trivial pipeline to test the flops printing utility?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76912/new/

https://reviews.llvm.org/D76912





More information about the llvm-commits mailing list