diff --git a/sycl/include/CL/sycl/detail/clusm.hpp b/sycl/include/CL/sycl/detail/clusm.hpp deleted file mode 100644 index 263b871852760..0000000000000 --- a/sycl/include/CL/sycl/detail/clusm.hpp +++ /dev/null @@ -1,100 +0,0 @@ -//==---------------- clusm.hpp - SYCL USM for CL Utils ---------*- C++ -*---==// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -// ===--------------------------------------------------------------------=== // - -#pragma once - -#include -#include -#include -#include - -#include -#include -#include - -__SYCL_INLINE_NAMESPACE(cl) { -namespace sycl { -namespace detail { -namespace usm { - -class CLUSM { -public: - CLUSM() = default; - ~CLUSM() = default; - - void *hostMemAlloc(cl_context context, cl_mem_properties_intel *properties, - size_t size, cl_uint alignment, cl_int *errcode_ret); - void *deviceMemAlloc(cl_context context, cl_device_id device, - cl_mem_properties_intel *properties, size_t size, - cl_uint alignment, cl_int *errcode_ret); - void *sharedMemAlloc(cl_context context, cl_device_id device, - cl_mem_properties_intel *properties, size_t size, - cl_uint alignment, cl_int *errcode_ret); - - cl_int memFree(cl_context context, const void *ptr); - - cl_int getMemAllocInfoINTEL(cl_context context, const void *ptr, - cl_mem_info_intel param_name, - size_t param_value_size, void *param_value, - size_t *param_value_size_ret); - - cl_int setKernelExecInfo(cl_kernel kernel, cl_kernel_exec_info param_name, - size_t param_value_size, const void *param_value); - - cl_int setKernelIndirectUSMExecInfo(cl_command_queue queue, cl_kernel kernel); - - template - cl_int writeParamToMemory(size_t param_value_size, T param, - size_t *param_value_size_ret, T *pointer) const; - -private: - std::mutex mLock; - - struct SUSMAllocInfo { - SUSMAllocInfo() = default; - - cl_unified_shared_memory_type_intel Type = CL_MEM_TYPE_UNKNOWN_INTEL; - const void *BaseAddress = nullptr; - size_t Size = 0; - size_t Alignment = 0; - }; - - using CUSMAllocMap = std::map; - using CUSMAllocVector = std::vector; - - struct SUSMContextInfo { - CUSMAllocMap AllocMap; - - CUSMAllocVector HostAllocVector; - // TODO: Support multiple devices by mapping device-> vector? - CUSMAllocVector DeviceAllocVector; - CUSMAllocVector SharedAllocVector; - }; - - // TODO: Support multiple contexts by mapping context -> USMContextInfo? - SUSMContextInfo mUSMContextInfo; - - struct SUSMKernelInfo { - SUSMKernelInfo() = default; - - bool IndirectHostAccess = false; - bool IndirectDeviceAccess = false; - bool IndirectSharedAccess = false; - - std::vector SVMPtrs; - }; - - typedef std::map CUSMKernelInfoMap; - - CUSMKernelInfoMap mUSMKernelInfoMap; -}; - -} // namespace usm -} // namespace detail -} // namespace sycl -} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/context_impl.cpp b/sycl/source/detail/context_impl.cpp index 669d047aae730..8353396e7792d 100644 --- a/sycl/source/detail/context_impl.cpp +++ b/sycl/source/detail/context_impl.cpp @@ -6,7 +6,6 @@ // // ===--------------------------------------------------------------------=== // -#include #include #include #include diff --git a/sycl/source/detail/queue_impl.cpp b/sycl/source/detail/queue_impl.cpp index 0758519720fff..ccaab363c64b5 100644 --- a/sycl/source/detail/queue_impl.cpp +++ b/sycl/source/detail/queue_impl.cpp @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #include #include #include diff --git a/sycl/source/detail/scheduler/commands.cpp b/sycl/source/detail/scheduler/commands.cpp index 0ba4d01462b7e..5664ca1ad25e0 100644 --- a/sycl/source/detail/scheduler/commands.cpp +++ b/sycl/source/detail/scheduler/commands.cpp @@ -10,7 +10,6 @@ #include "CL/sycl/access/access.hpp" #include -#include #include #include #include