Skip to content

[SYCL] Allow user control over range rounding, and disable for older SYCL spec. #3082

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

Merged
merged 4 commits into from
Jan 26, 2021
Merged
Changes from all commits
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
13 changes: 9 additions & 4 deletions sycl/include/CL/sycl/handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -748,9 +748,13 @@ class __SYCL_EXPORT handler {
using NameT =
typename detail::get_kernel_name_t<KernelName, KernelType>::name;

// FIXME Remove this ifndef once rounding of execution range works well with
// ESIMD compilation flow.
#ifndef __SYCL_EXPLICIT_SIMD__
// FIXME Remove the ESIMD check once rounding of execution range works well
// with ESIMD compilation flow.
// Range rounding is supported only for newer SYCL standards.
// Range rounding can also be disabled by the user.
#if !defined(__SYCL_EXPLICIT_SIMD__) && \
!defined(SYCL_DISABLE_PARALLEL_FOR_RANGE_ROUNDING) && \
SYCL_LANGUAGE_VERSION >= 202001
// The work group size preferred by this device.
// A reasonable choice for rounding up the range is 32.
constexpr size_t GoodLocalSizeX = 32;
Expand Down Expand Up @@ -816,7 +820,8 @@ class __SYCL_EXPORT handler {
MCGType = detail::CG::KERNEL;
#endif
} else
#endif // __SYCL_EXPLICIT_SIMD__
#endif // !__SYCL_EXPLICIT_SIMD__ && !SYCL_DISABLE_PARALLEL_FOR_RANGE_ROUNDING
// && SYCL_LANGUAGE_VERSION > 202001
{
#ifdef __SYCL_DEVICE_ONLY__
(void)NumWorkItems;
Expand Down