DPC++ Runtime
Runtime libraries for oneAPI DPC++
memory_manager.hpp
Go to the documentation of this file.
1 //==-------------- memory_manager.hpp - SYCL standard header file ----------==//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #pragma once
10 
12 #include <sycl/access/access.hpp>
13 #include <sycl/detail/export.hpp>
14 #include <sycl/id.hpp>
15 #include <sycl/property_list.hpp>
16 #include <sycl/range.hpp>
17 
18 #include <ur_api.h>
19 
20 #include <memory>
21 #include <vector>
22 
23 namespace sycl {
24 inline namespace _V1 {
25 namespace detail {
26 
27 class queue_impl;
28 class event_impl;
29 class context_impl;
30 
31 using QueueImplPtr = std::shared_ptr<detail::queue_impl>;
32 using EventImplPtr = std::shared_ptr<detail::event_impl>;
33 using ContextImplPtr = std::shared_ptr<detail::context_impl>;
34 
35 // The class contains methods that work with memory. All operations with
36 // device memory should go through MemoryManager.
37 
39 public:
40  // The following method releases memory allocation of memory object.
41  // Depending on the context it releases memory on host or on device.
42  static void release(ContextImplPtr TargetContext, SYCLMemObjI *MemObj,
43  void *MemAllocation, std::vector<EventImplPtr> DepEvents,
44  ur_event_handle_t &OutEvent);
45 
46  // The following method allocates memory allocation of memory object.
47  // Depending on the context it allocates memory on host or on device.
48  static void *allocate(ContextImplPtr TargetContext, SYCLMemObjI *MemObj,
49  bool InitFromUserData, void *HostPtr,
50  std::vector<EventImplPtr> DepEvents,
51  ur_event_handle_t &OutEvent);
52 
53  // The following method creates OpenCL sub buffer for specified
54  // offset, range, and memory object.
55  static void *allocateMemSubBuffer(ContextImplPtr TargetContext,
56  void *ParentMemObj, size_t ElemSize,
57  size_t Offset, range<3> Range,
58  std::vector<EventImplPtr> DepEvents,
59  ur_event_handle_t &OutEvent);
60 
61  // Allocates buffer in specified context taking into account situations such
62  // as host ptr or cl_mem provided by user. TargetContext should be device
63  // one(not host).
64  static void *allocateMemBuffer(ContextImplPtr TargetContext,
65  SYCLMemObjI *MemObj, void *UserPtr,
66  bool HostPtrReadOnly, size_t Size,
67  const EventImplPtr &InteropEvent,
68  const ContextImplPtr &InteropContext,
69  const sycl::property_list &PropsList,
70  ur_event_handle_t &OutEventToWait);
71 
72  // Allocates images in specified context taking into account situations such
73  // as host ptr or cl_mem provided by user. TargetContext should be device
74  // one(not host).
75  static void *allocateMemImage(
76  ContextImplPtr TargetContext, SYCLMemObjI *MemObj, void *UserPtr,
77  bool HostPtrReadOnly, size_t Size, const ur_image_desc_t &Desc,
78  const ur_image_format_t &Format, const EventImplPtr &InteropEvent,
79  const ContextImplPtr &InteropContext,
80  const sycl::property_list &PropsList, ur_event_handle_t &OutEventToWait);
81 
82  // Releases memory object(buffer or image). TargetContext should be device
83  // one(not host).
84  static void releaseMemObj(ContextImplPtr TargetContext, SYCLMemObjI *MemObj,
85  void *MemAllocation, void *UserPtr);
86 
87  static void *allocateHostMemory(SYCLMemObjI *MemObj, void *UserPtr,
88  bool HostPtrReadOnly, size_t Size,
89  const sycl::property_list &PropsList);
90 
91  static void *allocateInteropMemObject(ContextImplPtr TargetContext,
92  void *UserPtr,
93  const EventImplPtr &InteropEvent,
94  const ContextImplPtr &InteropContext,
95  const sycl::property_list &PropsList,
96  ur_event_handle_t &OutEventToWait);
97 
98  static void *allocateImageObject(ContextImplPtr TargetContext, void *UserPtr,
99  bool HostPtrReadOnly,
100  const ur_image_desc_t &Desc,
101  const ur_image_format_t &Format,
102  const sycl::property_list &PropsList);
103 
104  static void *allocateBufferObject(ContextImplPtr TargetContext, void *UserPtr,
105  bool HostPtrReadOnly, const size_t Size,
106  const sycl::property_list &PropsList);
107 
108  // Copies memory between: host and device, host and host,
109  // device and device if memory objects bound to the one context.
110  static void copy(SYCLMemObjI *SYCLMemObj, void *SrcMem, QueueImplPtr SrcQueue,
111  unsigned int DimSrc, sycl::range<3> SrcSize,
112  sycl::range<3> SrcAccessRange, sycl::id<3> SrcOffset,
113  unsigned int SrcElemSize, void *DstMem,
114  QueueImplPtr TgtQueue, unsigned int DimDst,
115  sycl::range<3> DstSize, sycl::range<3> DstAccessRange,
116  sycl::id<3> DstOffset, unsigned int DstElemSize,
117  std::vector<ur_event_handle_t> DepEvents,
118  ur_event_handle_t &OutEvent,
119  const detail::EventImplPtr &OutEventImpl);
120 
121  static void fill(SYCLMemObjI *SYCLMemObj, void *Mem, QueueImplPtr Queue,
122  size_t PatternSize, const unsigned char *Pattern,
123  unsigned int Dim, sycl::range<3> Size,
124  sycl::range<3> AccessRange, sycl::id<3> AccessOffset,
125  unsigned int ElementSize,
126  std::vector<ur_event_handle_t> DepEvents,
127  ur_event_handle_t &OutEvent,
128  const detail::EventImplPtr &OutEventImpl);
129 
130  static void *map(SYCLMemObjI *SYCLMemObj, void *Mem, QueueImplPtr Queue,
131  access::mode AccessMode, unsigned int Dim,
132  sycl::range<3> Size, sycl::range<3> AccessRange,
133  sycl::id<3> AccessOffset, unsigned int ElementSize,
134  std::vector<ur_event_handle_t> DepEvents,
135  ur_event_handle_t &OutEvent);
136 
137  static void unmap(SYCLMemObjI *SYCLMemObj, void *Mem, QueueImplPtr Queue,
138  void *MappedPtr, std::vector<ur_event_handle_t> DepEvents,
139  ur_event_handle_t &OutEvent);
140 
141  static void copy_usm(const void *SrcMem, QueueImplPtr Queue, size_t Len,
142  void *DstMem, std::vector<ur_event_handle_t> DepEvents,
143  ur_event_handle_t *OutEvent,
144  const detail::EventImplPtr &OutEventImpl);
145 
146  static void fill_usm(void *DstMem, QueueImplPtr Queue, size_t Len,
147  const std::vector<unsigned char> &Pattern,
148  std::vector<ur_event_handle_t> DepEvents,
149  ur_event_handle_t *OutEvent,
150  const detail::EventImplPtr &OutEventImpl);
151 
152  static void prefetch_usm(void *Ptr, QueueImplPtr Queue, size_t Len,
153  std::vector<ur_event_handle_t> DepEvents,
154  ur_event_handle_t *OutEvent,
155  const detail::EventImplPtr &OutEventImpl);
156 
157  static void advise_usm(const void *Ptr, QueueImplPtr Queue, size_t Len,
158  ur_usm_advice_flags_t Advice,
159  std::vector<ur_event_handle_t> DepEvents,
160  ur_event_handle_t *OutEvent,
161  const detail::EventImplPtr &OutEventImpl);
162 
163  static void copy_2d_usm(const void *SrcMem, size_t SrcPitch,
164  QueueImplPtr Queue, void *DstMem, size_t DstPitch,
165  size_t Width, size_t Height,
166  std::vector<ur_event_handle_t> DepEvents,
167  ur_event_handle_t *OutEvent,
168  const detail::EventImplPtr &OutEventImpl);
169 
170  static void fill_2d_usm(void *DstMem, QueueImplPtr Queue, size_t Pitch,
171  size_t Width, size_t Height,
172  const std::vector<unsigned char> &Pattern,
173  std::vector<ur_event_handle_t> DepEvents,
174  ur_event_handle_t *OutEvent,
175  const detail::EventImplPtr &OutEventImpl);
176 
177  static void memset_2d_usm(void *DstMem, QueueImplPtr Queue, size_t Pitch,
178  size_t Width, size_t Height, char Value,
179  std::vector<ur_event_handle_t> DepEvents,
180  ur_event_handle_t *OutEvent,
181  const detail::EventImplPtr &OutEventImpl);
182 
183  static void copy_to_device_global(
184  const void *DeviceGlobalPtr, bool IsDeviceImageScoped, QueueImplPtr Queue,
185  size_t NumBytes, size_t Offset, const void *SrcMem,
186  const std::vector<ur_event_handle_t> &DepEvents,
187  ur_event_handle_t *OutEvent, const detail::EventImplPtr &OutEventImpl);
188 
189  static void copy_from_device_global(
190  const void *DeviceGlobalPtr, bool IsDeviceImageScoped, QueueImplPtr Queue,
191  size_t NumBytes, size_t Offset, void *DstMem,
192  const std::vector<ur_event_handle_t> &DepEvents,
193  ur_event_handle_t *OutEvent, const detail::EventImplPtr &OutEventImpl);
194 
195  // Command buffer extension methods
196  static void ext_oneapi_copyD2D_cmd_buffer(
198  ur_exp_command_buffer_handle_t CommandBuffer, SYCLMemObjI *SYCLMemObj,
199  void *SrcMem, unsigned int DimSrc, sycl::range<3> SrcSize,
200  sycl::range<3> SrcAccessRange, sycl::id<3> SrcOffset,
201  unsigned int SrcElemSize, void *DstMem, unsigned int DimDst,
202  sycl::range<3> DstSize, sycl::range<3> DstAccessRange,
203  sycl::id<3> DstOffset, unsigned int DstElemSize,
204  std::vector<ur_exp_command_buffer_sync_point_t> Deps,
205  ur_exp_command_buffer_sync_point_t *OutSyncPoint);
206 
207  static void ext_oneapi_copyD2H_cmd_buffer(
209  ur_exp_command_buffer_handle_t CommandBuffer, SYCLMemObjI *SYCLMemObj,
210  void *SrcMem, unsigned int DimSrc, sycl::range<3> SrcSize,
211  sycl::range<3> SrcAccessRange, sycl::id<3> SrcOffset,
212  unsigned int SrcElemSize, char *DstMem, unsigned int DimDst,
213  sycl::range<3> DstSize, sycl::id<3> DstOffset, unsigned int DstElemSize,
214  std::vector<ur_exp_command_buffer_sync_point_t> Deps,
215  ur_exp_command_buffer_sync_point_t *OutSyncPoint);
216 
217  static void ext_oneapi_copyH2D_cmd_buffer(
219  ur_exp_command_buffer_handle_t CommandBuffer, SYCLMemObjI *SYCLMemObj,
220  char *SrcMem, unsigned int DimSrc, sycl::range<3> SrcSize,
221  sycl::id<3> SrcOffset, unsigned int SrcElemSize, void *DstMem,
222  unsigned int DimDst, sycl::range<3> DstSize,
223  sycl::range<3> DstAccessRange, sycl::id<3> DstOffset,
224  unsigned int DstElemSize,
225  std::vector<ur_exp_command_buffer_sync_point_t> Deps,
226  ur_exp_command_buffer_sync_point_t *OutSyncPoint);
227 
228  static void ext_oneapi_copy_usm_cmd_buffer(
229  ContextImplPtr Context, const void *SrcMem,
230  ur_exp_command_buffer_handle_t CommandBuffer, size_t Len, void *DstMem,
231  std::vector<ur_exp_command_buffer_sync_point_t> Deps,
232  ur_exp_command_buffer_sync_point_t *OutSyncPoint);
233 
234  static void ext_oneapi_fill_usm_cmd_buffer(
236  ur_exp_command_buffer_handle_t CommandBuffer, void *DstMem, size_t Len,
237  const std::vector<unsigned char> &Pattern,
238  std::vector<ur_exp_command_buffer_sync_point_t> Deps,
239  ur_exp_command_buffer_sync_point_t *OutSyncPoint);
240 
241  static void ext_oneapi_fill_cmd_buffer(
243  ur_exp_command_buffer_handle_t CommandBuffer, SYCLMemObjI *SYCLMemObj,
244  void *Mem, size_t PatternSize, const unsigned char *Pattern,
245  unsigned int Dim, sycl::range<3> Size, sycl::range<3> AccessRange,
246  sycl::id<3> AccessOffset, unsigned int ElementSize,
247  std::vector<ur_exp_command_buffer_sync_point_t> Deps,
248  ur_exp_command_buffer_sync_point_t *OutSyncPoint);
249 
252  ur_exp_command_buffer_handle_t CommandBuffer, void *Mem, size_t Length,
253  std::vector<ur_exp_command_buffer_sync_point_t> Deps,
254  ur_exp_command_buffer_sync_point_t *OutSyncPoint);
255 
258  ur_exp_command_buffer_handle_t CommandBuffer, const void *Mem,
259  size_t Length, ur_usm_advice_flags_t Advice,
260  std::vector<ur_exp_command_buffer_sync_point_t> Deps,
261  ur_exp_command_buffer_sync_point_t *OutSyncPoint);
262 
263  static void copy_image_bindless(
264  QueueImplPtr Queue, const void *Src, void *Dst,
265  const ur_image_desc_t &SrcDesc, const ur_image_desc_t &DstDesc,
266  const ur_image_format_t &SrcFormat, const ur_image_format_t &DstFormat,
267  const ur_exp_image_copy_flags_t Flags, ur_rect_offset_t SrcOffset,
268  ur_rect_offset_t DstOffset, ur_rect_region_t CopyExtent,
269  const std::vector<ur_event_handle_t> &DepEvents,
270  ur_event_handle_t *OutEvent);
271 };
272 } // namespace detail
273 } // namespace _V1
274 } // namespace sycl
static void ext_oneapi_fill_usm_cmd_buffer(sycl::detail::ContextImplPtr Context, ur_exp_command_buffer_handle_t CommandBuffer, void *DstMem, size_t Len, const std::vector< unsigned char > &Pattern, std::vector< ur_exp_command_buffer_sync_point_t > Deps, ur_exp_command_buffer_sync_point_t *OutSyncPoint)
static void * allocateImageObject(ContextImplPtr TargetContext, void *UserPtr, bool HostPtrReadOnly, const ur_image_desc_t &Desc, const ur_image_format_t &Format, const sycl::property_list &PropsList)
static void ext_oneapi_copyH2D_cmd_buffer(sycl::detail::ContextImplPtr Context, ur_exp_command_buffer_handle_t CommandBuffer, SYCLMemObjI *SYCLMemObj, char *SrcMem, unsigned int DimSrc, sycl::range< 3 > SrcSize, sycl::id< 3 > SrcOffset, unsigned int SrcElemSize, void *DstMem, unsigned int DimDst, sycl::range< 3 > DstSize, sycl::range< 3 > DstAccessRange, sycl::id< 3 > DstOffset, unsigned int DstElemSize, std::vector< ur_exp_command_buffer_sync_point_t > Deps, ur_exp_command_buffer_sync_point_t *OutSyncPoint)
static void * allocateMemBuffer(ContextImplPtr TargetContext, SYCLMemObjI *MemObj, void *UserPtr, bool HostPtrReadOnly, size_t Size, const EventImplPtr &InteropEvent, const ContextImplPtr &InteropContext, const sycl::property_list &PropsList, ur_event_handle_t &OutEventToWait)
static void copy_image_bindless(QueueImplPtr Queue, const void *Src, void *Dst, const ur_image_desc_t &SrcDesc, const ur_image_desc_t &DstDesc, const ur_image_format_t &SrcFormat, const ur_image_format_t &DstFormat, const ur_exp_image_copy_flags_t Flags, ur_rect_offset_t SrcOffset, ur_rect_offset_t DstOffset, ur_rect_region_t CopyExtent, const std::vector< ur_event_handle_t > &DepEvents, ur_event_handle_t *OutEvent)
static void * allocateHostMemory(SYCLMemObjI *MemObj, void *UserPtr, bool HostPtrReadOnly, size_t Size, const sycl::property_list &PropsList)
static void fill_2d_usm(void *DstMem, QueueImplPtr Queue, size_t Pitch, size_t Width, size_t Height, const std::vector< unsigned char > &Pattern, std::vector< ur_event_handle_t > DepEvents, ur_event_handle_t *OutEvent, const detail::EventImplPtr &OutEventImpl)
static void ext_oneapi_advise_usm_cmd_buffer(sycl::detail::ContextImplPtr Context, ur_exp_command_buffer_handle_t CommandBuffer, const void *Mem, size_t Length, ur_usm_advice_flags_t Advice, std::vector< ur_exp_command_buffer_sync_point_t > Deps, ur_exp_command_buffer_sync_point_t *OutSyncPoint)
static void fill(SYCLMemObjI *SYCLMemObj, void *Mem, QueueImplPtr Queue, size_t PatternSize, const unsigned char *Pattern, unsigned int Dim, sycl::range< 3 > Size, sycl::range< 3 > AccessRange, sycl::id< 3 > AccessOffset, unsigned int ElementSize, std::vector< ur_event_handle_t > DepEvents, ur_event_handle_t &OutEvent, const detail::EventImplPtr &OutEventImpl)
static void * allocateMemSubBuffer(ContextImplPtr TargetContext, void *ParentMemObj, size_t ElemSize, size_t Offset, range< 3 > Range, std::vector< EventImplPtr > DepEvents, ur_event_handle_t &OutEvent)
static void ext_oneapi_fill_cmd_buffer(sycl::detail::ContextImplPtr Context, ur_exp_command_buffer_handle_t CommandBuffer, SYCLMemObjI *SYCLMemObj, void *Mem, size_t PatternSize, const unsigned char *Pattern, unsigned int Dim, sycl::range< 3 > Size, sycl::range< 3 > AccessRange, sycl::id< 3 > AccessOffset, unsigned int ElementSize, std::vector< ur_exp_command_buffer_sync_point_t > Deps, ur_exp_command_buffer_sync_point_t *OutSyncPoint)
static void memset_2d_usm(void *DstMem, QueueImplPtr Queue, size_t Pitch, size_t Width, size_t Height, char Value, std::vector< ur_event_handle_t > DepEvents, ur_event_handle_t *OutEvent, const detail::EventImplPtr &OutEventImpl)
static void ext_oneapi_copyD2H_cmd_buffer(sycl::detail::ContextImplPtr Context, ur_exp_command_buffer_handle_t CommandBuffer, SYCLMemObjI *SYCLMemObj, void *SrcMem, unsigned int DimSrc, sycl::range< 3 > SrcSize, sycl::range< 3 > SrcAccessRange, sycl::id< 3 > SrcOffset, unsigned int SrcElemSize, char *DstMem, unsigned int DimDst, sycl::range< 3 > DstSize, sycl::id< 3 > DstOffset, unsigned int DstElemSize, std::vector< ur_exp_command_buffer_sync_point_t > Deps, ur_exp_command_buffer_sync_point_t *OutSyncPoint)
static void copy_to_device_global(const void *DeviceGlobalPtr, bool IsDeviceImageScoped, QueueImplPtr Queue, size_t NumBytes, size_t Offset, const void *SrcMem, const std::vector< ur_event_handle_t > &DepEvents, ur_event_handle_t *OutEvent, const detail::EventImplPtr &OutEventImpl)
static void ext_oneapi_copyD2D_cmd_buffer(sycl::detail::ContextImplPtr Context, ur_exp_command_buffer_handle_t CommandBuffer, SYCLMemObjI *SYCLMemObj, void *SrcMem, unsigned int DimSrc, sycl::range< 3 > SrcSize, sycl::range< 3 > SrcAccessRange, sycl::id< 3 > SrcOffset, unsigned int SrcElemSize, void *DstMem, unsigned int DimDst, sycl::range< 3 > DstSize, sycl::range< 3 > DstAccessRange, sycl::id< 3 > DstOffset, unsigned int DstElemSize, std::vector< ur_exp_command_buffer_sync_point_t > Deps, ur_exp_command_buffer_sync_point_t *OutSyncPoint)
static void copy_2d_usm(const void *SrcMem, size_t SrcPitch, QueueImplPtr Queue, void *DstMem, size_t DstPitch, size_t Width, size_t Height, std::vector< ur_event_handle_t > DepEvents, ur_event_handle_t *OutEvent, const detail::EventImplPtr &OutEventImpl)
static void advise_usm(const void *Ptr, QueueImplPtr Queue, size_t Len, ur_usm_advice_flags_t Advice, std::vector< ur_event_handle_t > DepEvents, ur_event_handle_t *OutEvent, const detail::EventImplPtr &OutEventImpl)
static void * map(SYCLMemObjI *SYCLMemObj, void *Mem, QueueImplPtr Queue, access::mode AccessMode, unsigned int Dim, sycl::range< 3 > Size, sycl::range< 3 > AccessRange, sycl::id< 3 > AccessOffset, unsigned int ElementSize, std::vector< ur_event_handle_t > DepEvents, ur_event_handle_t &OutEvent)
static void copy(SYCLMemObjI *SYCLMemObj, void *SrcMem, QueueImplPtr SrcQueue, unsigned int DimSrc, sycl::range< 3 > SrcSize, sycl::range< 3 > SrcAccessRange, sycl::id< 3 > SrcOffset, unsigned int SrcElemSize, void *DstMem, QueueImplPtr TgtQueue, unsigned int DimDst, sycl::range< 3 > DstSize, sycl::range< 3 > DstAccessRange, sycl::id< 3 > DstOffset, unsigned int DstElemSize, std::vector< ur_event_handle_t > DepEvents, ur_event_handle_t &OutEvent, const detail::EventImplPtr &OutEventImpl)
static void * allocateBufferObject(ContextImplPtr TargetContext, void *UserPtr, bool HostPtrReadOnly, const size_t Size, const sycl::property_list &PropsList)
static void copy_usm(const void *SrcMem, QueueImplPtr Queue, size_t Len, void *DstMem, std::vector< ur_event_handle_t > DepEvents, ur_event_handle_t *OutEvent, const detail::EventImplPtr &OutEventImpl)
static void * allocateMemImage(ContextImplPtr TargetContext, SYCLMemObjI *MemObj, void *UserPtr, bool HostPtrReadOnly, size_t Size, const ur_image_desc_t &Desc, const ur_image_format_t &Format, const EventImplPtr &InteropEvent, const ContextImplPtr &InteropContext, const sycl::property_list &PropsList, ur_event_handle_t &OutEventToWait)
static void fill_usm(void *DstMem, QueueImplPtr Queue, size_t Len, const std::vector< unsigned char > &Pattern, std::vector< ur_event_handle_t > DepEvents, ur_event_handle_t *OutEvent, const detail::EventImplPtr &OutEventImpl)
static void copy_from_device_global(const void *DeviceGlobalPtr, bool IsDeviceImageScoped, QueueImplPtr Queue, size_t NumBytes, size_t Offset, void *DstMem, const std::vector< ur_event_handle_t > &DepEvents, ur_event_handle_t *OutEvent, const detail::EventImplPtr &OutEventImpl)
static void * allocate(ContextImplPtr TargetContext, SYCLMemObjI *MemObj, bool InitFromUserData, void *HostPtr, std::vector< EventImplPtr > DepEvents, ur_event_handle_t &OutEvent)
static void * allocateInteropMemObject(ContextImplPtr TargetContext, void *UserPtr, const EventImplPtr &InteropEvent, const ContextImplPtr &InteropContext, const sycl::property_list &PropsList, ur_event_handle_t &OutEventToWait)
static void releaseMemObj(ContextImplPtr TargetContext, SYCLMemObjI *MemObj, void *MemAllocation, void *UserPtr)
static void ext_oneapi_copy_usm_cmd_buffer(ContextImplPtr Context, const void *SrcMem, ur_exp_command_buffer_handle_t CommandBuffer, size_t Len, void *DstMem, std::vector< ur_exp_command_buffer_sync_point_t > Deps, ur_exp_command_buffer_sync_point_t *OutSyncPoint)
static void unmap(SYCLMemObjI *SYCLMemObj, void *Mem, QueueImplPtr Queue, void *MappedPtr, std::vector< ur_event_handle_t > DepEvents, ur_event_handle_t &OutEvent)
static void release(ContextImplPtr TargetContext, SYCLMemObjI *MemObj, void *MemAllocation, std::vector< EventImplPtr > DepEvents, ur_event_handle_t &OutEvent)
static void ext_oneapi_prefetch_usm_cmd_buffer(sycl::detail::ContextImplPtr Context, ur_exp_command_buffer_handle_t CommandBuffer, void *Mem, size_t Length, std::vector< ur_exp_command_buffer_sync_point_t > Deps, ur_exp_command_buffer_sync_point_t *OutSyncPoint)
static void prefetch_usm(void *Ptr, QueueImplPtr Queue, size_t Len, std::vector< ur_event_handle_t > DepEvents, ur_event_handle_t *OutEvent, const detail::EventImplPtr &OutEventImpl)
A unique identifier of an item in an index space.
Definition: id.hpp:36
Objects of the property_list class are containers for the SYCL properties.
std::shared_ptr< sycl::detail::context_impl > ContextImplPtr
Definition: event_impl.hpp:32
std::shared_ptr< event_impl > EventImplPtr
Definition: handler.hpp:183
std::shared_ptr< sycl::detail::queue_impl > QueueImplPtr
Definition: helpers.hpp:45
class __SYCL_EBO __SYCL_SPECIAL_CLASS AccessMode
Definition: access.hpp:18