Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down