Skip to content

[SYCL] Submission with kernel parameter ignores set kernel bundle #4667

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
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
14 changes: 14 additions & 0 deletions sycl/include/CL/sycl/handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1788,6 +1788,8 @@ class __SYCL_EXPORT handler {
void single_task(kernel Kernel) {
throwIfActionIsCreated();
verifyKernelInvoc(Kernel);
// Ignore any set kernel bundles and use the one associated with the kernel
setHandlerKernelBundle(detail::getSyclObjImpl(Kernel.get_kernel_bundle()));
// No need to check if range is out of INT_MAX limits as it's compile-time
// known constant
MNDRDesc.set(range<1>{1});
Expand Down Expand Up @@ -1859,6 +1861,8 @@ class __SYCL_EXPORT handler {
template <typename KernelName = detail::auto_name, typename KernelType>
void single_task(kernel Kernel, _KERNELFUNCPARAM(KernelFunc)) {
throwIfActionIsCreated();
// Ignore any set kernel bundles and use the one associated with the kernel
setHandlerKernelBundle(detail::getSyclObjImpl(Kernel.get_kernel_bundle()));
using NameT =
typename detail::get_kernel_name_t<KernelName, KernelType>::name;
(void)Kernel;
Expand Down Expand Up @@ -1902,6 +1906,8 @@ class __SYCL_EXPORT handler {
void parallel_for(kernel Kernel, range<Dims> NumWorkItems,
_KERNELFUNCPARAM(KernelFunc)) {
throwIfActionIsCreated();
// Ignore any set kernel bundles and use the one associated with the kernel
setHandlerKernelBundle(detail::getSyclObjImpl(Kernel.get_kernel_bundle()));
using NameT =
typename detail::get_kernel_name_t<KernelName, KernelType>::name;
using LambdaArgType = sycl::detail::lambda_arg_type<KernelType, item<Dims>>;
Expand Down Expand Up @@ -1937,6 +1943,8 @@ class __SYCL_EXPORT handler {
void parallel_for(kernel Kernel, range<Dims> NumWorkItems,
id<Dims> WorkItemOffset, _KERNELFUNCPARAM(KernelFunc)) {
throwIfActionIsCreated();
// Ignore any set kernel bundles and use the one associated with the kernel
setHandlerKernelBundle(detail::getSyclObjImpl(Kernel.get_kernel_bundle()));
using NameT =
typename detail::get_kernel_name_t<KernelName, KernelType>::name;
using LambdaArgType = sycl::detail::lambda_arg_type<KernelType, item<Dims>>;
Expand Down Expand Up @@ -1972,6 +1980,8 @@ class __SYCL_EXPORT handler {
void parallel_for(kernel Kernel, nd_range<Dims> NDRange,
_KERNELFUNCPARAM(KernelFunc)) {
throwIfActionIsCreated();
// Ignore any set kernel bundles and use the one associated with the kernel
setHandlerKernelBundle(detail::getSyclObjImpl(Kernel.get_kernel_bundle()));
using NameT =
typename detail::get_kernel_name_t<KernelName, KernelType>::name;
using LambdaArgType =
Expand Down Expand Up @@ -2011,6 +2021,8 @@ class __SYCL_EXPORT handler {
void parallel_for_work_group(kernel Kernel, range<Dims> NumWorkGroups,
_KERNELFUNCPARAM(KernelFunc)) {
throwIfActionIsCreated();
// Ignore any set kernel bundles and use the one associated with the kernel
setHandlerKernelBundle(detail::getSyclObjImpl(Kernel.get_kernel_bundle()));
using NameT =
typename detail::get_kernel_name_t<KernelName, KernelType>::name;
using LambdaArgType =
Expand Down Expand Up @@ -2048,6 +2060,8 @@ class __SYCL_EXPORT handler {
range<Dims> WorkGroupSize,
_KERNELFUNCPARAM(KernelFunc)) {
throwIfActionIsCreated();
// Ignore any set kernel bundles and use the one associated with the kernel
setHandlerKernelBundle(detail::getSyclObjImpl(Kernel.get_kernel_bundle()));
using NameT =
typename detail::get_kernel_name_t<KernelName, KernelType>::name;
using LambdaArgType =
Expand Down