Skip to content

Commit 5dece3a

Browse files
committed
bf16
1 parent e78874a commit 5dece3a

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

checks/microbenchmarks/gpu/dgemm/coralgemm.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@ class CoralGemm(rfm.RegressionTest):
2727
tags = {'production', 'uenv', 'benchmark', 'bencher'}
2828

2929
# Sweep matrix sizes and precisions
30+
# dimensions are in bytes for one dimension of a square matrix
3031
_size_bytes = parameter([12800, 25600, 51200, 128000])
31-
_precisions = parameter(['R_32F', 'R_64F'])
32+
# _size_bytes = parameter([12800])
33+
# _precisions = parameter(['R_16B', 'R_32F', 'R_64F'])
34+
_precisions = parameter(['R_16B'])
3235

3336
# Data precision for matrix A, B, C and computation
3437
precision_A = variable(str, value='R_64F')
@@ -120,8 +123,12 @@ def set_executable(self):
120123
self.precision_C = self._precisions
121124
self.compute_precision = self._precisions
122125

126+
if self.precision_A == 'R_16B':
127+
self.precision_C = 'R_32F'
128+
self.compute_precision = 'R_32F'
129+
123130
# Adjust matrix sizes based on the current parameters
124-
if self.precision_A == 'R_32F':
131+
if self.precision_C == 'R_32F':
125132
self.M = self._size_bytes // 4
126133
self.N = self._size_bytes // 4
127134
self.K = self._size_bytes // 4
@@ -152,6 +159,10 @@ def set_executable(self):
152159
f'{self.duration}'
153160
]
154161

162+
# Fix option for BF16 precision
163+
if self._precisions == 'R_16B':
164+
self.executable_opts.append('ex')
165+
155166
# Set optional arguments of the benchmark
156167
if self.batched:
157168
self.executable_opts.append('batched')
@@ -255,14 +266,17 @@ def set_references(self):
255266
# These are the average GFLOPS observed on the respective systems,
256267
# sizes are in bytes.
257268
'mi200': {
269+
'R_16B': {12800: 92955, 25600: 108550, 51200: 119803, 128000: 87451},
258270
'R_32F': {12800: 31598, 25600: 30690, 51200: 32907, 128000: 28638},
259271
'R_64F': {12800: 19102, 25600: 23178, 51200: 26740, 128000: 23870}
260272
},
261273
'mi300': {
274+
'R_16B': {12800: 230008, 25600: 428416, 51200: 389497, 128000: 273200},
262275
'R_32F': {12800: 64777, 25600: 74340, 51200: 80478, 128000: 67092},
263276
'R_64F': {12800: 25702, 25600: 52668, 51200: 60874, 128000: 53913}
264277
},
265278
'gh200': {
279+
'R_16B': {12800: 548292, 25600: 570109, 51200: 574525, 128000: 599912},
266280
'R_32F': {12800: 47849, 25600: 50990, 51200: 52200, 128000: 51011},
267281
'R_64F': {12800: 42362, 25600: 40700, 51200: 39845, 128000: 51717}
268282
},

0 commit comments

Comments
 (0)