Skip to content

[SYCL][Matrix] Add support for tf32 type using the unified interface #8151

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

Closed
wants to merge 8 commits into from

Conversation

dkhaldi
Copy link
Contributor

@dkhaldi dkhaldi commented Jan 30, 2023

No description provided.

@dkhaldi dkhaldi requested a review from a team as a code owner January 30, 2023 17:32
@dkhaldi dkhaldi requested a review from JackAKirk January 30, 2023 17:42
@JackAKirk
Copy link
Contributor

LGTM.

Intel backend also does not support tf32 for Accumulator right?

btw I think this patch will also allow you to load joint_matrix from const T. You might want to just verify this works.

}
for (int i = 0; i < get_wi_data(sg, sub_b).length(); i++) {
get_wi_data(sg, sub_b)[i] =
round_to_tf32(static_cast<float>(get_wi_data(sg, sub_b)[i]));
Copy link
Contributor

Choose a reason for hiding this comment

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

is this static_cast<float> required?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No it is not needed I will remove it

@dkhaldi dkhaldi temporarily deployed to aws January 30, 2023 18:23 — with GitHub Actions Inactive
@dkhaldi dkhaldi temporarily deployed to aws February 1, 2023 03:55 — with GitHub Actions Inactive
@dkhaldi dkhaldi temporarily deployed to aws February 6, 2023 20:35 — with GitHub Actions Inactive
// function will work on truncated floats.
for (int i = 0; i < get_wi_data(sg, sub_a).length(); i++) {
get_wi_data(sg, sub_a)[i] =
round_to_tf32(get_wi_data(sg, sub_a)[i]);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

add round_to_tf32 that takes a matrix as an input and returns a matrix as an output. This gives a flexibility to the implementation

Copy link
Contributor

@MrSidims MrSidims left a comment

Choose a reason for hiding this comment

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

The patch is LGTM
Please hold the merge for a bit to clarify SPIR-V instruction name (Convert Vs Round)

@dkhaldi dkhaldi temporarily deployed to aws February 28, 2023 20:36 — with GitHub Actions Inactive
@dkhaldi dkhaldi temporarily deployed to aws March 16, 2023 19:20 — with GitHub Actions Inactive
@dkhaldi dkhaldi closed this Mar 20, 2023
@dkhaldi
Copy link
Contributor Author

dkhaldi commented Mar 20, 2023

Replaced with the following:
#8702

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