Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 2c66267

Browse files
committed
[SYCL][Matrix][Element-wise-ops] correct the reference multiplication
Signed-off-by: Dounia Khaldi <[email protected]>
1 parent 4e144b1 commit 2c66267

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

SYCL/Matrix/element_wise_ops.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ void matrix_multiply(big_matrix<T1, NUM_ROWS_C, NUM_COLS_C> &C,
9595
sg_starty / SG_SZ * TN * 4,
9696
N * 4, matrix_layout::packed_b);
9797
sub_c = joint_matrix_mad(sg, sub_a, sub_b, sub_c);
98-
auto wi_slice_c = sub_c.get_wi_data();
99-
for (int i = 0; i < wi_slice_c.length(); i++) {
100-
wi_slice_c[i] *= 2;
101-
}
98+
}
99+
auto wi_slice_c = sub_c.get_wi_data();
100+
for (int i = 0; i < wi_slice_c.length(); i++) {
101+
wi_slice_c[i] *= 2;
102102
}
103103
joint_matrix_store(sg, sub_c,
104104
accC.get_pointer() + (sg_startx * TM) * N +
@@ -130,6 +130,7 @@ void matrix_multiply_ref(int32_t *A_mem, int32_t *B_mem, int32_t *C_mem, int M,
130130
}
131131
*(C_mem + m * N + n) = acc;
132132
}
133+
*(C_mem + m * N + n) *= 2;
133134
}
134135
}
135136

0 commit comments

Comments
 (0)