Skip to content

Removes deprecated DPCTLDevice_GetMaxWorkItemSizes #1359

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 1 commit into from
Aug 21, 2023
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
13 changes: 0 additions & 13 deletions libsyclinterface/include/dpctl_sycl_device_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,19 +233,6 @@ DPCTL_API
__dpctl_keep size_t *
DPCTLDevice_GetMaxWorkItemSizes3d(__dpctl_keep const DPCTLSyclDeviceRef DRef);

/*!
* @brief Wrapper for deprecated get_info<info::device::max_work_item_sizes>().
*
* @param DRef Opaque pointer to a ``sycl::device``
* @return Returns the valid result if device exists else returns NULL.
* @ingroup DeviceInterface
*/
#if __cplusplus || (defined(__GNUC__) && __GNUC__ > 10)
[[deprecated("Use DPCTLDevice_WorkItemSizes3d instead")]]
#endif
DPCTL_API __dpctl_keep size_t *
DPCTLDevice_GetMaxWorkItemSizes(__dpctl_keep const DPCTLSyclDeviceRef DRef);

/*!
* @brief Wrapper for get_info<info::device::max_work_group_size>().
*
Expand Down
6 changes: 0 additions & 6 deletions libsyclinterface/source/dpctl_sycl_device_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,6 @@ DPCTLDevice_GetMaxWorkItemSizes3d(__dpctl_keep const DPCTLSyclDeviceRef DRef)
return DPCTLDevice__GetMaxWorkItemSizes<3>(DRef);
}

__dpctl_keep size_t *
DPCTLDevice_GetMaxWorkItemSizes(__dpctl_keep const DPCTLSyclDeviceRef DRef)
{
return DPCTLDevice__GetMaxWorkItemSizes<3>(DRef);
}

size_t
DPCTLDevice_GetMaxWorkGroupSize(__dpctl_keep const DPCTLSyclDeviceRef DRef)
{
Expand Down
26 changes: 16 additions & 10 deletions libsyclinterface/tests/test_sycl_device_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,6 @@ TEST_P(TestDPCTLSyclDeviceInterface, ChkGetMaxWorkItemSizes3d)
EXPECT_NO_FATAL_FAILURE(DPCTLSize_t_Array_Delete(sizes));
}

TEST_P(TestDPCTLSyclDeviceInterface, ChkGetMaxWorkItemSizes)
{
size_t *sizes = nullptr;
EXPECT_NO_FATAL_FAILURE(sizes = DPCTLDevice_GetMaxWorkItemSizes(DRef));
EXPECT_TRUE(sizes != nullptr);
EXPECT_NO_FATAL_FAILURE(DPCTLSize_t_Array_Delete(sizes));
}

TEST_P(TestDPCTLSyclDeviceInterface, ChkGetMaxWorkGroupSize)
{
size_t n = 0;
Expand Down Expand Up @@ -625,10 +617,24 @@ TEST_F(TestDPCTLSyclDeviceNullArgs, ChkGetMaxWorkItemDims)
ASSERT_TRUE(md == 0);
}

TEST_F(TestDPCTLSyclDeviceNullArgs, ChkGetMaxWorkItemSizes)
TEST_F(TestDPCTLSyclDeviceNullArgs, ChkGetMaxWorkItemSizes1d)
{
size_t *sz = nullptr;
EXPECT_NO_FATAL_FAILURE(sz = DPCTLDevice_GetMaxWorkItemSizes1d(Null_DRef));
ASSERT_TRUE(sz == nullptr);
}

TEST_F(TestDPCTLSyclDeviceNullArgs, ChkGetMaxWorkItemSizes2d)
{
size_t *sz = nullptr;
EXPECT_NO_FATAL_FAILURE(sz = DPCTLDevice_GetMaxWorkItemSizes2d(Null_DRef));
ASSERT_TRUE(sz == nullptr);
}

TEST_F(TestDPCTLSyclDeviceNullArgs, ChkGetMaxWorkItemSizes3d)
{
size_t *sz = nullptr;
EXPECT_NO_FATAL_FAILURE(sz = DPCTLDevice_GetMaxWorkItemSizes(Null_DRef));
EXPECT_NO_FATAL_FAILURE(sz = DPCTLDevice_GetMaxWorkItemSizes3d(Null_DRef));
ASSERT_TRUE(sz == nullptr);
}

Expand Down