Skip to content

Commit 89d4904

Browse files
committed
[mlir] Fix declaration of nano time function in benchmark infra
In d455569, 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
1 parent 1b07bd9 commit 89d4904

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

mlir/benchmark/python/common.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@ def get_kernel_func_from_module(module: ir.Module) -> func.FuncOp:
5656

5757

5858
def emit_timer_func() -> func.FuncOp:
59-
"""Returns the declaration of nano_time function. If nano_time function is
59+
"""Returns the declaration of nanoTime function. If nanoTime function is
6060
used, the `MLIR_RUNNER_UTILS` and `MLIR_C_RUNNER_UTILS` must be included.
6161
"""
6262
i64_type = ir.IntegerType.get_signless(64)
63-
nano_time = func.FuncOp(
64-
"nano_time", ([], [i64_type]), visibility="private")
65-
nano_time.attributes["llvm.emit_c_interface"] = ir.UnitAttr.get()
66-
return nano_time
63+
nanoTime = func.FuncOp(
64+
"nanoTime", ([], [i64_type]), visibility="private")
65+
nanoTime.attributes["llvm.emit_c_interface"] = ir.UnitAttr.get()
66+
return nanoTime
6767

6868

6969
def emit_benchmark_wrapped_main_func(func, timer_func):

0 commit comments

Comments
 (0)