[Mlir-commits] [mlir] 89d4904 - [mlir] Fix declaration of nano time function in benchmark infra
Denys Shabalin
llvmlistbot at llvm.org
Fri May 13 04:22:23 PDT 2022
Author: Denys Shabalin
Date: 2022-05-13T13:22:18+02:00
New Revision: 89d4904541106172e307efc98fbed5d8a86c4342
URL: https://github.com/llvm/llvm-project/commit/89d4904541106172e307efc98fbed5d8a86c4342
DIFF: https://github.com/llvm/llvm-project/commit/89d4904541106172e307efc98fbed5d8a86c4342.diff
LOG: [mlir] Fix declaration of nano time function in benchmark infra
In d4555698f89af373f43dcb4aa1587231496bcd31, the name of nano precision timer function has changed from `nano_time` to `nanoTime`, but benchmarks were not updated to reflect that. This change addresses the discrepancy.
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D125217
Added:
Modified:
mlir/benchmark/python/common.py
Removed:
################################################################################
diff --git a/mlir/benchmark/python/common.py b/mlir/benchmark/python/common.py
index da0ef20a18296..0c241c6fbb431 100644
--- a/mlir/benchmark/python/common.py
+++ b/mlir/benchmark/python/common.py
@@ -56,14 +56,14 @@ def get_kernel_func_from_module(module: ir.Module) -> func.FuncOp:
def emit_timer_func() -> func.FuncOp:
- """Returns the declaration of nano_time function. If nano_time function is
+ """Returns the declaration of nanoTime function. If nanoTime function is
used, the `MLIR_RUNNER_UTILS` and `MLIR_C_RUNNER_UTILS` must be included.
"""
i64_type = ir.IntegerType.get_signless(64)
- nano_time = func.FuncOp(
- "nano_time", ([], [i64_type]), visibility="private")
- nano_time.attributes["llvm.emit_c_interface"] = ir.UnitAttr.get()
- return nano_time
+ nanoTime = func.FuncOp(
+ "nanoTime", ([], [i64_type]), visibility="private")
+ nanoTime.attributes["llvm.emit_c_interface"] = ir.UnitAttr.get()
+ return nanoTime
def emit_benchmark_wrapped_main_func(func, timer_func):
More information about the Mlir-commits
mailing list