Skip to content

Commit 340fe25

Browse files
[SYCL][NFC] Cleanup unnecessary includes (#14670)
This is a result of code review for #14145: that PR contains find-and-replace changes for `pi` -> `ur` headers, but some of affected files have no other changes in them, meaning that the header is in fact, unused and we can drop `#include` directive.
1 parent 8bf7ae3 commit 340fe25

17 files changed

+29
-49
lines changed

sycl/include/sycl/accessor.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#include <sycl/detail/handler_proxy.hpp> // for associateWithH...
2323
#include <sycl/detail/helpers.hpp> // for loop
2424
#include <sycl/detail/owner_less_base.hpp> // for OwnerLessBase
25-
#include <sycl/detail/pi.h> // for PI_ERROR_INVAL...
2625
#include <sycl/detail/property_helper.hpp> // for PropWithDataKind
2726
#include <sycl/detail/property_list_base.hpp> // for PropertyListBase
2827
#include <sycl/detail/type_list.hpp> // for is_contained

sycl/include/sycl/backend/opencl.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,9 @@
88

99
#pragma once
1010

11-
#include <sycl/backend_types.hpp> // for backend
12-
#include <sycl/context.hpp> // for context
13-
#include <sycl/detail/backend_traits.hpp> // for interop
14-
#include <sycl/detail/defines_elementary.hpp> // for __SYCL_DEPRECATED
1511
#include <sycl/detail/export.hpp> // for __SYCL_EXPORT
16-
#include <sycl/detail/pi.h> // for pi_native_handle
1712
#include <sycl/device.hpp> // for device
1813
#include <sycl/platform.hpp> // for platform
19-
#include <sycl/queue.hpp> // for queue
2014

2115
#include <string> // for string
2216
#include <type_traits> // for enable_if_t

sycl/include/sycl/detail/array.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#pragma once
1010

1111
#include <sycl/detail/defines_elementary.hpp> // for __SYCL_ALWAYS_INLINE
12-
#include <sycl/detail/pi.h> // for PI_ERROR_INVALID_VALUE
1312
#include <sycl/exception.hpp>
1413

1514
#include <stddef.h> // for size_t

sycl/include/sycl/detail/cg_types.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include <sycl/detail/host_profiling_info.hpp> // for HostProfilingInfo
1515
#include <sycl/detail/item_base.hpp> // for id
1616
#include <sycl/detail/kernel_desc.hpp> // for kernel_param_kind_t
17-
#include <sycl/detail/pi.h> // for PI_ERROR_INVALID_WORK...
1817
#include <sycl/exception.hpp>
1918
#include <sycl/group.hpp> // for group
2019
#include <sycl/h_item.hpp> // for h_item

sycl/include/sycl/detail/helpers.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include <CL/__spirv/spirv_types.hpp> // for MemorySemanticsMask
1212
#include <sycl/access/access.hpp> // for fence_space
1313
#include <sycl/detail/export.hpp> // for __SYCL_EXPORT
14-
#include <sycl/detail/pi.hpp> // for PiEvent
1514
#include <sycl/memory_enums.hpp> // for memory_order
1615

1716
#ifdef __SYCL_DEVICE_ONLY__

sycl/include/sycl/detail/property_list_base.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
#pragma once
1010

11-
#include <sycl/detail/pi.h> // for PI_ERROR_INVALID_VALUE
1211
#include <sycl/detail/property_helper.hpp> // for DataLessPropKind, Propert...
1312
#include <sycl/exception.hpp>
1413

sycl/include/sycl/ext/oneapi/accessor_property_list.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
#include <sycl/access/access.hpp> // for mode, placeholder, target
1212
#include <sycl/detail/defines.hpp> // for __SYCL_TYPE
13-
#include <sycl/detail/pi.h> // for PI_ERROR_INVALID_VALUE
1413
#include <sycl/detail/property_helper.hpp> // for DataLessPropKind, Prop...
1514
#include <sycl/detail/property_list_base.hpp> // for PropertyListBase
1615
#include <sycl/exception.hpp>

sycl/include/sycl/ext/oneapi/experimental/group_helpers_sorters.hpp

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
#include <sycl/aliases.hpp> // for half
1414
#include <sycl/builtins.hpp> // for min
15-
#include <sycl/detail/pi.h> // for PI_ERROR_INVALID_DEVICE
1615
#include <sycl/exception.hpp> // for sycl_category, exception
1716
#include <sycl/ext/oneapi/bfloat16.hpp> // for bfloat16
1817
#include <sycl/ext/oneapi/properties/properties.hpp>
@@ -121,8 +120,8 @@ template <typename CompareT = std::less<>> class joint_sorter {
121120
sycl::detail::merge_sort(g, first, n, comp, scratch_begin);
122121
#else
123122
throw sycl::exception(
124-
std::error_code(PI_ERROR_INVALID_DEVICE, sycl::sycl_category()),
125-
"default_sorter constructor is not supported on host device.");
123+
sycl::errc::feature_not_supported,
124+
"default_sorter constructor is not supported on host.");
126125
#endif
127126
}
128127

