diff --git a/devops/cts_exclude_filter_compfails b/devops/cts_exclude_filter_compfails index 44d3870b88048..b8b4bb2843ded 100644 --- a/devops/cts_exclude_filter_compfails +++ b/devops/cts_exclude_filter_compfails @@ -1,2 +1,4 @@ # Please use "#" to add comments here. # Do not delete the file even if it's empty. +# See https://github.com/intel/llvm/pull/16615 +handler diff --git a/devops/dependencies.json b/devops/dependencies.json index 79892387df4c1..3d42a52a2f497 100644 --- a/devops/dependencies.json +++ b/devops/dependencies.json @@ -8,7 +8,7 @@ }, "igc": { "github_tag": "v2.5.6", - "version": "2.5.6", + "version": "v2.5.6", "url": "https://github.com/intel/intel-graphics-compiler/releases/tag/v2.5.6", "root": "{DEPS_ROOT}/opencl/runtime/linux/oclgpu" }, diff --git a/llvm/docs/requirements-hashed.txt b/llvm/docs/requirements-hashed.txt index 08fe7f3573605..636aa7d5ed25c 100644 --- a/llvm/docs/requirements-hashed.txt +++ b/llvm/docs/requirements-hashed.txt @@ -151,7 +151,7 @@ imagesize==1.4.1 \ --hash=sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b \ --hash=sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a # via sphinx -jinja2==3.1.4 \ +jinja2==3.1.5 \ --hash=sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369 \ --hash=sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d # via diff --git a/sycl/cmake/modules/UnifiedRuntimeTag.cmake b/sycl/cmake/modules/UnifiedRuntimeTag.cmake index ee0c29ea62a65..2bfa1cbef4657 100644 --- a/sycl/cmake/modules/UnifiedRuntimeTag.cmake +++ b/sycl/cmake/modules/UnifiedRuntimeTag.cmake @@ -1,7 +1,8 @@ -# commit 8b7a99578966eb691a961d9620ea38d235196b2f -# Merge: ed095412 7b0e3b19 -# Author: Martin Grant -# Date: Mon Jan 20 09:27:22 2025 +0000 -# Merge pull request #2582 from przemektmalon/przemek/intel-host-usm-support -# Enable Host USM backed images on Level Zero -set(UNIFIED_RUNTIME_TAG 8b7a99578966eb691a961d9620ea38d235196b2f) +# commit b074893e854d28141cd67bc5935ed87e47eb3bb6 +# Merge: 71a5eab0 128ea023 +# Author: Ross Brunton +# Date: Tue Jan 21 11:21:50 2025 +0000 +# Merge pull request #2539 from RossBrunton/ross/specconst +# +# Added `DEVICE_INFO_PROGRAM_SET_SPECIALIZATION_CONSTANTS` +set(UNIFIED_RUNTIME_TAG b074893e854d28141cd67bc5935ed87e47eb3bb6) diff --git a/sycl/doc/extensions/experimental/sycl_ext_oneapi_bindless_images.asciidoc b/sycl/doc/extensions/experimental/sycl_ext_oneapi_bindless_images.asciidoc index 130e54b386cda..d99f988d49cbb 100644 --- a/sycl/doc/extensions/experimental/sycl_ext_oneapi_bindless_images.asciidoc +++ b/sycl/doc/extensions/experimental/sycl_ext_oneapi_bindless_images.asciidoc @@ -428,6 +428,15 @@ The second way to allocate image memory is to use USM allocations. SYCL already provides a number of USM allocation functions. This proposal would add another, pitched memory allocation, through `pitched_alloc_device`. +Bindless images can be backed by device, host, or shared USM memory allocations. + +[NOTE] +==== +Image memory backed by USM device and host allocations is generally supported, +whereas shared USM allocations depend on the SYCL backend as well as the device +capabilities. +==== + ```cpp namespace sycl::ext::oneapi::experimental { @@ -2328,4 +2337,5 @@ These features still need to be handled: |6.4|2024-10-15| - Fix bindless spec examples and include examples in bindless spec using asciidoc include. |6.5|2024-10-22| - Allow 3-channel image formats on some backends. +|6.6|2025-01-20| - Clarify support for the specific types of USM allocations. |====================== diff --git a/sycl/include/sycl/handler.hpp b/sycl/include/sycl/handler.hpp index 758daa3a81a9b..4fef8be3da705 100644 --- a/sycl/include/sycl/handler.hpp +++ b/sycl/include/sycl/handler.hpp @@ -2292,49 +2292,64 @@ class __SYCL_EXPORT handler { template - std::enable_if_t< - ext::oneapi::experimental::is_property_list::value> - single_task(PropertiesT Props, _KERNELFUNCPARAM(KernelFunc)) { + __SYCL_DEPRECATED( + "Use sycl::ext::oneapi::experimental::single_task (provided in the " + "sycl_ext_oneapi_enqueue_functions extension) instead.") + std::enable_if_t::value> single_task(PropertiesT Props, + _KERNELFUNCPARAM(KernelFunc)) { single_task_lambda_impl(Props, KernelFunc); } template - std::enable_if_t< - ext::oneapi::experimental::is_property_list::value> - parallel_for(range<1> NumWorkItems, PropertiesT Props, - _KERNELFUNCPARAM(KernelFunc)) { + __SYCL_DEPRECATED( + "Use sycl::ext::oneapi::experimental::single_task (provided in the " + "sycl_ext_oneapi_enqueue_functions extension) instead.") + std::enable_if_t::value> parallel_for(range<1> NumWorkItems, + PropertiesT Props, + _KERNELFUNCPARAM(KernelFunc)) { parallel_for_lambda_impl( NumWorkItems, Props, std::move(KernelFunc)); } template - std::enable_if_t< - ext::oneapi::experimental::is_property_list::value> - parallel_for(range<2> NumWorkItems, PropertiesT Props, - _KERNELFUNCPARAM(KernelFunc)) { + __SYCL_DEPRECATED( + "Use sycl::ext::oneapi::experimental::single_task (provided in the " + "sycl_ext_oneapi_enqueue_functions extension) instead.") + std::enable_if_t::value> parallel_for(range<2> NumWorkItems, + PropertiesT Props, + _KERNELFUNCPARAM(KernelFunc)) { parallel_for_lambda_impl( NumWorkItems, Props, std::move(KernelFunc)); } template - std::enable_if_t< - ext::oneapi::experimental::is_property_list::value> - parallel_for(range<3> NumWorkItems, PropertiesT Props, - _KERNELFUNCPARAM(KernelFunc)) { + __SYCL_DEPRECATED( + "Use sycl::ext::oneapi::experimental::single_task (provided in the " + "sycl_ext_oneapi_enqueue_functions extension) instead.") + std::enable_if_t::value> parallel_for(range<3> NumWorkItems, + PropertiesT Props, + _KERNELFUNCPARAM(KernelFunc)) { parallel_for_lambda_impl( NumWorkItems, Props, std::move(KernelFunc)); } template - std::enable_if_t< - ext::oneapi::experimental::is_property_list::value> - parallel_for(nd_range Range, PropertiesT Properties, - _KERNELFUNCPARAM(KernelFunc)) { + __SYCL_DEPRECATED( + "Use sycl::ext::oneapi::experimental::single_task (provided in the " + "sycl_ext_oneapi_enqueue_functions extension) instead.") + std::enable_if_t::value> parallel_for(nd_range Range, + PropertiesT Properties, + _KERNELFUNCPARAM(KernelFunc)) { parallel_for_impl(Range, Properties, std::move(KernelFunc)); } @@ -2342,11 +2357,15 @@ class __SYCL_EXPORT handler { template - std::enable_if_t< - (sizeof...(RestT) > 1) && - detail::AreAllButLastReductions::value && - ext::oneapi::experimental::is_property_list::value> - parallel_for(range<1> Range, PropertiesT Properties, RestT &&...Rest) { + __SYCL_DEPRECATED( + "Use sycl::ext::oneapi::experimental::parallel_for (provided in the " + "sycl_ext_oneapi_enqueue_functions extension) instead.") + std::enable_if_t<(sizeof...(RestT) > 1) && + detail::AreAllButLastReductions::value && + ext::oneapi::experimental::is_property_list< + PropertiesT>::value> parallel_for(range<1> Range, + PropertiesT Properties, + RestT &&...Rest) { #ifndef __SYCL_DEVICE_ONLY__ throwIfGraphAssociated(); @@ -2357,11 +2376,15 @@ class __SYCL_EXPORT handler { template - std::enable_if_t< - (sizeof...(RestT) > 1) && - detail::AreAllButLastReductions::value && - ext::oneapi::experimental::is_property_list::value> - parallel_for(range<2> Range, PropertiesT Properties, RestT &&...Rest) { + __SYCL_DEPRECATED( + "Use sycl::ext::oneapi::experimental::parallel_for (provided in the " + "sycl_ext_oneapi_enqueue_functions extension) instead.") + std::enable_if_t<(sizeof...(RestT) > 1) && + detail::AreAllButLastReductions::value && + ext::oneapi::experimental::is_property_list< + PropertiesT>::value> parallel_for(range<2> Range, + PropertiesT Properties, + RestT &&...Rest) { #ifndef __SYCL_DEVICE_ONLY__ throwIfGraphAssociated(); @@ -2372,11 +2395,15 @@ class __SYCL_EXPORT handler { template - std::enable_if_t< - (sizeof...(RestT) > 1) && - detail::AreAllButLastReductions::value && - ext::oneapi::experimental::is_property_list::value> - parallel_for(range<3> Range, PropertiesT Properties, RestT &&...Rest) { + __SYCL_DEPRECATED( + "Use sycl::ext::oneapi::experimental::parallel_for (provided in the " + "sycl_ext_oneapi_enqueue_functions extension) instead.") + std::enable_if_t<(sizeof...(RestT) > 1) && + detail::AreAllButLastReductions::value && + ext::oneapi::experimental::is_property_list< + PropertiesT>::value> parallel_for(range<3> Range, + PropertiesT Properties, + RestT &&...Rest) { #ifndef __SYCL_DEVICE_ONLY__ throwIfGraphAssociated(); @@ -2411,11 +2438,15 @@ class __SYCL_EXPORT handler { template - std::enable_if_t< - (sizeof...(RestT) > 1) && - detail::AreAllButLastReductions::value && - ext::oneapi::experimental::is_property_list::value> - parallel_for(nd_range Range, PropertiesT Properties, RestT &&...Rest) { + __SYCL_DEPRECATED( + "Use sycl::ext::oneapi::experimental::parallel_for (provided in the " + "sycl_ext_oneapi_enqueue_functions extension) instead.") + std::enable_if_t<(sizeof...(RestT) > 1) && + detail::AreAllButLastReductions::value && + ext::oneapi::experimental::is_property_list< + PropertiesT>::value> parallel_for(nd_range Range, + PropertiesT Properties, + RestT &&...Rest) { #ifndef __SYCL_DEVICE_ONLY__ throwIfGraphAssociated(); @@ -2437,6 +2468,9 @@ class __SYCL_EXPORT handler { template + __SYCL_DEPRECATED( + "Use sycl::ext::oneapi::experimental::parallel_for (provided in the " + "sycl_ext_oneapi_enqueue_functions extension) instead.") void parallel_for_work_group(range NumWorkGroups, PropertiesT Props, _KERNELFUNCPARAM(KernelFunc)) { parallel_for_work_group_lambda_impl + __SYCL_DEPRECATED( + "Use sycl::ext::oneapi::experimental::parallel_for (provided in the " + "sycl_ext_oneapi_enqueue_functions extension) instead.") void parallel_for_work_group(range NumWorkGroups, range WorkGroupSize, PropertiesT Props, _KERNELFUNCPARAM(KernelFunc)) { diff --git a/sycl/include/sycl/queue.hpp b/sycl/include/sycl/queue.hpp index e2208d452d100..f04b8a1e88960 100644 --- a/sycl/include/sycl/queue.hpp +++ b/sycl/include/sycl/queue.hpp @@ -2103,11 +2103,14 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase { /// \param CodeLoc contains the code location of user code template + __SYCL_DEPRECATED( + "Use sycl::ext::oneapi::experimental::single_task (provided in the " + "sycl_ext_oneapi_enqueue_functions extension) instead.") std::enable_if_t< - ext::oneapi::experimental::is_property_list::value, event> - single_task( - PropertiesT Properties, _KERNELFUNCPARAM(KernelFunc), - const detail::code_location &CodeLoc = detail::code_location::current()) { + ext::oneapi::experimental::is_property_list::value, + event> single_task(PropertiesT Properties, _KERNELFUNCPARAM(KernelFunc), + const detail::code_location &CodeLoc = + detail::code_location::current()) { static_assert( (detail::check_fn_signature, void()>::value || @@ -2145,11 +2148,15 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase { /// \param CodeLoc contains the code location of user code template + __SYCL_DEPRECATED( + "Use sycl::ext::oneapi::experimental::single_task (provided in the " + "sycl_ext_oneapi_enqueue_functions extension) instead.") std::enable_if_t< - ext::oneapi::experimental::is_property_list::value, event> - single_task( - event DepEvent, PropertiesT Properties, _KERNELFUNCPARAM(KernelFunc), - const detail::code_location &CodeLoc = detail::code_location::current()) { + ext::oneapi::experimental::is_property_list::value, + event> single_task(event DepEvent, PropertiesT Properties, + _KERNELFUNCPARAM(KernelFunc), + const detail::code_location &CodeLoc = + detail::code_location::current()) { static_assert( (detail::check_fn_signature, void()>::value || @@ -2191,12 +2198,15 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase { /// \param CodeLoc contains the code location of user code template + __SYCL_DEPRECATED( + "Use sycl::ext::oneapi::experimental::single_task (provided in the " + "sycl_ext_oneapi_enqueue_functions extension) instead.") std::enable_if_t< - ext::oneapi::experimental::is_property_list::value, event> - single_task( - const std::vector &DepEvents, PropertiesT Properties, - _KERNELFUNCPARAM(KernelFunc), - const detail::code_location &CodeLoc = detail::code_location::current()) { + ext::oneapi::experimental::is_property_list::value, + event> single_task(const std::vector &DepEvents, + PropertiesT Properties, _KERNELFUNCPARAM(KernelFunc), + const detail::code_location &CodeLoc = + detail::code_location::current()) { static_assert( (detail::check_fn_signature, void()>::value || @@ -2230,6 +2240,25 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase { CodeLoc); } + /// parallel_for version with a kernel represented as a lambda + range that + /// specifies global size only. + /// + /// \param Range specifies the global work space of the kernel + /// \param Properties is the kernel properties. + /// \param Rest acts as-if: "ReductionTypes&&... Reductions, + /// const KernelType &KernelFunc". + template + __SYCL_DEPRECATED( + "Use sycl::ext::oneapi::experimental::parallel_for (provided in the " + "sycl_ext_oneapi_enqueue_functions extension) instead.") + std::enable_if_t< + ext::oneapi::experimental::is_property_list::value, + event> parallel_for(range<1> Range, PropertiesT Properties, + RestT &&...Rest) { + return parallel_for_impl(Range, Properties, Rest...); + } + /// parallel_for version with a kernel represented as a lambda + range that /// specifies global size only. /// @@ -2241,6 +2270,25 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase { return parallel_for_impl(Range, Rest...); } + /// parallel_for version with a kernel represented as a lambda + range that + /// specifies global size only. + /// + /// \param Range specifies the global work space of the kernel + /// \param Properties is the kernel properties. + /// \param Rest acts as-if: "ReductionTypes&&... Reductions, + /// const KernelType &KernelFunc". + template + __SYCL_DEPRECATED( + "Use sycl::ext::oneapi::experimental::parallel_for (provided in the " + "sycl_ext_oneapi_enqueue_functions extension) instead.") + std::enable_if_t< + ext::oneapi::experimental::is_property_list::value, + event> parallel_for(range<2> Range, PropertiesT Properties, + RestT &&...Rest) { + return parallel_for_impl(Range, Properties, Rest...); + } + /// parallel_for version with a kernel represented as a lambda + range that /// specifies global size only. /// @@ -2252,6 +2300,25 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase { return parallel_for_impl(Range, Rest...); } + /// parallel_for version with a kernel represented as a lambda + range that + /// specifies global size only. + /// + /// \param Range specifies the global work space of the kernel + /// \param Properties is the kernel properties. + /// \param Rest acts as-if: "ReductionTypes&&... Reductions, + /// const KernelType &KernelFunc". + template + __SYCL_DEPRECATED( + "Use sycl::ext::oneapi::experimental::parallel_for (provided in the " + "sycl_ext_oneapi_enqueue_functions extension) instead.") + std::enable_if_t< + ext::oneapi::experimental::is_property_list::value, + event> parallel_for(range<3> Range, PropertiesT Properties, + RestT &&...Rest) { + return parallel_for_impl(Range, Properties, Rest...); + } + /// parallel_for version with a kernel represented as a lambda + range that /// specifies global size only. /// @@ -2263,6 +2330,26 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase { return parallel_for_impl(Range, Rest...); } + /// parallel_for version with a kernel represented as a lambda + range that + /// specifies global size only. + /// + /// \param Range specifies the global work space of the kernel + /// \param DepEvent is an event that specifies the kernel dependencies + /// \param Properties is the kernel properties. + /// \param Rest acts as-if: "ReductionTypes&&... Reductions, + /// const KernelType &KernelFunc". + template + __SYCL_DEPRECATED( + "Use sycl::ext::oneapi::experimental::parallel_for (provided in the " + "sycl_ext_oneapi_enqueue_functions extension) instead.") + std::enable_if_t< + ext::oneapi::experimental::is_property_list::value, + event> parallel_for(range<1> Range, event DepEvent, + PropertiesT Properties, RestT &&...Rest) { + return parallel_for_impl(Range, DepEvent, Properties, Rest...); + } + /// parallel_for version with a kernel represented as a lambda + range that /// specifies global size only. /// @@ -2275,6 +2362,26 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase { return parallel_for_impl(Range, DepEvent, Rest...); } + /// parallel_for version with a kernel represented as a lambda + range that + /// specifies global size only. + /// + /// \param Range specifies the global work space of the kernel + /// \param DepEvent is an event that specifies the kernel dependencies + /// \param Properties is the kernel properties. + /// \param Rest acts as-if: "ReductionTypes&&... Reductions, + /// const KernelType &KernelFunc". + template + __SYCL_DEPRECATED( + "Use sycl::ext::oneapi::experimental::parallel_for (provided in the " + "sycl_ext_oneapi_enqueue_functions extension) instead.") + std::enable_if_t< + ext::oneapi::experimental::is_property_list::value, + event> parallel_for(range<2> Range, event DepEvent, + PropertiesT Properties, RestT &&...Rest) { + return parallel_for_impl(Range, DepEvent, Properties, Rest...); + } + /// parallel_for version with a kernel represented as a lambda + range that /// specifies global size only. /// @@ -2287,6 +2394,26 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase { return parallel_for_impl(Range, DepEvent, Rest...); } + /// parallel_for version with a kernel represented as a lambda + range that + /// specifies global size only. + /// + /// \param Range specifies the global work space of the kernel + /// \param DepEvent is an event that specifies the kernel dependencies + /// \param Properties is the kernel properties. + /// \param Rest acts as-if: "ReductionTypes&&... Reductions, + /// const KernelType &KernelFunc". + template + __SYCL_DEPRECATED( + "Use sycl::ext::oneapi::experimental::parallel_for (provided in the " + "sycl_ext_oneapi_enqueue_functions extension) instead.") + std::enable_if_t< + ext::oneapi::experimental::is_property_list::value, + event> parallel_for(range<3> Range, event DepEvent, + PropertiesT Properties, RestT &&...Rest) { + return parallel_for_impl(Range, DepEvent, Properties, Rest...); + } + /// parallel_for version with a kernel represented as a lambda + range that /// specifies global size only. /// @@ -2299,6 +2426,27 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase { return parallel_for_impl(Range, DepEvent, Rest...); } + /// parallel_for version with a kernel represented as a lambda + range that + /// specifies global size only. + /// + /// \param Range specifies the global work space of the kernel + /// \param DepEvents is a vector of events that specifies the kernel + /// dependencies + /// \param Properties is the kernel properties. + /// \param Rest acts as-if: "ReductionTypes&&... Reductions, + /// const KernelType &KernelFunc". + template + __SYCL_DEPRECATED( + "Use sycl::ext::oneapi::experimental::parallel_for (provided in the " + "sycl_ext_oneapi_enqueue_functions extension) instead.") + std::enable_if_t< + ext::oneapi::experimental::is_property_list::value, + event> parallel_for(range<1> Range, const std::vector &DepEvents, + PropertiesT Properties, RestT &&...Rest) { + return parallel_for_impl(Range, DepEvents, Properties, Rest...); + } + /// parallel_for version with a kernel represented as a lambda + range that /// specifies global size only. /// @@ -2313,6 +2461,27 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase { return parallel_for_impl(Range, DepEvents, Rest...); } + /// parallel_for version with a kernel represented as a lambda + range that + /// specifies global size only. + /// + /// \param Range specifies the global work space of the kernel + /// \param DepEvents is a vector of events that specifies the kernel + /// dependencies + /// \param Properties is the kernel properties. + /// \param Rest acts as-if: "ReductionTypes&&... Reductions, + /// const KernelType &KernelFunc". + template + __SYCL_DEPRECATED( + "Use sycl::ext::oneapi::experimental::parallel_for (provided in the " + "sycl_ext_oneapi_enqueue_functions extension) instead.") + std::enable_if_t< + ext::oneapi::experimental::is_property_list::value, + event> parallel_for(range<2> Range, const std::vector &DepEvents, + PropertiesT Properties, RestT &&...Rest) { + return parallel_for_impl(Range, DepEvents, Properties, Rest...); + } + /// parallel_for version with a kernel represented as a lambda + range that /// specifies global size only. /// @@ -2327,6 +2496,27 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase { return parallel_for_impl(Range, DepEvents, Rest...); } + /// parallel_for version with a kernel represented as a lambda + range that + /// specifies global size only. + /// + /// \param Range specifies the global work space of the kernel + /// \param DepEvents is a vector of events that specifies the kernel + /// dependencies + /// \param Properties is the kernel properties. + /// \param Rest acts as-if: "ReductionTypes&&... Reductions, + /// const KernelType &KernelFunc". + template + __SYCL_DEPRECATED( + "Use sycl::ext::oneapi::experimental::parallel_for (provided in the " + "sycl_ext_oneapi_enqueue_functions extension) instead.") + std::enable_if_t< + ext::oneapi::experimental::is_property_list::value, + event> parallel_for(range<3> Range, const std::vector &DepEvents, + PropertiesT Properties, RestT &&...Rest) { + return parallel_for_impl(Range, DepEvents, Properties, Rest...); + } + /// parallel_for version with a kernel represented as a lambda + range that /// specifies global size only. /// @@ -2442,11 +2632,14 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase { /// const KernelType &KernelFunc". template + __SYCL_DEPRECATED( + "Use sycl::ext::oneapi::experimental::parallel_for (provided in the " + "sycl_ext_oneapi_enqueue_functions extension) instead.") std::enable_if_t< detail::AreAllButLastReductions::value && ext::oneapi::experimental::is_property_list::value, - event> - parallel_for(nd_range Range, PropertiesT Properties, RestT &&...Rest) { + event> parallel_for(nd_range Range, PropertiesT Properties, + RestT &&...Rest) { constexpr detail::code_location CodeLoc = getCodeLocation(); detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc); return submit( @@ -2466,8 +2659,41 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase { typename... RestT> std::enable_if_t::value, event> parallel_for(nd_range Range, RestT &&...Rest) { - return parallel_for( - Range, ext::oneapi::experimental::empty_properties_t{}, Rest...); + constexpr detail::code_location CodeLoc = getCodeLocation(); + detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc); + return submit( + [&](handler &CGH) { + CGH.template parallel_for(Range, Rest...); + }, + TlsCodeLocCapture.query()); + } + + /// parallel_for version with a kernel represented as a lambda + nd_range that + /// specifies global, local sizes and offset. + /// + /// \param Range specifies the global and local work spaces of the kernel + /// \param DepEvent is an event that specifies the kernel dependencies + /// \param Properties is the kernel properties. + /// \param Rest acts as-if: "ReductionTypes&&... Reductions, + /// const KernelType &KernelFunc". + template + __SYCL_DEPRECATED( + "Use sycl::ext::oneapi::experimental::parallel_for (provided in the " + "sycl_ext_oneapi_enqueue_functions extension) instead.") + std::enable_if_t< + detail::AreAllButLastReductions::value && + ext::oneapi::experimental::is_property_list::value, + event> parallel_for(nd_range Range, event DepEvent, + PropertiesT Properties, RestT &&...Rest) { + constexpr detail::code_location CodeLoc = getCodeLocation(); + detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc); + return submit( + [&](handler &CGH) { + CGH.depends_on(DepEvent); + CGH.template parallel_for(Range, Properties, Rest...); + }, + TlsCodeLocCapture.query()); } /// parallel_for version with a kernel represented as a lambda + nd_range that @@ -2479,7 +2705,8 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase { /// const KernelType &KernelFunc". template - event parallel_for(nd_range Range, event DepEvent, RestT &&...Rest) { + std::enable_if_t::value, event> + parallel_for(nd_range Range, event DepEvent, RestT &&...Rest) { constexpr detail::code_location CodeLoc = getCodeLocation(); detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc); return submit( @@ -2490,6 +2717,36 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase { TlsCodeLocCapture.query()); } + /// parallel_for version with a kernel represented as a lambda + nd_range that + /// specifies global, local sizes and offset. + /// + /// \param Range specifies the global and local work spaces of the kernel + /// \param DepEvents is a vector of events that specifies the kernel + /// dependencies + /// \param Properties is the kernel properties. + /// \param Rest acts as-if: "ReductionTypes&&... Reductions, + /// const KernelType &KernelFunc". + template + __SYCL_DEPRECATED( + "Use sycl::ext::oneapi::experimental::parallel_for (provided in the " + "sycl_ext_oneapi_enqueue_functions extension) instead.") + std::enable_if_t< + detail::AreAllButLastReductions::value && + ext::oneapi::experimental::is_property_list::value, + event> parallel_for(nd_range Range, + const std::vector &DepEvents, + PropertiesT Properties, RestT &&...Rest) { + constexpr detail::code_location CodeLoc = getCodeLocation(); + detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc); + return submit( + [&](handler &CGH) { + CGH.depends_on(DepEvents); + CGH.template parallel_for(Range, Properties, Rest...); + }, + TlsCodeLocCapture.query()); + } + /// parallel_for version with a kernel represented as a lambda + nd_range that /// specifies global, local sizes and offset. /// @@ -2500,8 +2757,9 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase { /// const KernelType &KernelFunc". template - event parallel_for(nd_range Range, const std::vector &DepEvents, - RestT &&...Rest) { + std::enable_if_t::value, event> + parallel_for(nd_range Range, const std::vector &DepEvents, + RestT &&...Rest) { constexpr detail::code_location CodeLoc = getCodeLocation(); detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc); return submit( diff --git a/sycl/test-e2e/Basic/fpga_tests/fpga_pipes.cpp b/sycl/test-e2e/Basic/fpga_tests/fpga_pipes.cpp index 0eb58c2fcf66c..cf3a87c0088c6 100644 --- a/sycl/test-e2e/Basic/fpga_tests/fpga_pipes.cpp +++ b/sycl/test-e2e/Basic/fpga_tests/fpga_pipes.cpp @@ -345,8 +345,12 @@ int main() { Error |= test_multiple_bl_pipe(Queue); // Test for an array data passing through a pipe - Error |= test_array_th_nb_pipe(Queue); - Error |= test_array_th_bl_pipe(Queue); + // These two tests are failing in post-commit testing ( + // https://github.com/intel/llvm/issues/16693 ) disabling them, rather than + // the entire test. + + // Error |= test_array_th_nb_pipe(Queue); + // Error |= test_array_th_bl_pipe(Queue); // TODO Remove when #14308 is closed std::cerr << "DEBUG: Finished with result " << Error << std::endl; diff --git a/sycl/test-e2e/ProgramManager/multi_device_bundle/device_libs_and_caching.cpp b/sycl/test-e2e/ProgramManager/multi_device_bundle/device_libs_and_caching.cpp index 2a54744ebdef5..78872c04d97ec 100644 --- a/sycl/test-e2e/ProgramManager/multi_device_bundle/device_libs_and_caching.cpp +++ b/sycl/test-e2e/ProgramManager/multi_device_bundle/device_libs_and_caching.cpp @@ -57,7 +57,7 @@ int main() { auto res = sycl::malloc_host(3, ctx); auto KernelLambda = [=]() { - res[0] = sycl::ext::intel::math::float2int_rd(4.0) + (int)sqrtf(4.0f) + + res[0] = sycl::ext::intel::math::float2int_rd(4.0f) + (int)sqrtf(4.0f) + std::exp(std::complex(0.f, 0.f)).real(); }; // Test case 1 diff --git a/sycl/test-e2e/VirtualFunctions/multiple-translation-units/Inputs/call.cpp b/sycl/test-e2e/VirtualFunctions/multiple-translation-units/Inputs/call.cpp index 9ce59931405d6..4ea4e7cf125b7 100644 --- a/sycl/test-e2e/VirtualFunctions/multiple-translation-units/Inputs/call.cpp +++ b/sycl/test-e2e/VirtualFunctions/multiple-translation-units/Inputs/call.cpp @@ -1,17 +1,28 @@ #include "declarations.hpp" +template struct KernelFunctor { + T1 mDeviceStorage; + T2 mDataAcc; + KernelFunctor(T1 &DeviceStorage, T2 &DataAcc) + : mDeviceStorage(DeviceStorage), mDataAcc(DataAcc) {} + + void operator()() const { + auto *Ptr = mDeviceStorage->template getAs(); + Ptr->increment( + mDataAcc.template get_multi_ptr().get()); + } + auto get(oneapi::properties_tag) const { + return oneapi::properties{oneapi::assume_indirect_calls}; + } +}; + int call(sycl::queue Q, storage_t *DeviceStorage, int Init) { int Data = Init; { sycl::buffer DataStorage(&Data, sycl::range{1}); - constexpr oneapi::properties props{oneapi::assume_indirect_calls}; Q.submit([&](sycl::handler &CGH) { sycl::accessor DataAcc(DataStorage, CGH, sycl::write_only); - CGH.single_task(props, [=]() { - auto *Ptr = DeviceStorage->getAs(); - Ptr->increment( - DataAcc.get_multi_ptr().get()); - }); + CGH.single_task(KernelFunctor(DeviceStorage, DataAcc)); }); } diff --git a/sycl/test/check_device_code/extensions/properties/properties_kernel_device_has.cpp b/sycl/test/check_device_code/extensions/properties/properties_kernel_device_has.cpp index 055b25b920b8b..3d1c528744afd 100644 --- a/sycl/test/check_device_code/extensions/properties/properties_kernel_device_has.cpp +++ b/sycl/test/check_device_code/extensions/properties/properties_kernel_device_has.cpp @@ -1,5 +1,8 @@ -// RUN: %clangxx -fsycl-device-only -S -Xclang -emit-llvm -Xclang -disable-llvm-passes %s -o - | FileCheck %s --check-prefix CHECK-IR -// RUN: %clangxx -fsycl -fsyntax-only -Xclang -verify %s +// TODO: Currently using the -Wno-deprecated-declarations flag due to issue +// https://github.com/intel/llvm/issues/16320. Remove the flag once the issue is +// resolved. +// RUN: %clangxx -fsycl-device-only -S -Wno-deprecated-declarations -Xclang -emit-llvm -Xclang -disable-llvm-passes %s -o - | FileCheck %s --check-prefix CHECK-IR +// RUN: %clangxx -fsycl -fsyntax-only -Wno-deprecated-declarations -Xclang -verify %s // expected-no-diagnostics #include diff --git a/sycl/test/check_device_code/extensions/properties/properties_kernel_sub_group_size.cpp b/sycl/test/check_device_code/extensions/properties/properties_kernel_sub_group_size.cpp index a179c134749e9..ad81d1db1fe0b 100644 --- a/sycl/test/check_device_code/extensions/properties/properties_kernel_sub_group_size.cpp +++ b/sycl/test/check_device_code/extensions/properties/properties_kernel_sub_group_size.cpp @@ -1,5 +1,8 @@ -// RUN: %clangxx -fsycl-device-only -S -Xclang -emit-llvm %s -o - | FileCheck %s --check-prefix CHECK-IR -// RUN: %clangxx -fsycl -fsyntax-only -Xclang -verify %s +// TODO: Currently using the -Wno-deprecated-declarations flag due to issue +// https://github.com/intel/llvm/issues/16320. Remove the flag once the issue is +// resolved. +// RUN: %clangxx -fsycl-device-only -S -Wno-deprecated-declarations -Xclang -emit-llvm %s -o - | FileCheck %s --check-prefix CHECK-IR +// RUN: %clangxx -fsycl -fsyntax-only -Wno-deprecated-declarations -Xclang -verify %s // expected-no-diagnostics #include diff --git a/sycl/test/check_device_code/extensions/properties/properties_kernel_work_group_size.cpp b/sycl/test/check_device_code/extensions/properties/properties_kernel_work_group_size.cpp index 932b92fab9009..63280fcc638f3 100644 --- a/sycl/test/check_device_code/extensions/properties/properties_kernel_work_group_size.cpp +++ b/sycl/test/check_device_code/extensions/properties/properties_kernel_work_group_size.cpp @@ -1,5 +1,8 @@ -// RUN: %clangxx -fsycl-device-only -S -Xclang -emit-llvm %s -o - | FileCheck %s --check-prefix CHECK-IR -// RUN: %clangxx -fsycl -fsyntax-only -Xclang -verify %s +// TODO: Currently using the -Wno-deprecated-declarations flag due to issue +// https://github.com/intel/llvm/issues/16320. Remove the flag once the issue is +// resolved. +// RUN: %clangxx -fsycl-device-only -S -Wno-deprecated-declarations -Xclang -emit-llvm %s -o - | FileCheck %s --check-prefix CHECK-IR +// RUN: %clangxx -fsycl -fsyntax-only -Wno-deprecated-declarations -Xclang -verify %s // expected-no-diagnostics #include diff --git a/sycl/test/check_device_code/extensions/properties/properties_kernel_work_group_size_hint.cpp b/sycl/test/check_device_code/extensions/properties/properties_kernel_work_group_size_hint.cpp index a844b484b8b51..a0bae31ad8004 100644 --- a/sycl/test/check_device_code/extensions/properties/properties_kernel_work_group_size_hint.cpp +++ b/sycl/test/check_device_code/extensions/properties/properties_kernel_work_group_size_hint.cpp @@ -1,5 +1,8 @@ -// RUN: %clangxx -fsycl-device-only -S -Xclang -emit-llvm %s -o - | FileCheck %s --check-prefix CHECK-IR -// RUN: %clangxx -fsycl -fsyntax-only -Xclang -verify %s +// TODO: Currently using the -Wno-deprecated-declarations flag due to issue +// https://github.com/intel/llvm/issues/16320. Remove the flag once the issue is +// resolved. +// RUN: %clangxx -fsycl-device-only -S -Wno-deprecated-declarations -Xclang -emit-llvm %s -o - | FileCheck %s --check-prefix CHECK-IR +// RUN: %clangxx -fsycl -fsyntax-only -Wno-deprecated-declarations -Xclang -verify %s // expected-no-diagnostics #include diff --git a/sycl/test/warnings/deprecated_single_task_parallel_for_with_props.cpp b/sycl/test/warnings/deprecated_single_task_parallel_for_with_props.cpp new file mode 100644 index 0000000000000..e4bbf16091808 --- /dev/null +++ b/sycl/test/warnings/deprecated_single_task_parallel_for_with_props.cpp @@ -0,0 +1,65 @@ +// Ignore unexpected warnings because for some reason the warnings are emitted +// twice, e.g. once for `single_task`, then for `single_task>>`. +// RUN: %clangxx -fsycl -sycl-std=2020 -fsycl-device-only -Xclang -verify -Xclang -verify-ignore-unexpected=warning -Xclang -verify-ignore-unexpected=note %s -fsyntax-only -Wall -Wextra +#include + +using namespace sycl; +int main() { + queue Q; + event Ev; + range<1> R1{1}; + range<2> R2(1, 1); + range<3> R3(1, 1, 1); + nd_range<1> NDR1{R1, R1}; + constexpr auto Props = sycl::ext::oneapi::experimental::properties{}; + + // expected-warning@+1{{'single_task' is deprecated: Use sycl::ext::oneapi::experimental::single_task (provided in the sycl_ext_oneapi_enqueue_functions extension) instead.}} + Q.single_task(Props, []() {}); + // expected-warning@+1{{'single_task' is deprecated: Use sycl::ext::oneapi::experimental::single_task (provided in the sycl_ext_oneapi_enqueue_functions extension) instead.}} + Q.single_task(Ev, Props, []() {}); + // expected-warning@+1{{'single_task' is deprecated: Use sycl::ext::oneapi::experimental::single_task (provided in the sycl_ext_oneapi_enqueue_functions extension) instead.}} + Q.single_task({Ev}, Props, []() {}); + + // expected-warning@+1{{'parallel_for' is deprecated: Use sycl::ext::oneapi::experimental::parallel_for (provided in the sycl_ext_oneapi_enqueue_functions extension) instead.}} + Q.parallel_for(NDR1, Props, [](nd_item<1>) {}); + + // expected-warning@+2{{'single_task' is deprecated: Use sycl::ext::oneapi::experimental::single_task (provided in the sycl_ext_oneapi_enqueue_functions extension) instead.}} + Q.submit([&](handler &CGH) { + CGH.single_task(Props, []() {}); + }); + + // expected-warning@+2{{'parallel_for_work_group' is deprecated: Use sycl::ext::oneapi::experimental::parallel_for (provided in the sycl_ext_oneapi_enqueue_functions extension) instead.}} + Q.submit([&](handler &CGH) { + CGH.parallel_for_work_group(R1, Props, + [](sycl::group<1>) {}); + }); + // expected-warning@+2{{'parallel_for_work_group' is deprecated: Use sycl::ext::oneapi::experimental::parallel_for (provided in the sycl_ext_oneapi_enqueue_functions extension) instead.}} + Q.submit([&](handler &CGH) { + CGH.parallel_for_work_group(R2, Props, + [](sycl::group<2>) {}); + }); + // expected-warning@+2{{'parallel_for_work_group' is deprecated: Use sycl::ext::oneapi::experimental::parallel_for (provided in the sycl_ext_oneapi_enqueue_functions extension) instead.}} + Q.submit([&](handler &CGH) { + CGH.parallel_for_work_group(R3, Props, + [](sycl::group<3>) {}); + }); + + // expected-warning@+2{{'parallel_for_work_group' is deprecated: Use sycl::ext::oneapi::experimental::parallel_for (provided in the sycl_ext_oneapi_enqueue_functions extension) instead.}} + Q.submit([&](handler &CGH) { + CGH.parallel_for_work_group(R1, R1, Props, + [](sycl::group<1>) {}); + }); + // expected-warning@+2{{'parallel_for_work_group' is deprecated: Use sycl::ext::oneapi::experimental::parallel_for (provided in the sycl_ext_oneapi_enqueue_functions extension) instead.}} + Q.submit([&](handler &CGH) { + CGH.parallel_for_work_group(R2, R2, Props, + [](sycl::group<2>) {}); + }); + // expected-warning@+2{{'parallel_for_work_group' is deprecated: Use sycl::ext::oneapi::experimental::parallel_for (provided in the sycl_ext_oneapi_enqueue_functions extension) instead.}} + Q.submit([&](handler &CGH) { + CGH.parallel_for_work_group(R3, R3, Props, + [](sycl::group<3>) {}); + }); + return 0; +}