Skip to content

Commit f8f09fe

Browse files
fix bug
1 parent eeb1ff2 commit f8f09fe

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

sycl/test-e2e/Matrix/get_coordinate_ops_impl.hpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -136,22 +136,22 @@ void test_get_coord_op() {
136136
matrix_sum<T, TResult, Rows, Cols, SROWS, SCOLS, Use, Layout, VF>(
137137
MM, sum_rows, sum_cols);
138138

139-
for (int i = 0; i < Rows; i++) {
140-
for (int j = 0; j < Cols; j++) {
141-
sum_rows_ref[i] += (int)M[i][j];
142-
}
143-
assert(std::fabs(sum_rows_ref[i] - sum_rows[i]) <= FLOAT_EPSILON);
144-
}
145-
146139
// This condition check can be removed once the IGC PR resolving the Matrix B row
147140
// coordinate bug is pull downed to the driver.
148-
if (Use == use::b) {
149-
for (int j = 0; j < Cols; j++) {
150-
for (int i = 0; i < Rows; i++) {
151-
sum_cols_ref[j] += (int)M[i][j];
141+
if (Use != use::b) {
142+
for (int i = 0; i < Rows; i++) {
143+
for (int j = 0; j < Cols; j++) {
144+
sum_rows_ref[i] += (int)M[i][j];
152145
}
153-
assert(std::fabs(sum_cols_ref[j] - sum_cols[j]) <= FLOAT_EPSILON);
146+
assert(std::fabs(sum_rows_ref[i] - sum_rows[i]) <= FLOAT_EPSILON);
147+
}
148+
}
149+
150+
for (int j = 0; j < Cols; j++) {
151+
for (int i = 0; i < Rows; i++) {
152+
sum_cols_ref[j] += (int)M[i][j];
154153
}
154+
assert(std::fabs(sum_cols_ref[j] - sum_cols[j]) <= FLOAT_EPSILON);
155155
}
156156
}
157157

0 commit comments

Comments
 (0)