-
Notifications
You must be signed in to change notification settings - Fork 802
[SYCL] Initial implementation of invoke_simd
and uniform
extensions.
#5871
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
Conversation
67891ad
to
b8ba8ab
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
@rolandschulz, please also review |
6d0c3f7
to
91ce864
Compare
Had to rebase to import some recent fixes in other places. @rolandschulz, @Pennycook, @s-kanaev - please review |
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
9d1e5c3
to
3df8dad
Compare
- invoke_simd: https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/proposed/sycl_ext_oneapi_invoke_simd.asciidoc Current limitations: * function pointers and lambdas not supported * simd width fixed to 16, must be auto-deduced in future * bool parameter type not supported - uniform: https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/proposed/sycl_ext_oneapi_uniform.asciidoc Signed-off-by: Konstantin S Bobrovsky <[email protected]>
- Improvements based on @rolandschulz's POC: * auto-deduce the subgroup size * support lambdas and functors - Added more compilation test cases - Split __builtin_invoke_simd into two overloads - Added TODO about uniform handling in the compiler
- fix compilation errors of other tests related to incorrect sub_group namespace in forward declaration in uniform.hpp - fix test to add SYCL_EXTERNAL to undefined functor's '()' operators Signed-off-by: Konstantin S Bobrovsky <[email protected]>
Signed-off-by: Konstantin S Bobrovsky <[email protected]>
Signed-off-by: Konstantin S Bobrovsky <[email protected]>
Signed-off-by: Konstantin S Bobrovsky <[email protected]>
a767c1c
to
b910f4f
Compare
de3a83b
to
83c6872
Compare
The only failure is unrelated - clang FE crash on Printf/long.cpp:
|
@rolandschulz, @Pennycook, @s-kanaev, please take one more look. I had to fight some of Linux-only failures (bug in glibcxx, different |
#else | ||
{ | ||
// __builtin_invoke_simd is not supported on the host device yet | ||
throw sycl::feature_not_supported(); |
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.
Please do not use the deprecated API. I recently made corresponding change to fix warnings: #5861
(There are few more similar places below)
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.
throw sycl::feature_not_supported(); | |
__ESIMD_UNSUPPORTED_ON_HOST; |
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.
thanks, will address in a separate PR.
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.
Approving because I don't want to block this. But I suspect that we will have to revisit the sub_group
question I raised in #5871 (comment).
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.
Please fix the usage of deprecated feature_not_supported() in follow-up PR.
John, does this address the concern - #5871 (comment) ? |
The uniform extension was implemented in intel#5871. Move the extension specification document to the "experimental" directory.
The uniform extension was implemented in #5871. Move the extension specification document to the "experimental" directory, and update to the latest specification template. Also fix a small bug in the implementation. The `sycl::id` type should not be disallowed for use in `uniform`. Although, it is invalid to pass the work-item's ID to `uniform` (because that value is not uniform across all work-items), the user could construct their own `id` that does have a uniform value.
invoke_simd:
https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/proposed/sycl_ext_oneapi_invoke_simd.asciidoc
Current limitations:
Based on POC by @rolandschulz.
uniform:
https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/proposed/sycl_ext_oneapi_uniform.asciidoc
Signed-off-by: Konstantin S Bobrovsky [email protected]