Skip to content

Conversation

@fineg74
Copy link
Contributor

@fineg74 fineg74 commented Aug 11, 2022

No description provided.

@fineg74 fineg74 requested a review from a team as a code owner August 11, 2022 17:40
__ESIMD_NS::simd<T0, SZ>>
rol(__ESIMD_NS::simd<T1, SZ> src0, __ESIMD_NS::simd<T1, SZ> src1) {
__ESIMD_API std::enable_if_t<
__ESIMD_NS::detail::is_type<T0, int16_t, uint16_t, int32_t, uint32_t>() &&
Copy link
Contributor

Choose a reason for hiding this comment

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

This code needs more corrections to follow the restrictions in HW instructions.

  1. int64 vectors are allowed for PVC+

  2. it is not obvious from GenX-Intrinsics and bSPEC, but the HW instruction expects same bit-width for destination and source. If so, we could pass only 1 type to __esimd_rol

Potentially, instead of generating __esimd_rol we could generate SPIRV instruction rotate from this extended inst set: https://registry.khronos.org/SPIR-V/specs/unified1/OpenCL.ExtendedInstructionSet.100.html
Not sure though if GPU RT already supports it.
If it is supported, then perhaps it could emulate rol/ror for int64 even when HW doesn't support it.

Adding @vmustya and @kbobrovs to reviewers as well

Copy link
Contributor Author

@fineg74 fineg74 Aug 15, 2022

Choose a reason for hiding this comment

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

Not sure about about 2nd point : any combination of 16 bit and 32 bits arguments works for me without any issues.

@v-klochkov v-klochkov requested a review from kbobrovs August 15, 2022 18:18
@v-klochkov
Copy link
Contributor

The failed tests are unrelated and already fixed by other commits in llvm-test-suite:

Failed Tests (1):
SYCL :: XPTI/kernel/content.cpp
Unexpectedly Passed Tests (2):
SYCL :: SubGroup/reduce_spirv13.cpp
SYCL :: SubGroup/reduce_spirv13_fp64.cpp

@v-klochkov v-klochkov merged commit b05f256 into intel:sycl Aug 23, 2022
@fineg74 fineg74 deleted the BitShiftType branch August 23, 2022 16:50
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.

2 participants