Skip to content

Commit 9a0ea9a

Browse files
authored
[SYCL] Remove handler::codeplay_host_task (#4426)
handler::codeplay_host_task is deprecated in SYCL 2020. This patch depends on : Changes in Lit Tests : intel/llvm-test-suite#428 and intel/llvm-test-suite#451 Signed-off-by: mdimakov [email protected]
1 parent ff35d8c commit 9a0ea9a

File tree

6 files changed

+7
-19
lines changed

6 files changed

+7
-19
lines changed

sycl/include/CL/sycl/handler.hpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,18 +1268,6 @@ class __SYCL_EXPORT handler {
12681268
setType(detail::CG::RunOnHostIntel);
12691269
}
12701270

1271-
template <typename FuncT>
1272-
__SYCL2020_DEPRECATED(
1273-
"codeplay_host_task() is deprecated, use host_task() instead")
1274-
detail::enable_if_t<
1275-
detail::check_fn_signature<detail::remove_reference_t<FuncT>,
1276-
void()>::value ||
1277-
detail::check_fn_signature<
1278-
detail::remove_reference_t<FuncT>,
1279-
void(interop_handle)>::value> codeplay_host_task(FuncT Func) {
1280-
host_task_impl(Func);
1281-
}
1282-
12831271
/// Enqueues a command to the SYCL runtime to invoke \p Func once.
12841272
template <typename FuncT>
12851273
detail::enable_if_t<

sycl/include/CL/sycl/queue.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1182,7 +1182,7 @@ event submitAssertCapture(queue &Self, event &Event, queue *SecondaryQueue,
11821182

11831183
auto Acc = Buffer.get_access<mode::read, target::host_buffer>(CGH);
11841184

1185-
CGH.codeplay_host_task([=] {
1185+
CGH.host_task([=] {
11861186
const detail::AssertHappened *AH = &Acc[0];
11871187

11881188
// Don't use assert here as msvc will insert reference to __imp__wassert

sycl/source/detail/scheduler/scheduler_helpers.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void initStream(StreamImplPtr Stream, QueueImplPtr Queue) {
4343
StrBufs->FlushBuf.get_access<access::mode::discard_write,
4444
access::target::host_buffer>(
4545
cgh, range<1>(FlushBufSize), id<1>(0));
46-
cgh.codeplay_host_task([=] {
46+
cgh.host_task([=] {
4747
char *FlushBufPtr = FlushBufAcc.get_pointer();
4848
std::memset(FlushBufPtr, 0, FlushBufAcc.get_size());
4949
});

sycl/source/detail/stream_impl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void stream_impl::flush() {
8585
->second->FlushBuf
8686
.get_access<access::mode::read_write, access::target::host_buffer>(
8787
cgh);
88-
cgh.codeplay_host_task([=] {
88+
cgh.host_task([=] {
8989
printf("%s", BufHostAcc.get_pointer());
9090
fflush(stdout);
9191
});

sycl/unittests/pi/cuda/test_interop_get_native.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ TEST_P(CudaInteropGetNativeTests, hostTaskGetNativeMem) {
8888
buffer<int, 1> syclBuffer(range<1>{1});
8989
syclQueue_->submit([&](handler &cgh) {
9090
auto syclAccessor = syclBuffer.get_access<access::mode::read>(cgh);
91-
cgh.codeplay_host_task([=](interop_handle ih) {
91+
cgh.host_task([=](interop_handle ih) {
9292
CUdeviceptr cudaPtr = ih.get_native_mem<backend::cuda>(syclAccessor);
9393
CUdeviceptr cudaPtrBase;
9494
size_t cudaPtrSize = 0;
@@ -106,7 +106,7 @@ TEST_P(CudaInteropGetNativeTests, hostTaskGetNativeMem) {
106106
TEST_P(CudaInteropGetNativeTests, hostTaskGetNativeQueue) {
107107
CUstream cudaStream = get_native<backend::cuda>(*syclQueue_);
108108
syclQueue_->submit([&](handler &cgh) {
109-
cgh.codeplay_host_task([=](interop_handle ih) {
109+
cgh.host_task([=](interop_handle ih) {
110110
CUstream cudaInteropStream = ih.get_native_queue<backend::cuda>();
111111
ASSERT_EQ(cudaInteropStream, cudaStream);
112112
});
@@ -116,7 +116,7 @@ TEST_P(CudaInteropGetNativeTests, hostTaskGetNativeQueue) {
116116
TEST_P(CudaInteropGetNativeTests, hostTaskGetNativeContext) {
117117
CUcontext cudaContext = get_native<backend::cuda>(syclQueue_->get_context());
118118
syclQueue_->submit([&](handler &cgh) {
119-
cgh.codeplay_host_task([=](interop_handle ih) {
119+
cgh.host_task([=](interop_handle ih) {
120120
CUcontext cudaInteropContext = ih.get_native_context<backend::cuda>();
121121
ASSERT_EQ(cudaInteropContext, cudaContext);
122122
});

sycl/unittests/scheduler/InOrderQueueHostTaskDeps.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ TEST_F(SchedulerTest, InOrderQueueHostTaskDeps) {
106106
InOrderQueue
107107
.submit([&](sycl::handler &CGH) {
108108
CGH.use_kernel_bundle(ExecBundle);
109-
CGH.codeplay_host_task([=] {});
109+
CGH.host_task([=] {});
110110
})
111111
.wait();
112112

0 commit comments

Comments
 (0)