Skip to content

Commit b29e416

Browse files
authored
[SYCL][Bindless][ABI-Break] Remove deprecated functions and structs (#14555)
* remove the following deprecated functions and their overloads: - read_image - read_mipmap - map_external_memory_array - free_mipmap_mem - alloc_mipmap_mem - free_image_mem * remove deprecated structures in `bindless_images_interop.hpp` * remove piextMemImportOpaqueFD and piextImportExternalSemaphoreOpaqueFD
1 parent d814b4a commit b29e416

20 files changed

+7
-698
lines changed

sycl/include/sycl/detail/pi.def

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,9 @@ _PI_API(piextMemMipmapGetLevel)
205205
_PI_API(piextMemMipmapFree)
206206

207207
// Interop
208-
_PI_API(piextMemImportOpaqueFD)
209208
_PI_API(piextImportExternalMemory)
210209
_PI_API(piextMemReleaseInterop)
211210
_PI_API(piextMemMapExternalArray)
212-
_PI_API(piextImportExternalSemaphoreOpaqueFD)
213211
_PI_API(piextImportExternalSemaphore)
214212
_PI_API(piextDestroyExternalSemaphore)
215213
_PI_API(piextWaitExternalSemaphore)

sycl/include/sycl/detail/pi.h

Lines changed: 4 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,11 @@
201201
// (piextEnqueueKernelLaunchCustom)
202202
// 17.58 Added context parameter to piextMemImageGetInfo
203203
// 17.59 Added const-qualifier to src_ptr in piextMemImageCopy.
204+
// 18.60 Remove deprecated functions piextMemImportOpaqueFD and
205+
// piextImportExternalSemaphoreOpaqueFD
204206

205-
#define _PI_H_VERSION_MAJOR 17
206-
#define _PI_H_VERSION_MINOR 59
207+
#define _PI_H_VERSION_MAJOR 18
208+
#define _PI_H_VERSION_MINOR 60
207209

208210
#define _PI_STRING_HELPER(a) #a
209211
#define _PI_CONCAT(a, b) _PI_STRING_HELPER(a.b)
@@ -3115,23 +3117,6 @@ __SYCL_EXPORT pi_result piextMemImageGetInfo(pi_context context,
31153117
void *param_value,
31163118
size_t *param_value_size_ret);
31173119

3118-
/// [DEPRECATED] This function is deprecated in favor of
3119-
/// `piextImportExternalMemory`
3120-
///
3121-
/// API to import external memory in the form of a file descriptor.
3122-
///
3123-
/// \param context is the pi_context
3124-
/// \param device is the pi_device
3125-
/// \param size is the size of the external memory
3126-
/// \param file_descriptor is the file descriptor
3127-
/// \param ret_handle is the returned interop memory handle to the external
3128-
/// memory
3129-
__SYCL_EXPORT_DEPRECATED("This function has been deprecated in favor of "
3130-
"`piextImportExternalMemory`")
3131-
pi_result piextMemImportOpaqueFD(pi_context context, pi_device device,
3132-
size_t size, int file_descriptor,
3133-
pi_interop_mem_handle *ret_handle);
3134-
31353120
/// API to import external memory
31363121
///
31373122
/// \param context is the pi_context
@@ -3166,23 +3151,6 @@ __SYCL_EXPORT pi_result piextMemMapExternalArray(
31663151
__SYCL_EXPORT pi_result piextMemReleaseInterop(
31673152
pi_context context, pi_device device, pi_interop_mem_handle memory_handle);
31683153

3169-
/// [DEPRECATED] This function is deprecated in favor of
3170-
/// `piextImportExternalSemaphore`
3171-
///
3172-
/// API to import an external semaphore in the form of a file descriptor.
3173-
///
3174-
/// \param context is the pi_context
3175-
/// \param device is the pi_device
3176-
/// \param file_descriptor is the file descriptor
3177-
/// \param ret_handle is the returned interop semaphore handle to the external
3178-
/// semaphore
3179-
__SYCL_EXPORT_DEPRECATED("This function has been deprecated in favor of "
3180-
"`piextImportExternalSemaphore`")
3181-
pi_result
3182-
piextImportExternalSemaphoreOpaqueFD(pi_context context, pi_device device,
3183-
int file_descriptor,
3184-
pi_interop_semaphore_handle *ret_handle);
3185-
31863154
/// API to import an external semaphore
31873155
///
31883156
/// \param context is the pi_context

sycl/include/sycl/ext/oneapi/bindless_images.hpp

Lines changed: 3 additions & 273 deletions
Original file line numberDiff line numberDiff line change
@@ -77,28 +77,6 @@ alloc_image_mem(const image_descriptor &desc, const sycl::device &syclDevice,
7777
__SYCL_EXPORT image_mem_handle alloc_image_mem(const image_descriptor &desc,
7878
const sycl::queue &syclQueue);
7979

80-
/**
81-
* @brief [Deprecated] Free image memory
82-
*
83-
* @param handle Memory handle to allocated memory on the device
84-
* @param syclDevice The device in which we create our memory handle
85-
* @param syclContext The context in which we created our memory handle
86-
*/
87-
__SYCL_EXPORT_DEPRECATED("Distinct image frees are deprecated. "
88-
"Instead use overload that accepts image_type.")
89-
void free_image_mem(image_mem_handle handle, const sycl::device &syclDevice,
90-
const sycl::context &syclContext);
91-
92-
/**
93-
* @brief [Deprecated] Free image memory
94-
*
95-
* @param handle Memory handle to allocated memory on the device
96-
* @param syclQueue The queue in which we create our memory handle
97-
*/
98-
__SYCL_EXPORT_DEPRECATED("Distinct image frees are deprecated. "
99-
"Instead use overload that accepts image_type.")
100-
void free_image_mem(image_mem_handle handle, const sycl::queue &syclQueue);
101-
10280
/**
10381
* @brief Free image memory
10482
*
@@ -121,56 +99,6 @@ __SYCL_EXPORT void free_image_mem(image_mem_handle handle, image_type imageType,
12199
__SYCL_EXPORT void free_image_mem(image_mem_handle handle, image_type imageType,
122100
const sycl::queue &syclQueue);
123101

124-
/**
125-
* @brief [Deprecated] Allocate mipmap memory based on image_descriptor
126-
*
127-
* @param desc The image descriptor
128-
* @param syclDevice The device in which we create our memory handle
129-
* @param syclContext The context in which we create our memory handle
130-
* @return Memory handle to allocated memory on the device
131-
*/
132-
__SYCL_EXPORT_DEPRECATED("Distinct mipmap allocs are deprecated. "
133-
"Instead use alloc_image_mem().")
134-
image_mem_handle alloc_mipmap_mem(const image_descriptor &desc,
135-
const sycl::device &syclDevice,
136-
const sycl::context &syclContext);
137-
138-
/**
139-
* @brief [Deprecated] Allocate mipmap memory based on image_descriptor
140-
*
141-
* @param desc The image descriptor
142-
* @param syclQueue The queue in which we create our memory handle
143-
* @return Memory handle to allocated memory on the device
144-
*/
145-
__SYCL_EXPORT_DEPRECATED("Distinct mipmap allocs are deprecated. "
146-
"Instead use alloc_image_mem().")
147-
image_mem_handle alloc_mipmap_mem(const image_descriptor &desc,
148-
const sycl::device &syclQueue);
149-
150-
/**
151-
* @brief [Deprecated] Free mipmap memory
152-
*
153-
* @param handle The mipmap memory handle
154-
* @param syclDevice The device in which we created our memory handle
155-
* @param syclContext The context in which we created our memory handle
156-
*/
157-
__SYCL_EXPORT_DEPRECATED(
158-
"Distinct mipmap frees are deprecated. "
159-
"Instead use free_image_mem() that accepts image_type.")
160-
void free_mipmap_mem(image_mem_handle handle, const sycl::device &syclDevice,
161-
const sycl::context &syclContext);
162-
163-
/**
164-
* @brief [Deprecated] Free mipmap memory
165-
*
166-
* @param handle The mipmap memory handle
167-
* @param syclQueue The queue in which we created our memory handle
168-
*/
169-
__SYCL_EXPORT_DEPRECATED(
170-
"Distinct mipmap frees are deprecated. "
171-
"Instead use free_image_mem() that accepts image_type.")
172-
void free_mipmap_mem(image_mem_handle handle, const sycl::queue &syclQueue);
173-
174102
/**
175103
* @brief Retrieve the memory handle to an individual mipmap image
176104
*
@@ -229,38 +157,6 @@ __SYCL_EXPORT interop_mem_handle import_external_memory(
229157
external_mem_descriptor<ExternalMemHandleType> externalMem,
230158
const sycl::queue &syclQueue);
231159

232-
/**
233-
* @brief [Deprecated] Maps an interop memory handle to an image memory
234-
* handle (which may have a device optimized memory layout)
235-
*
236-
* @param memHandle Interop memory handle
237-
* @param desc The image descriptor
238-
* @param syclDevice The device in which we create our image memory handle
239-
* @param syclContext The conext in which we create our image memory handle
240-
* @return Memory handle to externally allocated memory on the device
241-
*/
242-
__SYCL_EXPORT_DEPRECATED("map_external_memory_array is deprecated."
243-
"use map_external_image_memory")
244-
image_mem_handle map_external_memory_array(interop_mem_handle memHandle,
245-
const image_descriptor &desc,
246-
const sycl::device &syclDevice,
247-
const sycl::context &syclContext);
248-
249-
/**
250-
* @brief [Deprecated] Maps an interop memory handle to an image memory
251-
* handle (which may have a device optimized memory layout)
252-
*
253-
* @param memHandle Interop memory handle
254-
* @param desc The image descriptor
255-
* @param syclQueue The queue in which we create our image memory handle
256-
* @return Memory handle to externally allocated memory on the device
257-
*/
258-
__SYCL_EXPORT_DEPRECATED("map_external_memory_array is deprecated."
259-
"use map_external_image_memory")
260-
image_mem_handle map_external_memory_array(interop_mem_handle memHandle,
261-
const image_descriptor &desc,
262-
const sycl::queue &syclQueue);
263-
264160
/**
265161
* @brief Maps an interop memory handle to an image memory handle (which may
266162
* have a device optimized memory layout)
@@ -686,7 +582,9 @@ get_image_num_channels(const image_mem_handle memHandle,
686582
namespace detail {
687583

688584
// is sycl::vec
689-
template <typename T> struct is_vec { static constexpr bool value = false; };
585+
template <typename T> struct is_vec {
586+
static constexpr bool value = false;
587+
};
690588
template <typename T, int N> struct is_vec<sycl::vec<T, N>> {
691589
static constexpr bool value = true;
692590
};
@@ -947,35 +845,6 @@ DataT fetch_image(const unsampled_image_handle &imageHandle [[maybe_unused]],
947845
#endif
948846
}
949847

950-
/**
951-
* @brief [Deprecated] Read an unsampled image using its handle
952-
*
953-
* @tparam DataT The return type
954-
* @tparam HintT A hint type that can be used to select for a specialized
955-
* backend intrinsic when a user-defined type is passed as `DataT`.
956-
* HintT should be a `sycl::vec` type, `sycl::half` type, or POD type.
957-
* HintT must also have the same size as DataT.
958-
* @tparam CoordT The input coordinate type. e.g. int, int2, or int3 for
959-
* 1D, 2D, and 3D, respectively
960-
* @param imageHandle The image handle
961-
* @param coords The coordinates at which to fetch image data
962-
* @return Image data
963-
*
964-
* __NVPTX__: Name mangling info
965-
* Cuda surfaces require integer coords (by bytes)
966-
* Cuda textures require float coords (by element or normalized)
967-
* for sampling, and integer coords (by bytes) for fetching
968-
* The name mangling should therefore not interfere with one
969-
* another
970-
*/
971-
template <typename DataT, typename HintT = DataT, typename CoordT>
972-
__SYCL_DEPRECATED("read_image for standard unsampled images is deprecated. "
973-
"Instead use fetch_image.")
974-
DataT read_image(const unsampled_image_handle &imageHandle [[maybe_unused]],
975-
const CoordT &coords [[maybe_unused]]) {
976-
return fetch_image<DataT>(imageHandle, coords);
977-
}
978-
979848
/**
980849
* @brief Fetch data from a sampled image using its handle
981850
*
@@ -1080,41 +949,6 @@ DataT sample_image(const sampled_image_handle &imageHandle [[maybe_unused]],
1080949
#endif
1081950
}
1082951

1083-
/**
1084-
* @brief [Deprecated] Read a sampled image using its handle
1085-
*
1086-
* @tparam DataT The return type
1087-
* @tparam HintT A hint type that can be used to select for a specialized
1088-
* backend intrinsic when a user-defined type is passed as `DataT`.
1089-
* HintT should be a `sycl::vec` type, `sycl::half` type, or POD type.
1090-
* HintT must also have the same size as DataT.
1091-
* @tparam CoordT The input coordinate type. e.g. float, float2, or float3 for
1092-
* 1D, 2D, and 3D, respectively
1093-
* @param imageHandle The image handle
1094-
* @param coords The coordinates at which to sample image data
1095-
* @return Sampled image data
1096-
*
1097-
* __NVPTX__: Name mangling info
1098-
* Cuda surfaces require integer coords (by bytes)
1099-
* Cuda textures require float coords (by element or normalized)
1100-
* for sampling, and integer coords (by bytes) for fetching
1101-
* The name mangling should therefore not interfere with one
1102-
* another
1103-
*/
1104-
template <typename DataT, typename HintT = DataT, typename CoordT>
1105-
__SYCL_DEPRECATED("read_image for standard sampled images is deprecated. "
1106-
"Instead use sample_image with floating point coordinates or "
1107-
"fetch_image with integer coordinates.")
1108-
DataT read_image(const sampled_image_handle &imageHandle [[maybe_unused]],
1109-
const CoordT &coords [[maybe_unused]]) {
1110-
detail::assert_coords_type<CoordT>();
1111-
if constexpr (detail::are_floating_coords<CoordT>()) {
1112-
return sample_image<DataT>(imageHandle, coords);
1113-
} else if constexpr (detail::are_integer_coords<CoordT>()) {
1114-
return fetch_image<DataT>(imageHandle, coords);
1115-
}
1116-
}
1117-
1118952
/**
1119953
* @brief Sample a mipmap image using its handle with LOD filtering
1120954
*
@@ -1207,110 +1041,6 @@ DataT sample_mipmap(const sampled_image_handle &imageHandle [[maybe_unused]],
12071041
#endif
12081042
}
12091043

1210-
/**
1211-
* @brief [Deprecated] Read a mipmap image using its handle with LOD
1212-
* filtering
1213-
*
1214-
* @tparam DataT The return type
1215-
* @tparam HintT A hint type that can be used to select for a specialized
1216-
* backend intrinsic when a user-defined type is passed as `DataT`.
1217-
* HintT should be a `sycl::vec` type, `sycl::half` type, or POD type.
1218-
* HintT must also have the same size as DataT.
1219-
* @tparam CoordT The input coordinate type. e.g. float, float2, or float3 for
1220-
* 1D, 2D, and 3D, respectively
1221-
* @param imageHandle The mipmap image handle
1222-
* @param coords The coordinates at which to sample mipmap image data
1223-
* @param level The mipmap level at which to sample
1224-
* @return Mipmap image data with LOD filtering
1225-
*/
1226-
template <typename DataT, typename HintT = DataT, typename CoordT>
1227-
__SYCL_DEPRECATED("read_mipmap has been deprecated. "
1228-
"Instead use sample_mipmap.")
1229-
DataT read_mipmap(const sampled_image_handle &imageHandle [[maybe_unused]],
1230-
const CoordT &coords [[maybe_unused]],
1231-
const float level [[maybe_unused]]) {
1232-
return sample_mipmap<DataT>(imageHandle, coords, level);
1233-
}
1234-
1235-
/**
1236-
* @brief [Deprecated] Read a mipmap image using its handle with anisotropic
1237-
* filtering
1238-
*
1239-
* @tparam DataT The return type
1240-
* @tparam HintT A hint type that can be used to select for a specialized
1241-
* backend intrinsic when a user-defined type is passed as `DataT`.
1242-
* HintT should be a `sycl::vec` type, `sycl::half` type, or POD type.
1243-
* HintT must also have the same size as DataT.
1244-
* @tparam CoordT The input coordinate type. e.g. float, float2, or float3 for
1245-
* 1D, 2D, and 3D, respectively
1246-
* @param imageHandle The mipmap image handle
1247-
* @param coords The coordinates at which to sample mipmap image data
1248-
* @param dX Screen space gradient in the x dimension
1249-
* @param dY Screen space gradient in the y dimension
1250-
* @return Mipmap image data with anisotropic filtering
1251-
*/
1252-
template <typename DataT, typename HintT = DataT, typename CoordT>
1253-
__SYCL_DEPRECATED("read_mipmap has been deprecated. "
1254-
"Instead use sample_mipmap.")
1255-
DataT read_mipmap(const sampled_image_handle &imageHandle [[maybe_unused]],
1256-
const CoordT &coords [[maybe_unused]],
1257-
const CoordT &dX [[maybe_unused]],
1258-
const CoordT &dY [[maybe_unused]]) {
1259-
return sample_mipmap<DataT>(imageHandle, coords, dX, dY);
1260-
}
1261-
1262-
/**
1263-
* @brief [Deprecated] Read a mipmap image using its handle with LOD
1264-
* filtering
1265-
*
1266-
* @tparam DataT The return type
1267-
* @tparam HintT A hint type that can be used to select for a specialized
1268-
* backend intrinsic when a user-defined type is passed as `DataT`.
1269-
* HintT should be a `sycl::vec` type, `sycl::half` type, or POD type.
1270-
* HintT must also have the same size as DataT.
1271-
* @tparam CoordT The input coordinate type. e.g. float, float2, or float3 for
1272-
* 1D, 2D, and 3D, respectively
1273-
* @param imageHandle The mipmap image handle
1274-
* @param coords The coordinates at which to sample mipmap image data
1275-
* @param level The mipmap level at which to sample
1276-
* @return Mipmap image data with LOD filtering
1277-
*/
1278-
template <typename DataT, typename HintT = DataT, typename CoordT>
1279-
__SYCL_DEPRECATED("read_image for mipmaps is deprecated. "
1280-
"Instead use sample_mipmap.")
1281-
DataT read_image(const sampled_image_handle &imageHandle [[maybe_unused]],
1282-
const CoordT &coords [[maybe_unused]],
1283-
const float level [[maybe_unused]]) {
1284-
return sample_mipmap<DataT>(imageHandle, coords, level);
1285-
}
1286-
1287-
/**
1288-
* @brief [Deprecated] Read a mipmap image using its handle with anisotropic
1289-
* filtering
1290-
*
1291-
* @tparam DataT The return type
1292-
* @tparam HintT A hint type that can be used to select for a specialized
1293-
* backend intrinsic when a user-defined type is passed as `DataT`.
1294-
* HintT should be a `sycl::vec` type, `sycl::half` type, or POD type.
1295-
* HintT must also have the same size as DataT.
1296-
* @tparam CoordT The input coordinate type. e.g. float, float2, or float3 for
1297-
* 1D, 2D, and 3D, respectively
1298-
* @param imageHandle The mipmap image handle
1299-
* @param coords The coordinates at which to fetch mipmap image data
1300-
* @param dX Screen space gradient in the x dimension
1301-
* @param dY Screen space gradient in the y dimension
1302-
* @return Mipmap image data with anisotropic filtering
1303-
*/
1304-
template <typename DataT, typename HintT = DataT, typename CoordT>
1305-
__SYCL_DEPRECATED("read_image for mipmaps is deprecated. "
1306-
"Instead use sample_mipmap.")
1307-
DataT read_image(const sampled_image_handle &imageHandle [[maybe_unused]],
1308-
const CoordT &coords [[maybe_unused]],
1309-
const CoordT &dX [[maybe_unused]],
1310-
const CoordT &dY [[maybe_unused]]) {
1311-
return sample_mipmap<DataT>(imageHandle, coords, dX, dY);
1312-
}
1313-
13141044
/**
13151045
* @brief Fetch data from an unsampled image array using its handle
13161046
*

0 commit comments

Comments
 (0)