Skip to content

[Matrix][SYCL] Refactor matrix feature header file #5532

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

Merged
merged 5 commits into from
Feb 28, 2022

Conversation

yubingex007-a11y
Copy link
Contributor

@yubingex007-a11y yubingex007-a11y commented Feb 10, 2022

Allow operands of different type in some overloaded function in wi_element.

@yubingex007-a11y yubingex007-a11y changed the title [Matrix][SYCL] Refactor matrix feature's header file [Matrix][SYCL] Refactor matrix feature's header file and allow operands of different type in some overloaded function in wi_element Feb 10, 2022
Comment on lines 340 to 349
OP(T, +)
OP(T, -)
OP(T, *)
OP(T, /)
OP(bool, ==)
OP(bool, !=)
OP(bool, <)
OP(bool, >)
OP(bool, <=)
OP(bool, >=)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

should we delete all the overloaded operator's function since implicit conversion from wi_element to T is provided?
Of course we should keep overloaded operator's function of the bfloat16.

@yubingex007-a11y yubingex007-a11y requested review from LuoYuanke and dkhaldi and removed request for dkhaldi February 15, 2022 08:39
@yubingex007-a11y yubingex007-a11y marked this pull request as ready for review February 15, 2022 08:39
@yubingex007-a11y yubingex007-a11y requested a review from a team as a code owner February 15, 2022 08:39
@yubingex007-a11y
Copy link
Contributor Author

@Nuullll

@yubingex007-a11y
Copy link
Contributor Author

ping?

AlexeySotkin
AlexeySotkin previously approved these changes Feb 17, 2022
@yubingex007-a11y
Copy link
Contributor Author

yubingex007-a11y commented Feb 18, 2022

@steffenlarsen @dkhaldi any comments?

Copy link
Contributor

@steffenlarsen steffenlarsen left a comment

Choose a reason for hiding this comment

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

Always happy to see a reduction in repeated code! Generally it looks great, I just have a couple suggestions.

static uint16_t convert(const T &from) { return make_bf16(from); }
};
#if __SYCL_DEVICE_ONLY__
#define OP(input_type, type, op) \
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Eh, I am not gifted at naming, do we have a better naming style for 'inuput_type' here? actually it represents input type of 'convert' function.

steffenlarsen
steffenlarsen previously approved these changes Feb 24, 2022
Copy link
Contributor

@steffenlarsen steffenlarsen left a comment

Choose a reason for hiding this comment

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

LGTM! Just one minor suggestion.

@yubingex007-a11y
Copy link
Contributor Author

@bader @vladimirlaz could you please help us merge it?

@bader bader changed the title [Matrix][SYCL] Refactor matrix feature's header file and allow operands of different type in some overloaded function in wi_element [Matrix][SYCL] Refactor matrix feature header file Feb 28, 2022
@bader bader merged commit 1c6bfa8 into intel:sycl Feb 28, 2022
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.

4 participants