Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SYCL][E2E] Update get_coordinate tests to verify both row and columns #15880

Merged
merged 10 commits into from
Dec 19, 2024

Conversation

YixingZhang007
Copy link
Contributor

@YixingZhang007 YixingZhang007 commented Oct 26, 2024

Improving Test Coverage and Cleanliness:

  • Implement validation for the get_coordinate function to check both row and column indices for all matrix types in get_coordinate_ops.cpp.
  • Remove the original tests: get_coord_int8_matA.cpp, get_coord_int8_matB.cpp, and get_coord_float_matC.cpp. These tests have been consolidated and are now included in get_coordinate_ops.cpp.

@YixingZhang007 YixingZhang007 requested a review from a team as a code owner October 26, 2024 00:02
@YixingZhang007 YixingZhang007 marked this pull request as draft October 26, 2024 00:02
@YixingZhang007 YixingZhang007 self-assigned this Oct 26, 2024
@YixingZhang007 YixingZhang007 changed the title Update get_coordinate tests to verify both row and columns for all matrix types Update get_coordinate tests to verify both row and columns Oct 26, 2024
@YixingZhang007 YixingZhang007 changed the title Update get_coordinate tests to verify both row and columns [SYCL][E2E] Update get_coordinate tests to verify both row and columns Oct 26, 2024
@YixingZhang007
Copy link
Contributor Author

This PR is still in progress. There might be some code clean up needed to be done.

@uditagarwal97
Copy link
Contributor

@YixingZhang007 I've updated the PR description to remove the JIRA link. The policy does not allow using internal JIRA links in open-source, only JIRA ticket numbers are allowed.

@YixingZhang007 YixingZhang007 force-pushed the update_get_coordinate_tests branch from f613e96 to fc048c9 Compare October 30, 2024 22:18
@YixingZhang007 YixingZhang007 force-pushed the update_get_coordinate_tests branch from b034c02 to be1187a Compare October 31, 2024 20:05
@YixingZhang007 YixingZhang007 marked this pull request as ready for review December 18, 2024 19:23
@YixingZhang007 YixingZhang007 requested a review from a team as a code owner December 18, 2024 19:23

// This condition check can be removed once the IGC PR resolving the Matrix B
// row coordinate bug is pull downed to the driver.
if (Use != use::b) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not needed anymore

Copy link
Contributor

@dkhaldi dkhaldi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dkhaldi
Copy link
Contributor

dkhaldi commented Dec 19, 2024

Ping @intel/llvm-reviewers-runtime

@YixingZhang007
Copy link
Contributor Author

@intel/llvm-gatekeepers This PR has been approved and all CI tests passed. Could you please help merge this PR? Thanks!

@againull againull merged commit 7f465fc into intel:sycl Dec 19, 2024
14 checks passed
Comment on lines +86 to +108
for (int i = 0; i < NUM_ROWS; i++) {
sum_local_rows[i] =
reduce_over_group(sg, sum_local_rows[i], sycl::plus<>());
// only Groups leader perform the global reduction
if (global_idy % sg_size == 0) {
sycl::atomic_ref<TResult, sycl::memory_order::relaxed,
sycl::memory_scope::device>
aref(v_rows[i]);
aref.fetch_add(sum_local_rows[i]);
}
}

for (int i = 0; i < NUM_COLS; i++) {
sum_local_cols[i] =
reduce_over_group(sg, sum_local_cols[i], sycl::plus<>());
// only Groups leader perform the global reduction
if (global_idy % sg_size == 0) {
sycl::atomic_ref<TResult, sycl::memory_order::relaxed,
sycl::memory_scope::device>
aref(v_cols[i]);
aref.fetch_add(sum_local_cols[i]);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@YixingZhang007 this code is duplicated. Would be great to outline it to function and reuse.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion! I have created a PR for fixing this. The link to the PR is #16429

Comment on lines +127 to +131
for (int i = 0; i < Rows; i++) {
for (int j = 0; j < Cols; j++) {
M[i][j] = i + j;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@YixingZhang007 , we have matrix_fill in common.hpp to not duplicate such loops in each test.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I have changed this.

{1, 1 * sg_size}),
[=](nd_item<2> spmd_item)
#ifdef SG_SZ
[[intel::reqd_sub_group_size(SG_SZ)]]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

attribute 'intel::reqd_sub_group_size' is deprecated

sycl::reqd_sub_group_size should be used

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the mistake! I have fix this in the other PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants