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

[SYCL] Disable execution range rounding for ESIMD kernel in runtime #2951

Merged
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
7 changes: 6 additions & 1 deletion sycl/include/CL/sycl/handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,9 @@ 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__
Copy link
Contributor

@kbobrovs kbobrovs Dec 25, 2020

Choose a reason for hiding this comment

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

Thanks for the quick patch. I think we all agree that this is a band-aid rather than a fix. Please add a TODO/FIXME.
Note that __SYCL_EXPLICIT_SIMD__ will soon be gone.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we all agree that this is a band-aid rather than a fix

Sure thing.

Added a FIXME.
What will be used instead of __SYCL_EXPLICIT_SIMD__?

Copy link
Contributor

@DenisBakhvalov DenisBakhvalov Dec 26, 2020

Choose a reason for hiding this comment

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

What will be used instead of __SYCL_EXPLICIT_SIMD__?

We plan to unify SYCL and ESIMD modes and will get read of -fsycl-explicit-simd option and __SYCL_EXPLICIT_SIMD__ macro. So, both types of kernels can coexist in the same translation unit and in the same program.

// 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 @@ -827,7 +830,9 @@ class __SYCL_EXPORT handler {
std::move(Wrapper));
MCGType = detail::CG::KERNEL;
#endif
} else {
} else
#endif // __SYCL_EXPLICIT_SIMD__
{
#ifdef __SYCL_DEVICE_ONLY__
(void)NumWorkItems;
kernel_parallel_for<NameT, TransformedArgType>(KernelFunc);
Expand Down