@@ -156,8 +155,8 @@ class group_sorter {
156155
val = scratch_begin[local_id];
157156
#else
158157
throw sycl::exception(
159-
std::error_code(PI_ERROR_INVALID_DEVICE, sycl::sycl_category()),
160-
"default_sorter operator() is not supported on host device.");
158+
sycl::errc::feature_not_supported,
159+
"default_sorter constructor is not supported on host.");
161160
#endif
162161
return val;
163162
}
@@ -359,8 +358,8 @@ class joint_sorter {
359358
first_bit, last_bit);
360359
#else
361360
throw sycl::exception(
362-
std::error_code(PI_ERROR_INVALID_DEVICE, sycl::sycl_category()),
363-
"radix_sorter is not supported on host device.");
361+
sycl::errc::feature_not_supported,
362+
"default_sorter constructor is not supported on host.");
364363
#endif
365364
}
366365

@@ -414,8 +413,8 @@ class group_sorter {
414413
return result[0];
415414
#else
416415
throw sycl::exception(
417-
std::error_code(PI_ERROR_INVALID_DEVICE, sycl::sycl_category()),
418-
"radix_sorter is not supported on host device.");
416+
sycl::errc::feature_not_supported,
417+
"default_sorter constructor is not supported on host.");
419418
#endif
420419
}
421420

sycl/include/sycl/ext/oneapi/experimental/group_load_store.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,12 +392,12 @@ group_store(Group g, const sycl::vec<InputT, N> &in, OutputIteratorT out_ptr,
392392
#else
393393
template <typename... Args> void group_load(Args...) {
394394
throw sycl::exception(
395-
std::error_code(PI_ERROR_INVALID_DEVICE, sycl::sycl_category()),
395+
sycl::errc::feature_not_supported,
396396
"Group loads/stores are not supported on host.");
397397
}
398398
template <typename... Args> void group_store(Args...) {
399399
throw sycl::exception(
400-
std::error_code(PI_ERROR_INVALID_DEVICE, sycl::sycl_category()),
400+
sycl::errc::feature_not_supported,
401401
"Group loads/stores are not supported on host.");
402402
}
403403
#endif

sycl/include/sycl/ext/oneapi/experimental/group_sort.hpp

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
#include "group_helpers_sorters.hpp" // for default_sorter, group_with_sc...
1414

15-
#include <sycl/detail/pi.h> // for PI_ERROR_INVALID_DEVICE
1615
#include <sycl/detail/type_traits.hpp> // for is_generic_group
1716
#include <sycl/exception.hpp> // for sycl_category, exception
1817

@@ -126,8 +125,8 @@ joint_sort([[maybe_unused]] Group group, [[maybe_unused]] Iter first,
126125
sorter(group, first, last);
127126
#else
128127
throw sycl::exception(
129-
std::error_code(PI_ERROR_INVALID_DEVICE, sycl::sycl_category()),
130-
"Group algorithms are not supported on host device.");
128+
sycl::errc::feature_not_supported,
129+
"Group algorithms are not supported on host.");
131130
#endif
132131
}
133132

@@ -154,8 +153,8 @@ sort_over_group([[maybe_unused]] Group group, [[maybe_unused]] T value,
154153
return sorter(group, value);
155154
#else
156155
throw sycl::exception(
157-
std::error_code(PI_ERROR_INVALID_DEVICE, sycl::sycl_category()),
158-
"Group algorithms are not supported on host device.");
156+
sycl::errc::feature_not_supported,
157+
"Group algorithms are not supported on host.");
159158
#endif
160159
}
161160

@@ -185,8 +184,8 @@ sort_key_value_over_group([[maybe_unused]] Group g, [[maybe_unused]] KeyTy key,
185184
return sorter(g, key, value);
186185
#else
187186
throw sycl::exception(
188-
std::error_code(PI_ERROR_INVALID_DEVICE, sycl::sycl_category()),
189-
"Group algorithms are not supported on host device.");
187+
sycl::errc::feature_not_supported,
188+
"Group algorithms are not supported on host.");
190189
#endif
191190
}
192191

@@ -227,8 +226,8 @@ sort_over_group([[maybe_unused]] Group g,
227226
return sorter(g, values, properties);
228227
#else
229228
throw sycl::exception(
230-
std::error_code(PI_ERROR_INVALID_DEVICE, sycl::sycl_category()),
231-
"Group algorithms are not supported on host device.");
229+
sycl::errc::feature_not_supported,
230+
"Group algorithms are not supported on host.");
232231
#endif
233232
}
234233

sycl/include/sycl/ext/oneapi/group_local_memory.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
#include <sycl/access/access.hpp> // for address_space, decorated
1111
#include <sycl/detail/defines_elementary.hpp> // for __SYCL_ALWAYS_INLINE
12-
#include <sycl/detail/pi.h> // for PI_ERROR_INVALID_OPERA...
1312
#include <sycl/detail/type_traits.hpp> // for is_group
1413
#include <sycl/exception.hpp> // for exception
1514
#include <sycl/ext/intel/usm_pointers.hpp> // for multi_ptr

sycl/include/sycl/kernel_handler.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
#include <sycl/detail/defines.hpp> // for __SYCL_TYPE
1212
#include <sycl/detail/defines_elementary.hpp> // for __SYCL_ALWAYS_INLINE
13-
#include <sycl/detail/pi.h> // for PI_ERROR_INVALID_OPERATION
1413
#include <sycl/exception.hpp> // for feature_not_supported
1514

1615
#ifdef __SYCL_DEVICE_ONLY__

sycl/include/sycl/property_list.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
#pragma once
1010

11-
#include <sycl/detail/pi.h> // for PI_ERROR_INVALID_VALUE
1211
#include <sycl/detail/property_helper.hpp> // for DataLessPropKind, Pro...
1312
#include <sycl/detail/property_list_base.hpp> // for PropertyListBase
1413
#include <sycl/exception.hpp>

sycl/include/sycl/sub_group.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include <sycl/access/access.hpp> // for address_space, decorated
1212
#include <sycl/detail/defines_elementary.hpp> // for __SYCL_DEPRECATED
1313
#include <sycl/detail/generic_type_traits.hpp> // for select_cl_scalar_inte...
14-
#include <sycl/detail/pi.h> // for PI_ERROR_INVALID_DEVICE
1514
#include <sycl/detail/type_traits.hpp> // for is_scalar_arithmetic
1615
#include <sycl/exception.hpp> // for exception, make_error...
1716
#include <sycl/id.hpp> // for id

sycl/test/include_deps/sycl_accessor.hpp.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,10 @@
2121
// CHECK-NEXT: info/aspects_deprecated.def
2222
// CHECK-NEXT: atomic.hpp
2323
// CHECK-NEXT: detail/helpers.hpp
24-
// CHECK-NEXT: detail/pi.hpp
25-
// CHECK-NEXT: backend_types.hpp
26-
// CHECK-NEXT: detail/os_util.hpp
24+
// CHECK-NEXT: memory_enums.hpp
2725
// CHECK-NEXT: detail/pi.h
2826
// CHECK-NEXT: detail/pi_error.def
2927
// CHECK-NEXT: detail/pi.def
30-
// CHECK-NEXT: memory_enums.hpp
3128
// CHECK-NEXT: CL/__spirv/spirv_vars.hpp
3229
// CHECK-NEXT: multi_ptr.hpp
3330
// CHECK-NEXT: detail/type_traits.hpp
@@ -61,6 +58,7 @@
6158
// CHECK-NEXT: detail/boost/mp11/detail/mp_with_index.hpp
6259
// CHECK-NEXT: detail/boost/mp11/integer_sequence.hpp
6360
// CHECK-NEXT: buffer.hpp
61+
// CHECK-NEXT: backend_types.hpp
6462
// CHECK-NEXT: detail/array.hpp
6563
// CHECK-NEXT: exception.hpp
6664
// CHECK-NEXT: detail/cl.h
@@ -78,6 +76,7 @@
7876
// CHECK-NEXT: detail/stl_type_traits.hpp
7977
// CHECK-NEXT: detail/sycl_mem_obj_allocator.hpp
8078
// CHECK-NEXT: detail/aligned_allocator.hpp
79+
// CHECK-NEXT: detail/os_util.hpp
8180
// CHECK-NEXT: ext/oneapi/accessor_property_list.hpp
8281
// CHECK-NEXT: detail/property_list_base.hpp
8382
// CHECK-NEXT: property_list.hpp

