Skip to content

Commit

Permalink
Merge branch 'main' into add_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yzhang93 authored Dec 13, 2024
2 parents 77030d5 + 190396d commit 600b132
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion build_tools/ci/cpu_comparison/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,14 @@ def generate_aie_output(config, aie_vmfb, input_args, function_name, name, outpu


def benchmark_aie_kernel_time(
config, aie_vmfb, input_args, function_name, name, n_repeats, n_kernel_runs
config,
aie_vmfb,
input_args,
function_name,
name,
n_repeats,
n_kernel_runs,
time_unit,
):
"""
Benchmark a compiled AIE module's (aie_vmfb) kernel time, average over the specified number of runs.
Expand All @@ -865,6 +872,7 @@ def benchmark_aie_kernel_time(
f"--benchmark_repetitions={n_repeats}",
f"--batch_size={n_kernel_runs}",
f"--xrt_lite_n_kernel_runs={n_kernel_runs}",
f"--time_unit={time_unit}",
]
if function_name:
run_args += [f"--function={function_name}"]
Expand Down Expand Up @@ -1236,6 +1244,7 @@ def benchmark_aie(
n_repeats,
n_kernel_runs,
seed=1,
time_unit="us",
):
"""
Arguments to the function are:
Expand All @@ -1261,6 +1270,8 @@ def benchmark_aie(
functions).
seed:
The seed to be used for generating the inputs.
time_unit:
The time unit to be shown in the benchmark output (ns, us, ms).
"""
if (
"--iree-amdaie-enable-infinite-loop-around-core-block=true"
Expand Down Expand Up @@ -1302,6 +1313,7 @@ def benchmark_aie(
name,
n_repeats,
n_kernel_runs,
time_unit,
)

if config.verbose:
Expand Down

0 comments on commit 600b132

Please sign in to comment.