-
Notifications
You must be signed in to change notification settings - Fork 738
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
Conversation
2951099
to
5f47483
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
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 |
There was a problem hiding this 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
Gen12 issue is #14248 but I restarted the job, I would prefer we run the tests before merging so we don't break postcommit. |
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>
tovec<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.