Skip to content
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

Remove support of old compilers from oneDPL code #1678

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove _ONEDPL_LIBSYCL_VERSION >= 50300
SergeyKopienko committed Sep 25, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 820623edb75f7d0c958315ca1debab4527da7b3f
25 changes: 2 additions & 23 deletions include/oneapi/dpl/pstl/hetero/dpcpp/sycl_defs.h
Original file line number Diff line number Diff line change
@@ -65,11 +65,7 @@
# endif
#endif // _ONEDPL_DETECT_SPIRV_COMPILATION

#if _ONEDPL_LIBSYCL_VERSION >= 50300
# define _ONEDPL_SYCL_REQD_SUB_GROUP_SIZE(SIZE) sycl::reqd_sub_group_size(SIZE)
#else
# define _ONEDPL_SYCL_REQD_SUB_GROUP_SIZE(SIZE) intel::reqd_sub_group_size(SIZE)
#endif
#define _ONEDPL_SYCL_REQD_SUB_GROUP_SIZE(SIZE) sycl::reqd_sub_group_size(SIZE)

// This macro is intended to be used for specifying a subgroup size as a SYCL kernel attribute for SPIR-V targets
// only. For non-SPIR-V targets, it will be empty. This macro should only be used in device code and may lead
@@ -121,22 +117,14 @@ template <typename _Buffer>
constexpr auto
__get_buffer_size(const _Buffer& __buffer)
{
#if _ONEDPL_LIBSYCL_VERSION >= 50300
return __buffer.size();
#else
return __buffer.get_count();
#endif
}

template <typename _Accessor>
constexpr auto
__get_accessor_size(const _Accessor& __accessor)
{
#if _ONEDPL_LIBSYCL_VERSION >= 50300
return __accessor.size();
#else
return __accessor.get_count();
#endif
}

template <typename _Item>
@@ -255,7 +243,7 @@ inline auto __fpga_selector()
return sycl::ext::intel::fpga_selector_v;
}

# elif _ONEDPL_LIBSYCL_VERSION >= 50300
# else
inline auto __fpga_emulator_selector()
{
return sycl::ext::intel::fpga_emulator_selector{};
@@ -264,15 +252,6 @@ inline auto __fpga_selector()
{
return sycl::ext::intel::fpga_selector{};
}
# else
inline auto __fpga_emulator_selector()
{
return sycl::INTEL::fpga_emulator_selector{};
}
inline auto __fpga_selector()
{
return sycl::INTEL::fpga_selector{};
}
# endif
#endif // _ONEDPL_FPGA_DEVICE

2 changes: 1 addition & 1 deletion include/oneapi/dpl/pstl/utils.h
Original file line number Diff line number Diff line change
@@ -505,7 +505,7 @@ __dpl_bit_cast(const _Src& __src) noexcept
{
#if __cpp_lib_bit_cast >= 201806L
return ::std::bit_cast<_Dst>(__src);
#elif _ONEDPL_BACKEND_SYCL && _ONEDPL_LIBSYCL_VERSION >= 50300
#elif _ONEDPL_BACKEND_SYCL
return sycl::bit_cast<_Dst>(__src);
#elif __has_builtin(__builtin_bit_cast)
return __builtin_bit_cast(_Dst, __src);