Skip to content

Commit 284e842

Browse files
committed
bf16
1 parent e78874a commit 284e842

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

checks/microbenchmarks/gpu/dgemm/coralgemm.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ 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+
_precisions = parameter(['R_16B', 'R_32F', 'R_64F'])
3233

3334
# Data precision for matrix A, B, C and computation
3435
precision_A = variable(str, value='R_64F')
@@ -120,8 +121,12 @@ def set_executable(self):
120121
self.precision_C = self._precisions
121122
self.compute_precision = self._precisions
122123

124+
if self.precision_A == 'R_16B':
125+
self.precision_C = 'R_32F'
126+
self.compute_precision = 'R_32F'
127+
123128
# Adjust matrix sizes based on the current parameters
124-
if self.precision_A == 'R_32F':
129+
if self.precision_C == 'R_32F':
125130
self.M = self._size_bytes // 4
126131
self.N = self._size_bytes // 4
127132
self.K = self._size_bytes // 4
@@ -152,6 +157,10 @@ def set_executable(self):
152157
f'{self.duration}'
153158
]
154159

160+
# Fix option for BF16 precision
161+
if self._precisions == 'R_16B':
162+
self.executable_opts.append('ex')
163+
155164
# Set optional arguments of the benchmark
156165
if self.batched:
157166
self.executable_opts.append('batched')
@@ -255,14 +264,17 @@ def set_references(self):
255264
# These are the average GFLOPS observed on the respective systems,
256265
# sizes are in bytes.
257266
'mi200': {
267+
'R_16B': {12800: 92955, 25600: 108550, 51200: 119803, 128000: 87451},
258268
'R_32F': {12800: 31598, 25600: 30690, 51200: 32907, 128000: 28638},
259269
'R_64F': {12800: 19102, 25600: 23178, 51200: 26740, 128000: 23870}
260270
},
261271
'mi300': {
272+
'R_16B': {12800: 230008, 25600: 428416, 51200: 389497, 128000: 273200},
262273
'R_32F': {12800: 64777, 25600: 74340, 51200: 80478, 128000: 67092},
263274
'R_64F': {12800: 25702, 25600: 52668, 51200: 60874, 128000: 53913}
264275
},
265276
'gh200': {
277+
'R_16B': {12800: 548292, 25600: 570109, 51200: 574525, 128000: 599912},
266278
'R_32F': {12800: 47849, 25600: 50990, 51200: 52200, 128000: 51011},
267279
'R_64F': {12800: 42362, 25600: 40700, 51200: 39845, 128000: 51717}
268280
},

0 commit comments

Comments
 (0)