Benchmarks: Micro benchmark - add initialization options for rocm gemm flops (#578)
**Description** add initialization options for rocm gemm flops.
This commit is contained in:
Родитель
79089b6517
Коммит
2235e084ab
|
@ -91,6 +91,14 @@ class RocmGemmFlopsBenchmark(GemmFlopsBenchmark):
|
|||
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 @@ class RocmGemmFlopsBenchmark(GemmFlopsBenchmark):
|
|||
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 @@ class RocmGemmFlopsTest(BenchmarkTestCase, unittest.TestCase):
|
|||
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,
|
||||
|
|
Загрузка…
Ссылка в новой задаче