From 513c36585198e615b137cadadbb2f236f3fe47db Mon Sep 17 00:00:00 2001 From: Chaitanya Prakash Bapat Date: Tue, 4 Feb 2020 13:59:20 -0800 Subject: [PATCH] [OpPerf] Fix markdown for native profile and add profile param in function desc (#17494) * 5 columns instead of 6 for native profile * add profiler param in function description --- benchmark/opperf/nd_operations/array_rearrange.py | 2 ++ benchmark/opperf/nd_operations/binary_operators.py | 4 ++++ benchmark/opperf/nd_operations/gemm_operators.py | 2 ++ benchmark/opperf/nd_operations/nn_optimizer_operators.py | 2 ++ benchmark/opperf/nd_operations/random_sampling_operators.py | 2 ++ benchmark/opperf/nd_operations/reduction_operators.py | 2 ++ benchmark/opperf/nd_operations/sorting_searching_operators.py | 2 ++ benchmark/opperf/nd_operations/unary_operators.py | 2 ++ benchmark/opperf/utils/common_utils.py | 3 ++- 9 files changed, 20 insertions(+), 1 deletion(-) diff --git a/benchmark/opperf/nd_operations/array_rearrange.py b/benchmark/opperf/nd_operations/array_rearrange.py index e7eb5d68748e..12af8345543e 100644 --- a/benchmark/opperf/nd_operations/array_rearrange.py +++ b/benchmark/opperf/nd_operations/array_rearrange.py @@ -39,6 +39,8 @@ def run_rearrange_operators_benchmarks(ctx=mx.cpu(), dtype='float32', profiler=' Context to run benchmarks dtype: str, default 'float32' Precision to use for benchmarks + profiler: str, default 'native' + Type of Profiler to use (native/python) warmup: int, default 25 Number of times to run for warmup runs: int, default 100 diff --git a/benchmark/opperf/nd_operations/binary_operators.py b/benchmark/opperf/nd_operations/binary_operators.py index 7847e92c6088..c0107163c782 100644 --- a/benchmark/opperf/nd_operations/binary_operators.py +++ b/benchmark/opperf/nd_operations/binary_operators.py @@ -48,6 +48,8 @@ def run_mx_binary_broadcast_operators_benchmarks(ctx=mx.cpu(), dtype='float32', Context to run benchmarks dtype: str, default 'float32' Precision to use for benchmarks + profiler: str, default 'native' + Type of Profiler to use (native/python) warmup: int, default 25 Number of times to run for warmup runs: int, default 100 @@ -75,6 +77,8 @@ def run_mx_binary_element_wise_operators_benchmarks(ctx=mx.cpu(), dtype='float32 Context to run benchmarks dtype: str, default 'float32' Precision to use for benchmarks + profiler: str, default 'native' + Type of Profiler to use (native/python) warmup: int, default 10 Number of times to run for warmup runs: int, default 50 diff --git a/benchmark/opperf/nd_operations/gemm_operators.py b/benchmark/opperf/nd_operations/gemm_operators.py index 73337538d89f..55edb6e248a4 100644 --- a/benchmark/opperf/nd_operations/gemm_operators.py +++ b/benchmark/opperf/nd_operations/gemm_operators.py @@ -44,6 +44,8 @@ def run_gemm_operators_benchmarks(ctx=mx.cpu(), dtype='float32', profiler='nativ Context to run benchmarks dtype: str, default 'float32' Precision to use for benchmarks + profiler: str, default 'native' + Type of Profiler to use (native/python) warmup: int, default 25 Number of times to run for warmup runs: int, default 100 diff --git a/benchmark/opperf/nd_operations/nn_optimizer_operators.py b/benchmark/opperf/nd_operations/nn_optimizer_operators.py index 99e2351363b6..643932b5738e 100644 --- a/benchmark/opperf/nd_operations/nn_optimizer_operators.py +++ b/benchmark/opperf/nd_operations/nn_optimizer_operators.py @@ -46,6 +46,8 @@ def run_optimizer_operators_benchmarks(ctx=mx.cpu(), dtype='float32', profiler=' Context to run benchmarks dtype: str, default 'float32' Precision to use for benchmarks + profiler: str, default 'native' + Type of Profiler to use (native/python) warmup: int, default 25 Number of times to run for warmup runs: int, default 100 diff --git a/benchmark/opperf/nd_operations/random_sampling_operators.py b/benchmark/opperf/nd_operations/random_sampling_operators.py index a39526ab95cd..eeda0026814c 100644 --- a/benchmark/opperf/nd_operations/random_sampling_operators.py +++ b/benchmark/opperf/nd_operations/random_sampling_operators.py @@ -44,6 +44,8 @@ def run_mx_random_sampling_operators_benchmarks(ctx=mx.cpu(), dtype='float32', p Context to run benchmarks dtype: str, default 'float32' Precision to use for benchmarks + profiler: str, default 'native' + Type of Profiler to use (native/python) warmup: int, default 25 Number of times to run for warmup runs: int, default 100 diff --git a/benchmark/opperf/nd_operations/reduction_operators.py b/benchmark/opperf/nd_operations/reduction_operators.py index 84d9d3779c39..6cc0d49c899b 100644 --- a/benchmark/opperf/nd_operations/reduction_operators.py +++ b/benchmark/opperf/nd_operations/reduction_operators.py @@ -41,6 +41,8 @@ def run_mx_reduction_operators_benchmarks(ctx=mx.cpu(), dtype='float32', profile Context to run benchmarks dtype: str, default 'float32' Precision to use for benchmarks + profiler: str, default 'native' + Type of Profiler to use (native/python) warmup: int, default 25 Number of times to run for warmup runs: int, default 100 diff --git a/benchmark/opperf/nd_operations/sorting_searching_operators.py b/benchmark/opperf/nd_operations/sorting_searching_operators.py index 373f64ea3af8..2d936cdc48ca 100644 --- a/benchmark/opperf/nd_operations/sorting_searching_operators.py +++ b/benchmark/opperf/nd_operations/sorting_searching_operators.py @@ -39,6 +39,8 @@ def run_sorting_searching_operators_benchmarks(ctx=mx.cpu(), dtype='float32', pr Context to run benchmarks dtype: str, default 'float32' Precision to use for benchmarks + profiler: str, default 'native' + Type of Profiler to use (native/python) warmup: int, default 25 Number of times to run for warmup runs: int, default 100 diff --git a/benchmark/opperf/nd_operations/unary_operators.py b/benchmark/opperf/nd_operations/unary_operators.py index f7a8caf62db1..fdbf01aa41c6 100644 --- a/benchmark/opperf/nd_operations/unary_operators.py +++ b/benchmark/opperf/nd_operations/unary_operators.py @@ -45,6 +45,8 @@ def run_mx_unary_operators_benchmarks(ctx=mx.cpu(), dtype='float32', profiler='n Context to run benchmarks dtype: str, default 'float32' Precision to use for benchmarks + profiler: str, default 'native' + Type of Profiler to use (native/python) warmup: int, default 25 Number of times to run for warmup runs: int, default 100 diff --git a/benchmark/opperf/utils/common_utils.py b/benchmark/opperf/utils/common_utils.py index fa0331f3468e..924d2fa9a23b 100644 --- a/benchmark/opperf/utils/common_utils.py +++ b/benchmark/opperf/utils/common_utils.py @@ -141,10 +141,11 @@ def _prepare_markdown(results, runtime_features=None, profiler='native'): results_markdown.append( "| Operator | Avg Forward Time (ms) | Avg. Backward Time (ms) | Max Mem Usage (Storage) (Bytes)" " | Inputs |") + results_markdown.append("| :---: | :---: | :---: | :---: | :---: |") elif profiler == 'python': results_markdown.append( "| Operator | Avg Time (ms) | P50 Time (ms) | P90 Time (ms) | P99 Time (ms) | Inputs |") - results_markdown.append("| :---: | :---: | :---: | :---: | :---: | :---: |") + results_markdown.append("| :---: | :---: | :---: | :---: | :---: | :---: |") for op, op_bench_results in sorted(results.items(), key=itemgetter(0)): for op_bench_result in op_bench_results: