You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the Bug:
The documentation allows dpl::execution::device_policy object construction from a SYCL selector (e.g. sycl::default_selector_v), but it does not work.
Expected Behavior:
The reproducer compiles and silently passes.
Observed Behavior:
t.cpp:4:21: error: no viable constructor or deduction guide for deduction of template arguments of 'oneapi::dpl::execution::device_policy'
4 | auto policy_a = oneapi::dpl::execution::device_policy{sycl::default_selector_v};
| ^
/oneDPL/include/oneapi/dpl/pstl/hetero/dpcpp/execution_sycl_defs.h:163:14: note: candidate function template not viable: no known conversion from 'int (const device &)' to 'sycl::queue' for 1st argument
163 | explicit device_policy(sycl::queue q) : __qh(std::move(q)) {}
| ^ ~~~~~~~~~~~~~
/oneDPL/include/oneapi/dpl/pstl/hetero/dpcpp/execution_sycl_defs.h:163:14: note: implicit deduction guide declared as 'template <typename KernelName = DefaultKernelName> explicit device_policy(sycl::queue q) -> device_policy<KernelName>'
/oneDPL/include/oneapi/dpl/pstl/hetero/dpcpp/execution_sycl_defs.h:164:14: note: candidate function template not viable: no known conversion from 'int (const device &)' to 'sycl::device' for 1st argument
164 | explicit device_policy(sycl::device d) : __qh(std::move(d)) {}
| ^ ~~~~~~~~~~~~~~
/oneDPL/include/oneapi/dpl/pstl/hetero/dpcpp/execution_sycl_defs.h:164:14: note: implicit deduction guide declared as 'template <typename KernelName = DefaultKernelName> explicit device_policy(sycl::device d) -> device_policy<KernelName>'
/oneDPL/include/oneapi/dpl/pstl/hetero/dpcpp/execution_sycl_defs.h:174:14: note: candidate function template not viable: no known conversion from 'int (const device &)' to '__internal::__global_instance_tag' for 1st argument
174 | explicit device_policy(__internal::__global_instance_tag __t)
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/oneDPL/include/oneapi/dpl/pstl/hetero/dpcpp/execution_sycl_defs.h:174:14: note: implicit deduction guide declared as 'template <typename KernelName = DefaultKernelName> explicit device_policy(__internal::__global_instance_tag __t) -> device_policy<KernelName>'
/oneDPL/include/oneapi/dpl/pstl/hetero/dpcpp/execution_sycl_defs.h:155:7: note: candidate template ignored: could not match 'device_policy<KernelName>' against 'int (*)(const device &)'
155 | class device_policy
| ^
/oneDPL/include/oneapi/dpl/pstl/hetero/dpcpp/execution_sycl_defs.h:155:7: note: implicit deduction guide declared as 'template <typename KernelName = DefaultKernelName> device_policy(device_policy<KernelName>) -> device_policy<KernelName>'
/oneDPL/include/oneapi/dpl/pstl/hetero/dpcpp/execution_sycl_defs.h:162:5: note: candidate template ignored: could not match 'device_policy<type-parameter-0-1>' against 'int (const device &)'
162 | device_policy(const device_policy<OtherName>& other) : __qh(other.queue()) {}
| ^
/oneDPL/include/oneapi/dpl/pstl/hetero/dpcpp/execution_sycl_defs.h:162:5: note: implicit deduction guide declared as 'template <typename KernelName = DefaultKernelName, typename OtherName> device_policy(const device_policy<type-parameter-0-1> &other) -> device_policy<KernelName>'
/oneDPL/include/oneapi/dpl/pstl/hetero/dpcpp/execution_sycl_defs.h:160:5: note: candidate function template not viable: requires 0 arguments, but 1 was provided
160 | device_policy() : device_policy(__internal::__get_default_queue()) {}
| ^
/oneDPL/include/oneapi/dpl/pstl/hetero/dpcpp/execution_sycl_defs.h:160:5: note: implicit deduction guide declared as 'template <typename KernelName = DefaultKernelName> device_policy() -> device_policy<KernelName>'
/oneDPL/include/oneapi/dpl/pstl/hetero/dpcpp/execution_sycl_defs.h:178:5: note: candidate function template not viable: requires 2 arguments, but 1 was provided
178 | device_policy(__internal::__global_instance_tag __t, __internal::__queue_factory __f) : __qh(__t, __f) {}
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Additional Context:
Possible solutions:
Remove the note from the documentation. The bug has been here for ~2 years according to Fix error in make_device_policy call #762, so it is questionable whether it should be considered as a breaking change or not.
Fix it.
The text was updated successfully, but these errors were encountered:
Describe the Bug:
The documentation allows
dpl::execution::device_policy
object construction from a SYCL selector (e.g.sycl::default_selector_v
), but it does not work.Note in the documentation:
This code does not work:
To Reproduce:
Expected Behavior:
The reproducer compiles and silently passes.
Observed Behavior:
Additional Context:
Possible solutions:
The text was updated successfully, but these errors were encountered: