Skip to content

Commit 153c9f1

Browse files
committed
[SYCL] Deprecate parallel_for and single_task overloads with properties
Signed-off-by: Hu, Peisen <[email protected]>
1 parent 38e6e1b commit 153c9f1

File tree

15 files changed

+485
-85
lines changed

15 files changed

+485
-85
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
# Please use "#" to add comments here.
22
# Do not delete the file even if it's empty.
3+
# See https://github.com/intel/llvm/pull/16615
4+
handler

devops/dependencies.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"igc": {
1010
"github_tag": "v2.5.6",
11-
"version": "2.5.6",
11+
"version": "v2.5.6",
1212
"url": "https://github.com/intel/intel-graphics-compiler/releases/tag/v2.5.6",
1313
"root": "{DEPS_ROOT}/opencl/runtime/linux/oclgpu"
1414
},

llvm/docs/requirements-hashed.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ imagesize==1.4.1 \
151151
--hash=sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b \
152152
--hash=sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a
153153
# via sphinx
154-
jinja2==3.1.4 \
154+
jinja2==3.1.5 \
155155
--hash=sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369 \
156156
--hash=sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d
157157
# via
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
# commit 8b7a99578966eb691a961d9620ea38d235196b2f
2-
# Merge: ed095412 7b0e3b19
3-
# Author: Martin Grant <[email protected]>
4-
# Date: Mon Jan 20 09:27:22 2025 +0000
5-
# Merge pull request #2582 from przemektmalon/przemek/intel-host-usm-support
6-
# Enable Host USM backed images on Level Zero
7-
set(UNIFIED_RUNTIME_TAG 8b7a99578966eb691a961d9620ea38d235196b2f)
1+
# commit b074893e854d28141cd67bc5935ed87e47eb3bb6
2+
# Merge: 71a5eab0 128ea023
3+
# Author: Ross Brunton <[email protected]>
4+
# Date: Tue Jan 21 11:21:50 2025 +0000
5+
# Merge pull request #2539 from RossBrunton/ross/specconst
6+
#
7+
# Added `DEVICE_INFO_PROGRAM_SET_SPECIALIZATION_CONSTANTS`
8+
set(UNIFIED_RUNTIME_TAG b074893e854d28141cd67bc5935ed87e47eb3bb6)

sycl/doc/extensions/experimental/sycl_ext_oneapi_bindless_images.asciidoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,15 @@ The second way to allocate image memory is to use USM allocations. SYCL already
428428
provides a number of USM allocation functions. This proposal would add another,
429429
pitched memory allocation, through `pitched_alloc_device`.
430430

431+
Bindless images can be backed by device, host, or shared USM memory allocations.
432+
433+
[NOTE]
434+
====
435+
Image memory backed by USM device and host allocations is generally supported,
436+
whereas shared USM allocations depend on the SYCL backend as well as the device
437+
capabilities.
438+
====
439+
431440
```cpp
432441
namespace sycl::ext::oneapi::experimental {
433442

@@ -2328,4 +2337,5 @@ These features still need to be handled:
23282337
|6.4|2024-10-15| - Fix bindless spec examples and include examples in bindless
23292338
spec using asciidoc include.
23302339
|6.5|2024-10-22| - Allow 3-channel image formats on some backends.
2340+
|6.6|2025-01-20| - Clarify support for the specific types of USM allocations.
23312341
|======================

sycl/include/sycl/handler.hpp

Lines changed: 76 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2292,61 +2292,80 @@ class __SYCL_EXPORT handler {
22922292

22932293
template <typename KernelName = detail::auto_name, typename KernelType,
22942294
typename PropertiesT>
2295-
std::enable_if_t<
2296-
ext::oneapi::experimental::is_property_list<PropertiesT>::value>
2297-
single_task(PropertiesT Props, _KERNELFUNCPARAM(KernelFunc)) {
2295+
__SYCL_DEPRECATED(
2296+
"Use sycl::ext::oneapi::experimental::single_task (provided in the "
2297+
"sycl_ext_oneapi_enqueue_functions extension) instead.")
2298+
std::enable_if_t<ext::oneapi::experimental::is_property_list<
2299+
PropertiesT>::value> single_task(PropertiesT Props,
2300+
_KERNELFUNCPARAM(KernelFunc)) {
22982301
single_task_lambda_impl<KernelName, KernelType, PropertiesT>(Props,
22992302
KernelFunc);
23002303
}
23012304

23022305
template <typename KernelName = detail::auto_name, typename KernelType,
23032306
typename PropertiesT>
2304-
std::enable_if_t<
2305-
ext::oneapi::experimental::is_property_list<PropertiesT>::value>
2306-
parallel_for(range<1> NumWorkItems, PropertiesT Props,
2307-
_KERNELFUNCPARAM(KernelFunc)) {
2307+
__SYCL_DEPRECATED(
2308+
"Use sycl::ext::oneapi::experimental::single_task (provided in the "
2309+
"sycl_ext_oneapi_enqueue_functions extension) instead.")
2310+
std::enable_if_t<ext::oneapi::experimental::is_property_list<
2311+
PropertiesT>::value> parallel_for(range<1> NumWorkItems,
2312+
PropertiesT Props,
2313+
_KERNELFUNCPARAM(KernelFunc)) {
23082314
parallel_for_lambda_impl<KernelName, KernelType, 1, PropertiesT>(
23092315
NumWorkItems, Props, std::move(KernelFunc));
23102316
}
23112317

23122318
template <typename KernelName = detail::auto_name, typename KernelType,
23132319
typename PropertiesT>
2314-
std::enable_if_t<
2315-
ext::oneapi::experimental::is_property_list<PropertiesT>::value>
2316-
parallel_for(range<2> NumWorkItems, PropertiesT Props,
2317-
_KERNELFUNCPARAM(KernelFunc)) {
2320+
__SYCL_DEPRECATED(
2321+
"Use sycl::ext::oneapi::experimental::single_task (provided in the "
2322+
"sycl_ext_oneapi_enqueue_functions extension) instead.")
2323+
std::enable_if_t<ext::oneapi::experimental::is_property_list<
2324+
PropertiesT>::value> parallel_for(range<2> NumWorkItems,
2325+
PropertiesT Props,
2326+
_KERNELFUNCPARAM(KernelFunc)) {
23182327
parallel_for_lambda_impl<KernelName, KernelType, 2, PropertiesT>(
23192328
NumWorkItems, Props, std::move(KernelFunc));
23202329
}
23212330

23222331
template <typename KernelName = detail::auto_name, typename KernelType,
23232332
typename PropertiesT>
2324-
std::enable_if_t<
2325-
ext::oneapi::experimental::is_property_list<PropertiesT>::value>
2326-
parallel_for(range<3> NumWorkItems, PropertiesT Props,
2327-
_KERNELFUNCPARAM(KernelFunc)) {
2333+
__SYCL_DEPRECATED(
2334+
"Use sycl::ext::oneapi::experimental::single_task (provided in the "
2335+
"sycl_ext_oneapi_enqueue_functions extension) instead.")
2336+
std::enable_if_t<ext::oneapi::experimental::is_property_list<
2337+
PropertiesT>::value> parallel_for(range<3> NumWorkItems,
2338+
PropertiesT Props,
2339+
_KERNELFUNCPARAM(KernelFunc)) {
23282340
parallel_for_lambda_impl<KernelName, KernelType, 3, PropertiesT>(
23292341
NumWorkItems, Props, std::move(KernelFunc));
23302342
}
23312343

23322344
template <typename KernelName = detail::auto_name, typename KernelType,
23332345
typename PropertiesT, int Dims>
2334-
std::enable_if_t<
2335-
ext::oneapi::experimental::is_property_list<PropertiesT>::value>
2336-
parallel_for(nd_range<Dims> Range, PropertiesT Properties,
2337-
_KERNELFUNCPARAM(KernelFunc)) {
2346+
__SYCL_DEPRECATED(
2347+
"Use sycl::ext::oneapi::experimental::single_task (provided in the "
2348+
"sycl_ext_oneapi_enqueue_functions extension) instead.")
2349+
std::enable_if_t<ext::oneapi::experimental::is_property_list<
2350+
PropertiesT>::value> parallel_for(nd_range<Dims> Range,
2351+
PropertiesT Properties,
2352+
_KERNELFUNCPARAM(KernelFunc)) {
23382353
parallel_for_impl<KernelName>(Range, Properties, std::move(KernelFunc));
23392354
}
23402355

23412356
/// Reductions @{
23422357

23432358
template <typename KernelName = detail::auto_name, typename PropertiesT,
23442359
typename... RestT>
2345-
std::enable_if_t<
2346-
(sizeof...(RestT) > 1) &&
2347-
detail::AreAllButLastReductions<RestT...>::value &&
2348-
ext::oneapi::experimental::is_property_list<PropertiesT>::value>
2349-
parallel_for(range<1> Range, PropertiesT Properties, RestT &&...Rest) {
2360+
__SYCL_DEPRECATED(
2361+
"Use sycl::ext::oneapi::experimental::parallel_for (provided in the "
2362+
"sycl_ext_oneapi_enqueue_functions extension) instead.")
2363+
std::enable_if_t<(sizeof...(RestT) > 1) &&
2364+
detail::AreAllButLastReductions<RestT...>::value &&
2365+
ext::oneapi::experimental::is_property_list<
2366+
PropertiesT>::value> parallel_for(range<1> Range,
2367+
PropertiesT Properties,
2368+
RestT &&...Rest) {
23502369
#ifndef __SYCL_DEVICE_ONLY__
23512370
throwIfGraphAssociated<ext::oneapi::experimental::detail::
23522371
UnsupportedGraphFeatures::sycl_reductions>();
@@ -2357,11 +2376,15 @@ class __SYCL_EXPORT handler {
23572376

23582377
template <typename KernelName = detail::auto_name, typename PropertiesT,
23592378
typename... RestT>
2360-
std::enable_if_t<
2361-
(sizeof...(RestT) > 1) &&
2362-
detail::AreAllButLastReductions<RestT...>::value &&
2363-
ext::oneapi::experimental::is_property_list<PropertiesT>::value>
2364-
parallel_for(range<2> Range, PropertiesT Properties, RestT &&...Rest) {
2379+
__SYCL_DEPRECATED(
2380+
"Use sycl::ext::oneapi::experimental::parallel_for (provided in the "
2381+
"sycl_ext_oneapi_enqueue_functions extension) instead.")
2382+
std::enable_if_t<(sizeof...(RestT) > 1) &&
2383+
detail::AreAllButLastReductions<RestT...>::value &&
2384+
ext::oneapi::experimental::is_property_list<
2385+
PropertiesT>::value> parallel_for(range<2> Range,
2386+
PropertiesT Properties,
2387+
RestT &&...Rest) {
23652388
#ifndef __SYCL_DEVICE_ONLY__
23662389
throwIfGraphAssociated<ext::oneapi::experimental::detail::
23672390
UnsupportedGraphFeatures::sycl_reductions>();
@@ -2372,11 +2395,15 @@ class __SYCL_EXPORT handler {
23722395

23732396
template <typename KernelName = detail::auto_name, typename PropertiesT,
23742397
typename... RestT>
2375-
std::enable_if_t<
2376-
(sizeof...(RestT) > 1) &&
2377-
detail::AreAllButLastReductions<RestT...>::value &&
2378-
ext::oneapi::experimental::is_property_list<PropertiesT>::value>
2379-
parallel_for(range<3> Range, PropertiesT Properties, RestT &&...Rest) {
2398+
__SYCL_DEPRECATED(
2399+
"Use sycl::ext::oneapi::experimental::parallel_for (provided in the "
2400+
"sycl_ext_oneapi_enqueue_functions extension) instead.")
2401+
std::enable_if_t<(sizeof...(RestT) > 1) &&
2402+
detail::AreAllButLastReductions<RestT...>::value &&
2403+
ext::oneapi::experimental::is_property_list<
2404+
PropertiesT>::value> parallel_for(range<3> Range,
2405+
PropertiesT Properties,
2406+
RestT &&...Rest) {
23802407
#ifndef __SYCL_DEVICE_ONLY__
23812408
throwIfGraphAssociated<ext::oneapi::experimental::detail::
23822409
UnsupportedGraphFeatures::sycl_reductions>();
@@ -2411,11 +2438,15 @@ class __SYCL_EXPORT handler {
24112438

24122439
template <typename KernelName = detail::auto_name, int Dims,
24132440
typename PropertiesT, typename... RestT>
2414-
std::enable_if_t<
2415-
(sizeof...(RestT) > 1) &&
2416-
detail::AreAllButLastReductions<RestT...>::value &&
2417-
ext::oneapi::experimental::is_property_list<PropertiesT>::value>
2418-
parallel_for(nd_range<Dims> Range, PropertiesT Properties, RestT &&...Rest) {
2441+
__SYCL_DEPRECATED(
2442+
"Use sycl::ext::oneapi::experimental::parallel_for (provided in the "
2443+
"sycl_ext_oneapi_enqueue_functions extension) instead.")
2444+
std::enable_if_t<(sizeof...(RestT) > 1) &&
2445+
detail::AreAllButLastReductions<RestT...>::value &&
2446+
ext::oneapi::experimental::is_property_list<
2447+
PropertiesT>::value> parallel_for(nd_range<Dims> Range,
2448+
PropertiesT Properties,
2449+
RestT &&...Rest) {
24192450
#ifndef __SYCL_DEVICE_ONLY__
24202451
throwIfGraphAssociated<ext::oneapi::experimental::detail::
24212452
UnsupportedGraphFeatures::sycl_reductions>();
@@ -2437,6 +2468,9 @@ class __SYCL_EXPORT handler {
24372468

24382469
template <typename KernelName = detail::auto_name, typename KernelType,
24392470
int Dims, typename PropertiesT>
2471+
__SYCL_DEPRECATED(
2472+
"Use sycl::ext::oneapi::experimental::parallel_for (provided in the "
2473+
"sycl_ext_oneapi_enqueue_functions extension) instead.")
24402474
void parallel_for_work_group(range<Dims> NumWorkGroups, PropertiesT Props,
24412475
_KERNELFUNCPARAM(KernelFunc)) {
24422476
parallel_for_work_group_lambda_impl<KernelName, KernelType, Dims,
@@ -2446,6 +2480,9 @@ class __SYCL_EXPORT handler {
24462480

24472481
template <typename KernelName = detail::auto_name, typename KernelType,
24482482
int Dims, typename PropertiesT>
2483+
__SYCL_DEPRECATED(
2484+
"Use sycl::ext::oneapi::experimental::parallel_for (provided in the "
2485+
"sycl_ext_oneapi_enqueue_functions extension) instead.")
24492486
void parallel_for_work_group(range<Dims> NumWorkGroups,
24502487
range<Dims> WorkGroupSize, PropertiesT Props,
24512488
_KERNELFUNCPARAM(KernelFunc)) {

0 commit comments

Comments
 (0)