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][Joint Matrix Tests] Add fill/store/apply tests for 16x16x16, 32x64x16 #12629

Merged
merged 5 commits into from
Mar 22, 2024

Conversation

YuriPlyakhin
Copy link
Contributor

No description provided.

@YuriPlyakhin YuriPlyakhin force-pushed the add_big_comp_fill_store_test branch 2 times, most recently from 21297f1 to ba6703b Compare March 14, 2024 23:12
@YuriPlyakhin YuriPlyakhin marked this pull request as ready for review March 21, 2024 00:39
@YuriPlyakhin YuriPlyakhin requested a review from a team as a code owner March 21, 2024 00:39
@YuriPlyakhin YuriPlyakhin changed the title Add big comp fill store test [SYCL][Joint Matrix Tests] Add fill store apply tests for 16x16x16, 32x64x16 Mar 21, 2024
@YuriPlyakhin YuriPlyakhin changed the title [SYCL][Joint Matrix Tests] Add fill store apply tests for 16x16x16, 32x64x16 [SYCL][Joint Matrix Tests] Add fill/store/apply tests for 16x16x16, 32x64x16 Mar 21, 2024
sycl/test-e2e/Matrix/element_wise_ops_impl.hpp Outdated Show resolved Hide resolved
sycl/test-e2e/Matrix/element_wise_ops_impl.hpp Outdated Show resolved Hide resolved
sycl/test-e2e/Matrix/element_wise_ops_impl.hpp Outdated Show resolved Hide resolved
sycl/test-e2e/Matrix/element_wise_ops_impl.hpp Outdated Show resolved Hide resolved
sycl/test-e2e/Matrix/common.hpp Outdated Show resolved Hide resolved
Copy link
Contributor

github-actions bot commented Mar 21, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

@@ -122,7 +122,8 @@ int main() {
float>();
}
}
if (combinations[i].atype == matrix_type::sint8) {
if (combinations[i].atype == matrix_type::sint8 &&
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I noticed 2 combinations satisfy this condition, so the same tests are running 2 times on PVC, hence added one more condition, so only 1 combination satisfies the condition.

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

void matrix_multiply_ref(Ta *A, Tb *B, Tc *C, int M, int N, int K,
bool transpose_c = false, bool colmajor_a = false,
bool colmajor_b = false) {
bool colmajor_b = false, F &&lambda = {}) {
Copy link
Contributor

@dkhaldi dkhaldi Mar 22, 2024

Choose a reason for hiding this comment

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

This function got very complicated instead of just adding a new one like I suggested: matrix_multiply_apply_ref as these are two different things.
To avoid code duplication, matrix_multiply_apply_ref would call matrix_multiply_ref

Copy link
Contributor Author

@YuriPlyakhin YuriPlyakhin Mar 22, 2024

Choose a reason for hiding this comment

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

If matrix_multiply_apply_ref would call matrix_mulitply_ref, then multiplication and apply would not be fused, right? Then what is the point of adding matrix_multiply_apply_ref? Why not just use matrix_multiply_ref and then matrix_apply_ref, as I initially did?

Copy link
Contributor

Choose a reason for hiding this comment

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

I thought you did not want to fuse. In this case the point is to use modularity.
A new function with fusion would be perfect. We could outline the duplicated code in an another function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, I did not want to create a new fused version, as I thought that would be too much just for one test case. But then I figured I can make a fused version out of the existing multiply function with just a few simple changes. So I decided to produce a fused version without creating more entities. Yes, function naming is not ideal now, but overall, I don't consider it to be very complicated and it allows both multiplication and apply in a fused way, while if test requires only multiplication, call can be kept simple, as apply-related parameters are optional.

@YuriPlyakhin
Copy link
Contributor Author

@intel/llvm-gatekeepers , please, merge. all green.

@steffenlarsen steffenlarsen merged commit 84426d1 into intel:sycl Mar 22, 2024
13 checks passed
@YuriPlyakhin YuriPlyakhin deleted the add_big_comp_fill_store_test branch March 22, 2024 17:22
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.

3 participants