-
Notifications
You must be signed in to change notification settings - Fork 768
[SYCL] Align sub-group implementation and docs #1922
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
- Remove previously deprecated functions - Deprecate two-input shuffles - Fix linear_id type (size_t => uint32_t) Signed-off-by: John Pennycook <[email protected]>
Preparation for updated sub-group features. Combining files to avoid accidental interface differences. Signed-off-by: John Pennycook <[email protected]>
Signed-off-by: John Pennycook <[email protected]>
Signed-off-by: John Pennycook <[email protected]>
- get_group_range() changed from uint32_t to range<1> - get_uniform_group_range() no longer supported Signed-off-by: John Pennycook <[email protected]>
Signed-off-by: John Pennycook <[email protected]>
Signed-off-by: John Pennycook <[email protected]>
@bader Could you please take a look at the failing tests for me? I can't see how the failure relates to these changes. |
I think these failures are caused by your changes: D:\BuildBot\Product_worker_intel\sycl-win-x64-pr\llvm.src\sycl\include\CL/sycl/intel/sub_group.hpp(281): error C2491: 'cl::sycl::intel::sub_group::shuffle': definition of dllimport function not allowed If you think internal testing failures are not related to your patch, please, file a bug report. |
Sorry, you're right. I was focusing on the traceback and somehow missed those three lines. Thanks for the help! |
Signed-off-by: John Pennycook <[email protected]>
@alexbatashev : The failures seem related to your change in 1280554, which replaced Have I made a mistake here, or is there something wrong with using |
The author is Alexander Batashev, not Alexey Bataev. |
I've updated the account id to @alexbatashev in the original comment. Sorry for inconvenience. |
Sorry about the mix-up. |
The comp fails seem like we need to bring back __SYCL_DEPRECATED. __SYCL_EXPORT_DEPRECATED adding __dllimport is breaking things. I'm fine with going ahead with that. |
__SYCL_EXPORT_DEPRECATED() should not apply to header-only functions. Signed-off-by: John Pennycook <[email protected]>
The original |
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
Meaning of barrier() was ambiguous, and could have meant: - New barrier() with no fence_space argument - Old barrier() with default fence_space argument Signed-off-by: John Pennycook <[email protected]>
048dca0
please resolve conflict. |
Signed-off-by: John Pennycook <[email protected]>
One more conflict in place... |
Signed-off-by: John Pennycook <[email protected]>
Signed-off-by: John Pennycook <[email protected]>
Removing the sub-group collectives is leading to CI failures, so I've put them back in for now to help us close this PR. We should revisit and remove the deprecated functions later. |
Signed-off-by: John Pennycook <[email protected]>
Really sorry @AlexeySachkov; the previous commit didn't include all of my local changes, and I didn't catch it until buildbot failed. To save you from having to review this over and over, I'll ping you when the tests have passed. |
@AlexeySachkov, @vladimirlaz: The tests all passed this time, so I think this is ready for merge. Thanks for your help with this. |
Optimized LLVM IR started to contain this intrinsic recently after InstCombine updates, like: "Fold and/or of fcmp into class" ( 08f0388 ) There is no direct counterpart for it in SPIR-V, so testing is mapped on a sequence of SPIR-V instructions: test for both qnan and snan -> OpIsNan test for either of qnan and snan -> isquiet(V) ==> abs(V) >= (unsigned(Inf) | quiet_bit) issignaling(V) ==> isnan(V) && !isquiet(V) test for neg/pos inf -> OpIsInf + OpSignBitSet test for neg/pos normal -> OpIsNormal + OpSignBitSet test for neg/pos subnormal -> issubnormal(V) ==> unsigned(abs(V) - 1) < (all mantissa bits set) test for neg/pos zero -> compare bitcasted to int float with 0 + OpSignBitSet Signed-off-by: Sidorov, Dmitry <[email protected]> Original commit: KhronosGroup/SPIRV-LLVM-Translator@0617edd
Signed-off-by: John Pennycook [email protected]
Brings the sub-group implementation closer in line with the specification update from #1565. Includes some minor refactoring to simplify the implementation of requested features (e.g. #1885 and #1916).