sycl/test/include_deps/sycl_buffer.hpp.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,18 @@
1313
// CHECK-NEXT: detail/export.hpp
1414
// CHECK-NEXT: backend_types.hpp
1515
// CHECK-NEXT: detail/array.hpp
16-
// CHECK-NEXT: detail/pi.h
17-
// CHECK-NEXT: detail/pi_error.def
18-
// CHECK-NEXT: detail/pi.def
1916
// CHECK-NEXT: exception.hpp
2017
// CHECK-NEXT: detail/cl.h
2118
// CHECK-NEXT: CL/cl.h
2219
// CHECK-NEXT: CL/cl_version.h
2320
// CHECK-NEXT: CL/cl_platform.h
2421
// CHECK-NEXT: CL/cl_ext.h
22+
// CHECK-NEXT: detail/pi.h
23+
// CHECK-NEXT: detail/pi_error.def
24+
// CHECK-NEXT: detail/pi.def
2525
// CHECK-NEXT: detail/string.hpp
2626
// CHECK-NEXT: detail/common.hpp
2727
// CHECK-NEXT: detail/helpers.hpp
28-
// CHECK-NEXT: detail/pi.hpp
29-
// CHECK-NEXT: detail/os_util.hpp
3028
// CHECK-NEXT: memory_enums.hpp
3129
// CHECK-NEXT: CL/__spirv/spirv_vars.hpp
3230
// CHECK-NEXT: detail/iostream_proxy.hpp
@@ -38,6 +36,7 @@
3836
// CHECK-NEXT: detail/stl_type_traits.hpp
3937
// CHECK-NEXT: detail/sycl_mem_obj_allocator.hpp
4038
// CHECK-NEXT: detail/aligned_allocator.hpp
39+
// CHECK-NEXT: detail/os_util.hpp
4140
// CHECK-NEXT: ext/oneapi/accessor_property_list.hpp
4241
// CHECK-NEXT: detail/property_list_base.hpp
4342
// CHECK-NEXT: property_list.hpp

sycl/test/include_deps/sycl_detail_core.hpp.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,10 @@
2222
// CHECK-NEXT: info/aspects_deprecated.def
2323
// CHECK-NEXT: atomic.hpp
2424
// CHECK-NEXT: detail/helpers.hpp
25-
// CHECK-NEXT: detail/pi.hpp
26-
// CHECK-NEXT: backend_types.hpp
27-
// CHECK-NEXT: detail/os_util.hpp
25+
// CHECK-NEXT: memory_enums.hpp
2826
// CHECK-NEXT: detail/pi.h
2927
// CHECK-NEXT: detail/pi_error.def
3028
// CHECK-NEXT: detail/pi.def
31-
// CHECK-NEXT: memory_enums.hpp
3229
// CHECK-NEXT: CL/__spirv/spirv_vars.hpp
3330
// CHECK-NEXT: multi_ptr.hpp
3431
// CHECK-NEXT: detail/type_traits.hpp
@@ -62,6 +59,7 @@
6259
// CHECK-NEXT: detail/boost/mp11/detail/mp_with_index.hpp
6360
// CHECK-NEXT: detail/boost/mp11/integer_sequence.hpp
6461
// CHECK-NEXT: buffer.hpp
62+
// CHECK-NEXT: backend_types.hpp
6563
// CHECK-NEXT: detail/array.hpp
6664
// CHECK-NEXT: exception.hpp
6765
// CHECK-NEXT: detail/cl.h
@@ -79,6 +77,7 @@
7977
// CHECK-NEXT: detail/stl_type_traits.hpp
8078
// CHECK-NEXT: detail/sycl_mem_obj_allocator.hpp
8179
// CHECK-NEXT: detail/aligned_allocator.hpp
80+
// CHECK-NEXT: detail/os_util.hpp
8281
// CHECK-NEXT: ext/oneapi/accessor_property_list.hpp
8382
// CHECK-NEXT: detail/property_list_base.hpp
8483
// CHECK-NEXT: property_list.hpp
@@ -145,6 +144,7 @@
145144
// CHECK-NEXT: ext/oneapi/properties/properties.hpp
146145
// CHECK-NEXT: ext/oneapi/experimental/graph.hpp
147146
// CHECK-NEXT: handler.hpp
147+
// CHECK-NEXT: detail/pi.hpp
148148
// CHECK-NEXT: detail/reduction_forward.hpp
149149
// CHECK-NEXT: ext/intel/experimental/fp_control_kernel_properties.hpp
150150
// CHECK-NEXT: ext/intel/experimental/kernel_execution_properties.hpp

0 commit comments

Comments
 (0)