File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -120,13 +120,13 @@ int main() {
120
120
for (int j = 0 ; j < MATRIX_K; j++) {
121
121
// bfloat16 is created using unsigned short since conversion from float to
122
122
// bfloat16 is not supported on the host side yet
123
- A[i][j] = bfloat16::from_bits ( make_bf16 ( 1 .0f * (i + j) ));
123
+ A[i][j] = bfloat16 ( 1 .0f * (i + j));
124
124
Aref[i][j] = make_bf16 (1 .0f * (i + j));
125
125
}
126
126
}
127
127
for (int i = 0 ; i < MATRIX_K / 2 ; i++) {
128
128
for (int j = 0 ; j < MATRIX_N * 2 ; j++) {
129
- B[i][j] = bfloat16::from_bits (( make_bf16 ( 2 .0f * i + 3 .0f * j)) );
129
+ B[i][j] = bfloat16 ( 2 .0f * i + 3 .0f * j);
130
130
Bref[i][j] = make_bf16 (2 .0f * i + 3 .0f * j);
131
131
}
132
132
}
Original file line number Diff line number Diff line change @@ -120,13 +120,13 @@ int main() {
120
120
for (int j = 0 ; j < MATRIX_K; j++) {
121
121
// bfloat16 is created using unsigned short since conversion from float to
122
122
// bfloat16 is not supported on the host side yet
123
- A[i][j] = bfloat16::from_bits ( make_bf16 ( 1 .0f * (i + j) ));
123
+ A[i][j] = bfloat16 ( 1 .0f * (i + j));
124
124
Aref[i][j] = make_bf16 (1 .0f * (i + j));
125
125
}
126
126
}
127
127
for (int i = 0 ; i < MATRIX_K / 2 ; i++) {
128
128
for (int j = 0 ; j < MATRIX_N * 2 ; j++) {
129
- B[i][j] = bfloat16::from_bits (( make_bf16 ( 2 .0f * i + 3 .0f * j)) );
129
+ B[i][j] = bfloat16 ( 2 .0f * i + 3 .0f * j);
130
130
Bref[i][j] = make_bf16 (2 .0f * i + 3 .0f * j);
131
131
}
132
132
}
You can’t perform that action at this time.
0 commit comments