diff --git a/sycl/include/sycl/detail/pi.hpp b/sycl/include/sycl/detail/pi.hpp index 01f7cb621e6b7..ebd2eedaf4ea0 100644 --- a/sycl/include/sycl/detail/pi.hpp +++ b/sycl/include/sycl/detail/pi.hpp @@ -275,9 +275,6 @@ template To cast(std::vector Values) { } // namespace pi } // namespace detail -// For shortness of using PI from the top-level sycl files. -namespace RT = sycl::detail::pi; - } // __SYCL_INLINE_VER_NAMESPACE(_V1) } // namespace sycl diff --git a/sycl/include/sycl/handler.hpp b/sycl/include/sycl/handler.hpp index c37b05ee51ef8..86313cf734dae 100644 --- a/sycl/include/sycl/handler.hpp +++ b/sycl/include/sycl/handler.hpp @@ -3199,7 +3199,7 @@ class __SYCL_EXPORT handler { } // Set value of the gpu cache configuration for the kernel. - void setKernelCacheConfig(RT::PiKernelCacheConfig); + void setKernelCacheConfig(sycl::detail::pi::PiKernelCacheConfig); }; } // __SYCL_INLINE_VER_NAMESPACE(_V1) } // namespace sycl diff --git a/sycl/source/context.cpp b/sycl/source/context.cpp index d911d057f609c..4923621a95251 100644 --- a/sycl/source/context.cpp +++ b/sycl/source/context.cpp @@ -85,7 +85,7 @@ context::context(const std::vector &DeviceList, } } context::context(cl_context ClContext, async_handler AsyncHandler) { - const auto &Plugin = RT::getPlugin(); + const auto &Plugin = sycl::detail::pi::getPlugin(); impl = std::make_shared( detail::pi::cast(ClContext), AsyncHandler, Plugin); } diff --git a/sycl/source/detail/usm/usm_impl.cpp b/sycl/source/detail/usm/usm_impl.cpp index 49f4d69294724..70acfc07a8c98 100644 --- a/sycl/source/detail/usm/usm_impl.cpp +++ b/sycl/source/detail/usm/usm_impl.cpp @@ -589,7 +589,7 @@ alloc get_pointer_type(const void *Ptr, const context &Ctxt) { // query type using PI function const detail::PluginPtr &Plugin = CtxImpl->getPlugin(); - RT::PiResult Err = + sycl::detail::pi::PiResult Err = Plugin->call_nocheck( PICtx, Ptr, PI_MEM_ALLOC_TYPE, sizeof(pi_usm_type), &AllocTy, nullptr); diff --git a/sycl/source/event.cpp b/sycl/source/event.cpp index 8a7033fc8b307..a4b2370e97a63 100644 --- a/sycl/source/event.cpp +++ b/sycl/source/event.cpp @@ -27,11 +27,11 @@ event::event() : impl(std::make_shared(std::nullopt)) {} event::event(cl_event ClEvent, const context &SyclContext) : impl(std::make_shared( - detail::pi::cast(ClEvent), SyclContext)) { + detail::pi::cast(ClEvent), SyclContext)) { // This is a special interop constructor for OpenCL, so the event must be // retained. impl->getPlugin()->call( - detail::pi::cast(ClEvent)); + detail::pi::cast(ClEvent)); } bool event::operator==(const event &rhs) const { return rhs.impl == impl; } diff --git a/sycl/source/handler.cpp b/sycl/source/handler.cpp index bc1956a3f4d91..1704321317d8c 100644 --- a/sycl/source/handler.cpp +++ b/sycl/source/handler.cpp @@ -188,9 +188,9 @@ event handler::finalize() { // this faster path is used to submit kernel bypassing scheduler and // avoiding CommandGroup, Command objects creation. - std::vector RawEvents; + std::vector RawEvents; detail::EventImplPtr NewEvent; - RT::PiEvent *OutEvent = nullptr; + sycl::detail::pi::PiEvent *OutEvent = nullptr; auto EnqueueKernel = [&]() { // 'Result' for single point of return diff --git a/sycl/source/queue.cpp b/sycl/source/queue.cpp index 1a814fed67c43..90bc1bf3d3a06 100644 --- a/sycl/source/queue.cpp +++ b/sycl/source/queue.cpp @@ -66,7 +66,7 @@ queue::queue(cl_command_queue clQueue, const context &SyclContext, const async_handler &AsyncHandler) { const property_list PropList{}; impl = std::make_shared( - reinterpret_cast(clQueue), + reinterpret_cast(clQueue), detail::getSyclObjImpl(SyclContext), AsyncHandler, PropList); } diff --git a/sycl/unittests/kernel-and-program/KernelInfo.cpp b/sycl/unittests/kernel-and-program/KernelInfo.cpp index 98bb1f0e0f667..a5b406ba469c5 100644 --- a/sycl/unittests/kernel-and-program/KernelInfo.cpp +++ b/sycl/unittests/kernel-and-program/KernelInfo.cpp @@ -45,8 +45,8 @@ static pi_result redefinedKernelGetInfo(pi_kernel kernel, size_t *param_value_size_ret) { EXPECT_EQ(param_name, PI_KERNEL_INFO_CONTEXT) << "Unexpected kernel info requested"; - auto *Result = reinterpret_cast(param_value); - RT::PiContext PiCtx = + auto *Result = reinterpret_cast(param_value); + sycl::detail::pi::PiContext PiCtx = detail::getSyclObjImpl(TestContext->Ctx)->getHandleRef(); *Result = PiCtx; return PI_SUCCESS; diff --git a/sycl/unittests/kernel-and-program/KernelRelease.cpp b/sycl/unittests/kernel-and-program/KernelRelease.cpp index b6f616c34461e..a982772db573c 100644 --- a/sycl/unittests/kernel-and-program/KernelRelease.cpp +++ b/sycl/unittests/kernel-and-program/KernelRelease.cpp @@ -53,8 +53,8 @@ static pi_result redefinedKernelGetInfo(pi_kernel kernel, size_t *param_value_size_ret) { EXPECT_EQ(param_name, PI_KERNEL_INFO_CONTEXT) << "Unexpected kernel info requested"; - auto *Result = reinterpret_cast(param_value); - RT::PiContext PiCtx = + auto *Result = reinterpret_cast(param_value); + sycl::detail::pi::PiContext PiCtx = detail::getSyclObjImpl(TestContext->Ctx)->getHandleRef(); *Result = PiCtx; return PI_SUCCESS; diff --git a/sycl/unittests/kernel-and-program/PersistentDeviceCodeCache.cpp b/sycl/unittests/kernel-and-program/PersistentDeviceCodeCache.cpp index 8c418c0e692cb..6ee9f5658bdbc 100644 --- a/sycl/unittests/kernel-and-program/PersistentDeviceCodeCache.cpp +++ b/sycl/unittests/kernel-and-program/PersistentDeviceCodeCache.cpp @@ -236,7 +236,7 @@ class PersistentDeviceCodeCache /*PropertySetsEnd*/ nullptr}; pi_device_binary Bin = &BinStruct; detail::RTDeviceBinaryImage Img{Bin}; - RT::PiProgram NativeProg; + sycl::detail::pi::PiProgram NativeProg; }; /* Checks that key values with \0 symbols are processed correctly diff --git a/sycl/unittests/scheduler/Commands.cpp b/sycl/unittests/scheduler/Commands.cpp index aa9c750d85f55..a995800643421 100644 --- a/sycl/unittests/scheduler/Commands.cpp +++ b/sycl/unittests/scheduler/Commands.cpp @@ -26,11 +26,12 @@ pi_result redefinePiEnqueueEventsWaitWithBarrier(pi_queue Queue, } // Hack that allows to return a context in redefinePiEventGetInfo -RT::PiContext queue_global_context = nullptr; +sycl::detail::pi::PiContext queue_global_context = nullptr; pi_result redefinePiEventGetInfo(pi_event, pi_event_info, size_t, void *param_value, size_t *) { - *reinterpret_cast(param_value) = queue_global_context; + *reinterpret_cast(param_value) = + queue_global_context; return PI_SUCCESS; }