Skip to content

Commit

Permalink
[test-e2e][Matrix] Fix joint matrix load address (#10259)
Browse files Browse the repository at this point in the history
The loading address didn't calculate the column offset right w.r.t the
sub-group id.

Signed-off-by: Yilong Guo <yilong.guo@intel.com>
  • Loading branch information
Nuullll authored Jul 11, 2023
1 parent 00533e0 commit 276b9cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions sycl/test-e2e/Matrix/get_coord_bf16_matA_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ void matrix_sum_rows(queue q, big_matrix<T, M, K> &A, nd_range<2> &r) {
sub_a;

joint_matrix_load(
sg, sub_a, accA.template get_multi_ptr<access::decorated::no>() + (global_idx * TM * K) + TK,
sg, sub_a, accA.template get_multi_ptr<access::decorated::no>() + (sg_startx * TM * K) + sg_starty / SG_SZ * TK,
K);

// calculate sum of rows in sum_rows_v[8], there are 8 rows in sub_a
Expand Down Expand Up @@ -175,7 +175,7 @@ int main() {

for (int i = 0; i < MATRIX_M; i++) {
for (int j = 0; j < MATRIX_K; j++) {
A[i][j] = i;
A[i][j] = i + j;
}
}

Expand Down
4 changes: 2 additions & 2 deletions sycl/test-e2e/Matrix/get_coord_bf16_matB_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ void matrix_sum_cols(queue q, big_matrix<T, M, N> &B, nd_range<2> &r) {
joint_matrix_load(
sg, sub_b,
accB.template get_multi_ptr<access::decorated::no>() +
(global_idx * (TK / 4) * N) + sg_starty / SG_SZ * TN * 4,
(sg_startx * (TK / 4) * N) + sg_starty / SG_SZ * TN * 4,
N);

int32_t sum_local_cols[N] = {0}; // 4 local cols, N total
Expand Down Expand Up @@ -207,7 +207,7 @@ int main() {

for (int i = 0; i < MATRIX_K; i++) {
for (int j = 0; j < MATRIX_N; j++) {
B[i][j] = i;
B[i][j] = i + j;
}
}

Expand Down

0 comments on commit 276b9cf

Please sign in to comment.