Unverified Commit 2235e084 authored by Yuting Jiang's avatar Yuting Jiang Committed by GitHub
Browse files

Benchmarks: Micro benchmark - add initialization options for rocm gemm flops (#578)

**Description**
add initialization options for rocm gemm flops.
parent 79089b65
......@@ -91,6 +91,14 @@ def add_parser_arguments(self):
required=False,
help='Specifies the scalar beta.',
)
self._parser.add_argument(
'--initialization',
type=str,
default='hpl',
choices=['rand_int', 'trig_float', 'hpl'],
required=False,
help='Initialize with random integers, trig functions sin and cos, or hpl-like input.',
)
def _preprocess(self):
"""Preprocess/preparation operations before the benchmarking.
......@@ -110,6 +118,7 @@ def _preprocess(self):
command += ' --lda {} --ldb {} --ldc {} --ldd {}'.format(
self._args.lda, self._args.ldb, self._args.ldc, self._args.ldd
)
command += ' --initialization {}'.format(self._args.initialization)
self._commands.append(command)
return True
......
......@@ -43,7 +43,7 @@ def test_rocm_flops_performance(self):
assert (benchmark._args.k == 8192)
params = '--transposeA N --transposeB T -m 7680 -n 8192 -k 8192' + \
' --alpha 1 --beta 0 --lda 8384 --ldb 8384 --ldc 8384 --ldd 8384'
' --alpha 1 --beta 0 --lda 8384 --ldb 8384 --ldc 8384 --ldd 8384 --initialization hpl'
# Check command list
expected_command = [
'rocblas-bench -r f64_r -f gemm ' + params,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment