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] Optimize vec<bfloat> math builtins #14106

Merged
merged 5 commits into from
Jun 25, 2024

Conversation

uditagarwal97
Copy link
Contributor

@uditagarwal97 uditagarwal97 commented Jun 9, 2024

Followup and blocked by: #14105

Currently, vec<bfloat> math builtins do element-by-element operations.
This PR optimize vec<bfloat> math builtins by:
(1) Converting vec<bfloat> to vec<float>.
(2) Do the operation on vec<float> (which uses Spirv built-ins underneath for optimized vector operations).
(3) Convert back the return value to vec<bfloat>.

Look at the beautiful diff in check_device_code/vector/vector_bf16_builtins.cpp to visualize the device code generated before and after this optimization.

@uditagarwal97 uditagarwal97 marked this pull request as ready for review June 22, 2024 02:08
@uditagarwal97 uditagarwal97 requested a review from a team as a code owner June 22, 2024 02:08
Copy link
Contributor

@maarquitos14 maarquitos14 left a comment

Choose a reason for hiding this comment

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

LGTM.

@uditagarwal97
Copy link
Contributor Author

The failure in Gen12 Windows is unrelated and likely an infrastructure issue.

@intel/llvm-gatekeepers the PR is ready to be merged!

@uditagarwal97
Copy link
Contributor Author

The failure in Gen12 Windows is unrelated and likely an infrastructure issue.

@intel/llvm-gatekeepers the PR is ready to be merged!

Ahh.. I overlooked the pending review from @intel/dpcpp-tools-reviewers

Copy link
Contributor

@sarnex sarnex left a comment

Choose a reason for hiding this comment

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

sycl/test-e2e/BFloat16/bfloat16_vec_builtins.cpp LGTM, seems like whitespace only changes

@sarnex
Copy link
Contributor

sarnex commented Jun 24, 2024

Gen12 issue is #14248 but I restarted the job, I would prefer we run the tests before merging so we don't break postcommit.

@againull againull merged commit 0032a84 into intel:sycl Jun 25, 2024
13 checks passed
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