Skip to content

[SYCL][Bindless][ABI-Break] Remove deprecated functions and structs #14555

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions sycl/include/sycl/detail/pi.def
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,9 @@ _PI_API(piextMemMipmapGetLevel)
_PI_API(piextMemMipmapFree)

// Interop
_PI_API(piextMemImportOpaqueFD)
_PI_API(piextImportExternalMemory)
_PI_API(piextMemReleaseInterop)
_PI_API(piextMemMapExternalArray)
_PI_API(piextImportExternalSemaphoreOpaqueFD)
_PI_API(piextImportExternalSemaphore)
_PI_API(piextDestroyExternalSemaphore)
_PI_API(piextWaitExternalSemaphore)
Expand Down
40 changes: 4 additions & 36 deletions sycl/include/sycl/detail/pi.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,11 @@
// (piextEnqueueKernelLaunchCustom)
// 17.58 Added context parameter to piextMemImageGetInfo
// 17.59 Added const-qualifier to src_ptr in piextMemImageCopy.
// 18.60 Remove deprecated functions piextMemImportOpaqueFD and
// piextImportExternalSemaphoreOpaqueFD

#define _PI_H_VERSION_MAJOR 17
#define _PI_H_VERSION_MINOR 59
#define _PI_H_VERSION_MAJOR 18
#define _PI_H_VERSION_MINOR 60

#define _PI_STRING_HELPER(a) #a
#define _PI_CONCAT(a, b) _PI_STRING_HELPER(a.b)
Expand Down Expand Up @@ -3115,23 +3117,6 @@ __SYCL_EXPORT pi_result piextMemImageGetInfo(pi_context context,
void *param_value,
size_t *param_value_size_ret);

/// [DEPRECATED] This function is deprecated in favor of
/// `piextImportExternalMemory`
///
/// API to import external memory in the form of a file descriptor.
///
/// \param context is the pi_context
/// \param device is the pi_device
/// \param size is the size of the external memory
/// \param file_descriptor is the file descriptor
/// \param ret_handle is the returned interop memory handle to the external
/// memory
__SYCL_EXPORT_DEPRECATED("This function has been deprecated in favor of "
"`piextImportExternalMemory`")
pi_result piextMemImportOpaqueFD(pi_context context, pi_device device,
size_t size, int file_descriptor,
pi_interop_mem_handle *ret_handle);

