-
Notifications
You must be signed in to change notification settings - Fork 797
[SYCL][ESIMD][EMU] Enable dpas with ESIMD_EMULATOR backend #6475
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][ESIMD][EMU] Enable dpas with ESIMD_EMULATOR backend #6475
Conversation
dongkyunahn-intel
commented
Jul 25, 2022
- +fix for 'saturate<>' for ESIMD_EMULATOR backend
- +fix for 'saturate<>' for ESIMD_EMULATOR backend
Note : DPASW support will be enabled later as it requires updates in esimd_emulator backend interface as well as CM_EMU library for runtime support |
The patch caused compilation fail at esimd/dpas.cpp. Need additional changes.
- First argument for '__esimd_dpas_inner' is changed from 'const __ESIMD_DNS::vector_type_t<RT, SZ>' to 'const void *' - This is because 'std::addressof()' from caller generates 'short * __attribute__((ext_vector_type(16)))' that cannot be converted into 'vector_type_t<>' while 'dpas.cpp' test is compiled.
- As template and runtime arguments are different (e.g. 'dpas_info' is not used in ESIMD_EMULATOR backend (hostmode))
Thanks @dongkyunahn-intel, do you know anything about SYCL :: unused_spec_const.cpp ? |
@pvchupin , as far as I know 'spec_const' tests are disabled for ESIMD_EMULATOR backend as they are failing with |
sycl/include/sycl/ext/intel/experimental/esimd/detail/math_intrin.hpp
Outdated
Show resolved
Hide resolved
- Template arguments for dpas operations (repeat count, systolic depth, src1_precision, src2_precision) are converted into runtime arguments - __esimd_dpas* functions have same signature regardless of __SYCL_DEVICE_ONLY__
sycl/include/sycl/ext/intel/experimental/esimd/detail/math_intrin.hpp
Outdated
Show resolved
Hide resolved
sycl/include/sycl/ext/intel/experimental/esimd/detail/math_intrin.hpp
Outdated
Show resolved
Hide resolved
sycl/include/sycl/ext/intel/experimental/esimd/detail/math_intrin.hpp
Outdated
Show resolved
Hide resolved
Unrelated failure :
|
sycl/include/sycl/ext/intel/experimental/esimd/detail/math_intrin.hpp
Outdated
Show resolved
Hide resolved
sycl/include/sycl/ext/intel/experimental/esimd/detail/math_intrin.hpp
Outdated
Show resolved
Hide resolved
sycl/include/sycl/ext/intel/experimental/esimd/detail/math_intrin.hpp
Outdated
Show resolved
Hide resolved
sycl/include/sycl/ext/intel/experimental/esimd/detail/math_intrin.hpp
Outdated
Show resolved
Hide resolved
Function signatures for |
- For precision, repeat, depth, and signedness info, runtime function arguments are changed to template argument for host mode compilation - dpas_info encoding/decoding, ARG_UNUSED removed as they are no longer used - TODO : Refactor intrinsic declarations for device mode
sycl/include/sycl/ext/intel/experimental/esimd/detail/math_intrin.hpp
Outdated
Show resolved
Hide resolved
sycl/include/sycl/ext/intel/experimental/esimd/detail/math_intrin.hpp
Outdated
Show resolved
Hide resolved
sycl/include/sycl/ext/intel/experimental/esimd/detail/math_intrin.hpp
Outdated
Show resolved
Hide resolved
sycl/include/sycl/ext/intel/experimental/esimd/detail/math_intrin.hpp
Outdated
Show resolved
Hide resolved
__ESIMD_UNSUPPORTED_ON_HOST; | ||
return __ESIMD_DNS::vector_type_t<T, N>(); | ||
#endif // __SYCL_EXPLICIT_SIMD_PLUGIN__ | ||
(__ESIMD_DNS::vector_type_t<T, N> *)std::addressof(src0), src1, src2); |
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.
This cast seems very suspicious
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.
This change is removed. dpas.cpp
now fails as follows:
/export/users/dongkyun/github/opensource/intel_llvm/build/bin/../include/sycl/ext/intel/experimental/esimd/detail/math_intrin.hpp:473:1: note: candidate function template not viable: no known conversion from 'short * __attribute__((ext_vector_type(16)))' to 'const sycl::ext::intel::esimd::detail::vector_type_t<float, 16U> *' (aka 'const cl::sycl::ext::intel::esimd::detail::raw_vector_type<float, 16>::type *') for 1st argument
__esimd_dpas_inner(const __ESIMD_DNS::vector_type_t<RT, SZ> *src0,
#ifdef __SYCL_DEVICE_ONLY__ | ||
|
||
// TODO: __esimd_dpas* should have single declaration for host and device: | ||
// void __esimd_dpas*(...) |
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.
it is not void actually Ret __esimd_dpas*(...)
. // void __esimd_dpas*(...)
can be simply removed if complete pseudo-code skeleton of the definition is not shown.
@@ -662,15 +671,13 @@ template <__ESIMD_ENS::argument_type src1_precision, | |||
inline __ESIMD_DNS::vector_type_t<T, N> | |||
__esimd_dpas(__ESIMD_DNS::vector_type_t<T0, N> src0, | |||
__ESIMD_DNS::vector_type_t<T1, N1> src1, | |||
__ESIMD_DNS::vector_type_t<T2, N2> src2) { | |||
#ifdef __SYCL_EXPLICIT_SIMD_PLUGIN__ | |||
__ESIMD_DNS::vector_type_t<T2, N2> src2, int sign_res, |
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 remove the two unused arguments
T, T0, T1, T2, N, N1, N2>(src0.data(), src1.data(), | ||
src2.data()); | ||
T, T0, T1, T2, N, N1, N2>( | ||
src0.data(), src1.data(), src2.data(), dst_signed, src0_signed); |
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 remove this change as well
Unrelated failures
|
What are the list of failing tests per each configuration? |
Updated the comment with failing tests. |
- Bringing back of PR#1110 as all dpas tests are passing after PR - intel/llvm#6475 is merged in intel/llvm:sycl
- Bringing back of PR#1110 as all dpas tests are passing after PR - intel/llvm#6475 is merged in intel/llvm:sycl
…te#1151) - Bringing back of PR#1110 as all dpas tests are passing after PR - intel#6475 is merged in intel/llvm:sycl