Skip to content

Commit b3e0428

Browse files
[SYCL] Non-standard RT namespace removed(#7133) (#9837)
1 parent a055665 commit b3e0428

File tree

11 files changed

+16
-18
lines changed

11 files changed

+16
-18
lines changed

sycl/include/sycl/detail/pi.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,6 @@ template <class To, class FromE> To cast(std::vector<FromE> Values) {
275275
} // namespace pi
276276
} // namespace detail
277277

278-
// For shortness of using PI from the top-level sycl files.
279-
namespace RT = sycl::detail::pi;
280-
281278
} // __SYCL_INLINE_VER_NAMESPACE(_V1)
282279
} // namespace sycl
283280

sycl/include/sycl/handler.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3199,7 +3199,7 @@ class __SYCL_EXPORT handler {
31993199
}
32003200

32013201
// Set value of the gpu cache configuration for the kernel.
3202-
void setKernelCacheConfig(RT::PiKernelCacheConfig);
3202+
void setKernelCacheConfig(sycl::detail::pi::PiKernelCacheConfig);
32033203
};
32043204
} // __SYCL_INLINE_VER_NAMESPACE(_V1)
32053205
} // namespace sycl

sycl/source/context.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ context::context(const std::vector<device> &DeviceList,
8585
}
8686
}
8787
context::context(cl_context ClContext, async_handler AsyncHandler) {
88-
const auto &Plugin = RT::getPlugin<backend::opencl>();
88+
const auto &Plugin = sycl::detail::pi::getPlugin<backend::opencl>();
8989
impl = std::make_shared<detail::context_impl>(
9090
detail::pi::cast<detail::RT::PiContext>(ClContext), AsyncHandler, Plugin);
9191
}

sycl/source/detail/usm/usm_impl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ alloc get_pointer_type(const void *Ptr, const context &Ctxt) {
589589

590590
// query type using PI function
591591
const detail::PluginPtr &Plugin = CtxImpl->getPlugin();
592-
RT::PiResult Err =
592+
sycl::detail::pi::PiResult Err =
593593
Plugin->call_nocheck<detail::PiApiKind::piextUSMGetMemAllocInfo>(
594594
PICtx, Ptr, PI_MEM_ALLOC_TYPE, sizeof(pi_usm_type), &AllocTy,
595595
nullptr);

sycl/source/event.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ event::event() : impl(std::make_shared<detail::event_impl>(std::nullopt)) {}
2727

2828
event::event(cl_event ClEvent, const context &SyclContext)
2929
: impl(std::make_shared<detail::event_impl>(
30-
detail::pi::cast<RT::PiEvent>(ClEvent), SyclContext)) {
30+
detail::pi::cast<sycl::detail::pi::PiEvent>(ClEvent), SyclContext)) {
3131
// This is a special interop constructor for OpenCL, so the event must be
3232
// retained.
3333
impl->getPlugin()->call<detail::PiApiKind::piEventRetain>(
34-
detail::pi::cast<RT::PiEvent>(ClEvent));
34+
detail::pi::cast<sycl::detail::pi::PiEvent>(ClEvent));
3535
}
3636

3737
bool event::operator==(const event &rhs) const { return rhs.impl == impl; }

sycl/source/handler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,9 @@ event handler::finalize() {
188188
// this faster path is used to submit kernel bypassing scheduler and
189189
// avoiding CommandGroup, Command objects creation.
190190

191-
std::vector<RT::PiEvent> RawEvents;
191+
std::vector<sycl::detail::pi::PiEvent> RawEvents;
192192
detail::EventImplPtr NewEvent;
193-
RT::PiEvent *OutEvent = nullptr;
193+
sycl::detail::pi::PiEvent *OutEvent = nullptr;
194194

195195
auto EnqueueKernel = [&]() {
196196
// 'Result' for single point of return

sycl/source/queue.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ queue::queue(cl_command_queue clQueue, const context &SyclContext,
6666
const async_handler &AsyncHandler) {
6767
const property_list PropList{};
6868
impl = std::make_shared<detail::queue_impl>(
69-
reinterpret_cast<RT::PiQueue>(clQueue),
69+
reinterpret_cast<sycl::detail::pi::PiQueue>(clQueue),
7070
detail::getSyclObjImpl(SyclContext), AsyncHandler, PropList);
7171
}
7272

sycl/unittests/kernel-and-program/KernelInfo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ static pi_result redefinedKernelGetInfo(pi_kernel kernel,
4545
size_t *param_value_size_ret) {
4646
EXPECT_EQ(param_name, PI_KERNEL_INFO_CONTEXT)
4747
<< "Unexpected kernel info requested";
48-
auto *Result = reinterpret_cast<RT::PiContext *>(param_value);
49-
RT::PiContext PiCtx =
48+
auto *Result = reinterpret_cast<sycl::detail::pi::PiContext *>(param_value);
49+
sycl::detail::pi::PiContext PiCtx =
5050
detail::getSyclObjImpl(TestContext->Ctx)->getHandleRef();
5151
*Result = PiCtx;
5252
return PI_SUCCESS;

sycl/unittests/kernel-and-program/KernelRelease.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ static pi_result redefinedKernelGetInfo(pi_kernel kernel,
5353
size_t *param_value_size_ret) {
5454
EXPECT_EQ(param_name, PI_KERNEL_INFO_CONTEXT)
5555
<< "Unexpected kernel info requested";
56-
auto *Result = reinterpret_cast<RT::PiContext *>(param_value);
57-
RT::PiContext PiCtx =
56+
auto *Result = reinterpret_cast<sycl::detail::pi::PiContext *>(param_value);
57+
sycl::detail::pi::PiContext PiCtx =
5858
detail::getSyclObjImpl(TestContext->Ctx)->getHandleRef();
5959
*Result = PiCtx;
6060
return PI_SUCCESS;

sycl/unittests/kernel-and-program/PersistentDeviceCodeCache.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ class PersistentDeviceCodeCache
236236
/*PropertySetsEnd*/ nullptr};
237237
pi_device_binary Bin = &BinStruct;
238238
detail::RTDeviceBinaryImage Img{Bin};
239-
RT::PiProgram NativeProg;
239+
sycl::detail::pi::PiProgram NativeProg;
240240
};
241241

242242
/* Checks that key values with \0 symbols are processed correctly

sycl/unittests/scheduler/Commands.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@ pi_result redefinePiEnqueueEventsWaitWithBarrier(pi_queue Queue,
2626
}
2727

2828
// Hack that allows to return a context in redefinePiEventGetInfo
29-
RT::PiContext queue_global_context = nullptr;
29+
sycl::detail::pi::PiContext queue_global_context = nullptr;
3030

3131
pi_result redefinePiEventGetInfo(pi_event, pi_event_info, size_t,
3232
void *param_value, size_t *) {
33-
*reinterpret_cast<RT::PiContext *>(param_value) = queue_global_context;
33+
*reinterpret_cast<sycl::detail::pi::PiContext *>(param_value) =
34+
queue_global_context;
3435
return PI_SUCCESS;
3536
}
3637

0 commit comments

Comments
 (0)