/// API to import external memory
///
/// \param context is the pi_context
Expand Down Expand Up @@ -3166,23 +3151,6 @@ __SYCL_EXPORT pi_result piextMemMapExternalArray(
__SYCL_EXPORT pi_result piextMemReleaseInterop(
pi_context context, pi_device device, pi_interop_mem_handle memory_handle);

/// [DEPRECATED] This function is deprecated in favor of
/// `piextImportExternalSemaphore`
///
/// API to import an external semaphore in the form of a file descriptor.
///
/// \param context is the pi_context
/// \param device is the pi_device
/// \param file_descriptor is the file descriptor
/// \param ret_handle is the returned interop semaphore handle to the external
/// semaphore
__SYCL_EXPORT_DEPRECATED("This function has been deprecated in favor of "
"`piextImportExternalSemaphore`")
pi_result
piextImportExternalSemaphoreOpaqueFD(pi_context context, pi_device device,
int file_descriptor,
pi_interop_semaphore_handle *ret_handle);

/// API to import an external semaphore
///
/// \param context is the pi_context
Expand Down
276 changes: 3 additions & 273 deletions sycl/include/sycl/ext/oneapi/bindless_images.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,28 +77,6 @@ alloc_image_mem(const image_descriptor &desc, const sycl::device &syclDevice,
__SYCL_EXPORT image_mem_handle alloc_image_mem(const image_descriptor &desc,
const sycl::queue &syclQueue);

/**
* @brief [Deprecated] Free image memory
*
* @param handle Memory handle to allocated memory on the device
* @param syclDevice The device in which we create our memory handle
* @param syclContext The context in which we created our memory handle
*/
__SYCL_EXPORT_DEPRECATED("Distinct image frees are deprecated. "
"Instead use overload that accepts image_type.")
void free_image_mem(image_mem_handle handle, const sycl::device &syclDevice,
const sycl::context &syclContext);

/**
* @brief [Deprecated] Free image memory
*
* @param handle Memory handle to allocated memory on the device
* @param syclQueue The queue in which we create our memory handle
*/
__SYCL_EXPORT_DEPRECATED("Distinct image frees are deprecated. "
"Instead use overload that accepts image_type.")
void free_image_mem(image_mem_handle handle, const sycl::queue &syclQueue);

/**
* @brief Free image memory
*
Expand All @@ -121,56 +99,6 @@ __SYCL_EXPORT void free_image_mem(image_mem_handle handle, image_type imageType,
__SYCL_EXPORT void free_image_mem(image_mem_handle handle, image_type imageType,
const sycl::queue &syclQueue);

/**
* @brief [Deprecated] Allocate mipmap memory based on image_descriptor
*
* @param desc The image descriptor
* @param syclDevice The device in which we create our memory handle
* @param syclContext The context in which we create our memory handle
* @return Memory handle to allocated memory on the device
*/
__SYCL_EXPORT_DEPRECATED("Distinct mipmap allocs are deprecated. "
"Instead use alloc_image_mem().")
image_mem_handle alloc_mipmap_mem(const image_descriptor &desc,
const sycl::device &syclDevice,
const sycl::context &syclContext);

/**
* @brief [Deprecated] Allocate mipmap memory based on image_descriptor
*
* @param desc The image descriptor
* @param syclQueue The queue in which we create our memory handle
* @return Memory handle to allocated memory on the device
*/
__SYCL_EXPORT_DEPRECATED("Distinct mipmap allocs are deprecated. "
"Instead use alloc_image_mem().")
image_mem_handle alloc_mipmap_mem(const image_descriptor &desc,
const sycl::device &syclQueue);

/**
* @brief [Deprecated] Free mipmap memory
*
* @param handle The mipmap memory handle
* @param syclDevice The device in which we created our memory handle
* @param syclContext The context in which we created our memory handle
*/
__SYCL_EXPORT_DEPRECATED(
"Distinct mipmap frees are deprecated. "
"Instead use free_image_mem() that accepts image_type.")
void free_mipmap_mem(image_mem_handle handle, const sycl::device &syclDevice,
const sycl::context &syclContext);

/**
* @brief [Deprecated] Free mipmap memory
*
* @param handle The mipmap memory handle
* @param syclQueue The queue in which we created our memory handle
*/
__SYCL_EXPORT_DEPRECATED(
"Distinct mipmap frees are deprecated. "
"Instead use free_image_mem() that accepts image_type.")
void free_mipmap_mem(image_mem_handle handle, const sycl::queue &syclQueue);

/**
* @brief Retrieve the memory handle to an individual mipmap image
*
Expand Down Expand Up @@ -229,38 +157,6 @@ __SYCL_EXPORT interop_mem_handle import_external_memory(
external_mem_descriptor<ExternalMemHandleType> externalMem,
const sycl::queue &syclQueue);

/**
* @brief [Deprecated] Maps an interop memory handle to an image memory
* handle (which may have a device optimized memory layout)
*
* @param memHandle Interop memory handle
* @param desc The image descriptor
* @param syclDevice The device in which we create our image memory handle
* @param syclContext The conext in which we create our image memory handle
* @return Memory handle to externally allocated memory on the device
*/
__SYCL_EXPORT_DEPRECATED("map_external_memory_array is deprecated."
"use map_external_image_memory")
image_mem_handle map_external_memory_array(interop_mem_handle memHandle,
const image_descriptor &desc,
const sycl::device &syclDevice,
const sycl::context &syclContext);

/**
* @brief [Deprecated] Maps an interop memory handle to an image memory
* handle (which may have a device optimized memory layout)
*
* @param memHandle Interop memory handle
* @param desc The image descriptor
* @param syclQueue The queue in which we create our image memory handle
* @return Memory handle to externally allocated memory on the device
*/
__SYCL_EXPORT_DEPRECATED("map_external_memory_array is deprecated."
"use map_external_image_memory")
image_mem_handle map_external_memory_array(interop_mem_handle memHandle,
const image_descriptor &desc,
const sycl::queue &syclQueue);

/**
* @brief Maps an interop memory handle to an image memory handle (which may
* have a device optimized memory layout)
Expand Down Expand Up @@ -686,7 +582,9 @@ get_image_num_channels(const image_mem_handle memHandle,
namespace detail {

// is sycl::vec
template <typename T> struct is_vec { static constexpr bool value = false; };
template <typename T> struct is_vec {
static constexpr bool value = false;
};
template <typename T, int N> struct is_vec<sycl::vec<T, N>> {
static constexpr bool value = true;
};
Expand Down Expand Up @@ -947,35 +845,6 @@ DataT fetch_image(const unsampled_image_handle &imageHandle [[maybe_unused]],
#endif
}

/**
* @brief [Deprecated] Read an unsampled image using its handle
*
* @tparam DataT The return type
* @tparam HintT A hint type that can be used to select for a specialized
* backend intrinsic when a user-defined type is passed as `DataT`.
* HintT should be a `sycl::vec` type, `sycl::half` type, or POD type.
* HintT must also have the same size as DataT.
* @tparam CoordT The input coordinate type. e.g. int, int2, or int3 for
* 1D, 2D, and 3D, respectively
* @param imageHandle The image handle
* @param coords The coordinates at which to fetch image data
* @return Image data
*
* __NVPTX__: Name mangling info
* Cuda surfaces require integer coords (by bytes)
* Cuda textures require float coords (by element or normalized)
* for sampling, and integer coords (by bytes) for fetching
* The name mangling should therefore not interfere with one
* another
*/
template <typename DataT, typename HintT = DataT, typename CoordT>
__SYCL_DEPRECATED("read_image for standard unsampled images is deprecated. "
"Instead use fetch_image.")
DataT read_image(const unsampled_image_handle &imageHandle [[maybe_unused]],
const CoordT &coords [[maybe_unused]]) {
return fetch_image<DataT>(imageHandle, coords);
}

/**
* @brief Fetch data from a sampled image using its handle
*
Expand Down Expand Up @@ -1080,41 +949,6 @@ DataT sample_image(const sampled_image_handle &imageHandle [[maybe_unused]],
#endif
}

/**
* @brief [Deprecated] Read a sampled image using its handle
*
* @tparam DataT The return type
* @tparam HintT A hint type that can be used to select for a specialized
* backend intrinsic when a user-defined type is passed as `DataT`.
* HintT should be a `sycl::vec` type, `sycl::half` type, or POD type.
* HintT must also have the same size as DataT.
* @tparam CoordT The input coordinate type. e.g. float, float2, or float3 for
* 1D, 2D, and 3D, respectively
* @param imageHandle The image handle
* @param coords The coordinates at which to sample image data
* @return Sampled image data
*
* __NVPTX__: Name mangling info
* Cuda surfaces require integer coords (by bytes)
* Cuda textures require float coords (by element or normalized)
* for sampling, and integer coords (by bytes) for fetching
* The name mangling should therefore not interfere with one
* another
*/
template <typename DataT, typename HintT = DataT, typename CoordT>
__SYCL_DEPRECATED("read_image for standard sampled images is deprecated. "
"Instead use sample_image with floating point coordinates or "
"fetch_image with integer coordinates.")
DataT read_image(const sampled_image_handle &imageHandle [[maybe_unused]],
const CoordT &coords [[maybe_unused]]) {
detail::assert_coords_type<CoordT>();
if constexpr (detail::are_floating_coords<CoordT>()) {
return sample_image<DataT>(imageHandle, coords);
} else if constexpr (detail::are_integer_coords<CoordT>()) {
return fetch_image<DataT>(imageHandle, coords);
}
}

/**
* @brief Sample a mipmap image using its handle with LOD filtering
*
Expand Down Expand Up @@ -1207,110 +1041,6 @@ DataT sample_mipmap(const sampled_image_handle &imageHandle [[maybe_unused]],
#endif
}

/**
* @brief [Deprecated] Read a mipmap image using its handle with LOD
* filtering
*
* @tparam DataT The return type
* @tparam HintT A hint type that can be used to select for a specialized
* backend intrinsic when a user-defined type is passed as `DataT`.
* HintT should be a `sycl::vec` type, `sycl::half` type, or POD type.
* HintT must also have the same size as DataT.
* @tparam CoordT The input coordinate type. e.g. float, float2, or float3 for
* 1D, 2D, and 3D, respectively
* @param imageHandle The mipmap image handle
* @param coords The coordinates at which to sample mipmap image data
* @param level The mipmap level at which to sample
* @return Mipmap image data with LOD filtering
*/
template <typename DataT, typename HintT = DataT, typename CoordT>
__SYCL_DEPRECATED("read_mipmap has been deprecated. "
"Instead use sample_mipmap.")
DataT read_mipmap(const sampled_image_handle &imageHandle [[maybe_unused]],
const CoordT &coords [[maybe_unused]],
const float level [[maybe_unused]]) {
return sample_mipmap<DataT>(imageHandle, coords, level);
}

/**
* @brief [Deprecated] Read a mipmap image using its handle with anisotropic
* filtering
*
* @tparam DataT The return type
* @tparam HintT A hint type that can be used to select for a specialized
* backend intrinsic when a user-defined type is passed as `DataT`.
* HintT should be a `sycl::vec` type, `sycl::half` type, or POD type.
* HintT must also have the same size as DataT.
* @tparam CoordT The input coordinate type. e.g. float, float2, or float3 for
* 1D, 2D, and 3D, respectively
* @param imageHandle The mipmap image handle
* @param coords The coordinates at which to sample mipmap image data
* @param dX Screen space gradient in the x dimension
* @param dY Screen space gradient in the y dimension
* @return Mipmap image data with anisotropic filtering
*/
template <typename DataT, typename HintT = DataT, typename CoordT>
__SYCL_DEPRECATED("read_mipmap has been deprecated. "
"Instead use sample_mipmap.")
DataT read_mipmap(const sampled_image_handle &imageHandle [[maybe_unused]],
const CoordT &coords [[maybe_unused]],
const CoordT &dX [[maybe_unused]],
const CoordT &dY [[maybe_unused]]) {
return sample_mipmap<DataT>(imageHandle, coords, dX, dY);
}

/**
* @brief [Deprecated] Read a mipmap image using its handle with LOD
* filtering
*
* @tparam DataT The return type
* @tparam HintT A hint type that can be used to select for a specialized
* backend intrinsic when a user-defined type is passed as `DataT`.
* HintT should be a `sycl::vec` type, `sycl::half` type, or POD type.
* HintT must also have the same size as DataT.
* @tparam CoordT The input coordinate type. e.g. float, float2, or float3 for
* 1D, 2D, and 3D, respectively
* @param imageHandle The mipmap image handle
* @param coords The coordinates at which to sample mipmap image data
* @param level The mipmap level at which to sample
* @return Mipmap image data with LOD filtering
*/
template <typename DataT, typename HintT = DataT, typename CoordT>
__SYCL_DEPRECATED("read_image for mipmaps is deprecated. "
"Instead use sample_mipmap.")
DataT read_image(const sampled_image_handle &imageHandle [[maybe_unused]],
const CoordT &coords [[maybe_unused]],
const float level [[maybe_unused]]) {
return sample_mipmap<DataT>(imageHandle, coords, level);
}

/**
* @brief [Deprecated] Read a mipmap image using its handle with anisotropic
* filtering
*
* @tparam DataT The return type
* @tparam HintT A hint type that can be used to select for a specialized
* backend intrinsic when a user-defined type is passed as `DataT`.
* HintT should be a `sycl::vec` type, `sycl::half` type, or POD type.
* HintT must also have the same size as DataT.
* @tparam CoordT The input coordinate type. e.g. float, float2, or float3 for
* 1D, 2D, and 3D, respectively
* @param imageHandle The mipmap image handle
* @param coords The coordinates at which to fetch mipmap image data
* @param dX Screen space gradient in the x dimension
* @param dY Screen space gradient in the y dimension
* @return Mipmap image data with anisotropic filtering
*/
template <typename DataT, typename HintT = DataT, typename CoordT>
__SYCL_DEPRECATED("read_image for mipmaps is deprecated. "
"Instead use sample_mipmap.")
DataT read_image(const sampled_image_handle &imageHandle [[maybe_unused]],
const CoordT &coords [[maybe_unused]],
const CoordT &dX [[maybe_unused]],
const CoordT &dY [[maybe_unused]]) {
return sample_mipmap<DataT>(imageHandle, coords, dX, dY);
}

/**
* @brief Fetch data from an unsampled image array using its handle
*
Expand Down
Loading
Loading