24 inline namespace _V1 {
31 using QueueImplPtr = std::shared_ptr<detail::queue_impl>;
32 using EventImplPtr = std::shared_ptr<detail::event_impl>;
43 void *MemAllocation, std::vector<EventImplPtr> DepEvents,
44 ur_event_handle_t &OutEvent);
49 bool InitFromUserData,
void *HostPtr,
50 std::vector<EventImplPtr> DepEvents,
51 ur_event_handle_t &OutEvent);
56 void *ParentMemObj,
size_t ElemSize,
58 std::vector<EventImplPtr> DepEvents,
59 ur_event_handle_t &OutEvent);
66 bool HostPtrReadOnly,
size_t Size,
70 ur_event_handle_t &OutEventToWait);
77 bool HostPtrReadOnly,
size_t Size,
const ur_image_desc_t &Desc,
78 const ur_image_format_t &Format,
const EventImplPtr &InteropEvent,
85 void *MemAllocation,
void *UserPtr);
88 bool HostPtrReadOnly,
size_t Size,
96 ur_event_handle_t &OutEventToWait);
100 const ur_image_desc_t &Desc,
101 const ur_image_format_t &Format,
105 bool HostPtrReadOnly,
const size_t Size,
113 unsigned int SrcElemSize,
void *DstMem,
117 std::vector<ur_event_handle_t> DepEvents,
118 ur_event_handle_t &OutEvent,
122 size_t PatternSize,
const unsigned char *Pattern,
125 unsigned int ElementSize,
126 std::vector<ur_event_handle_t> DepEvents,
127 ur_event_handle_t &OutEvent,
133 sycl::id<3> AccessOffset,
unsigned int ElementSize,
134 std::vector<ur_event_handle_t> DepEvents,
135 ur_event_handle_t &OutEvent);
138 void *MappedPtr, std::vector<ur_event_handle_t> DepEvents,
139 ur_event_handle_t &OutEvent);
142 void *DstMem, std::vector<ur_event_handle_t> DepEvents,
143 ur_event_handle_t *OutEvent,
147 const std::vector<unsigned char> &Pattern,
148 std::vector<ur_event_handle_t> DepEvents,
149 ur_event_handle_t *OutEvent,
153 std::vector<ur_event_handle_t> DepEvents,
154 ur_event_handle_t *OutEvent,
158 ur_usm_advice_flags_t Advice,
159 std::vector<ur_event_handle_t> DepEvents,
160 ur_event_handle_t *OutEvent,
163 static void copy_2d_usm(
const void *SrcMem,
size_t SrcPitch,
165 size_t Width,
size_t Height,
166 std::vector<ur_event_handle_t> DepEvents,
167 ur_event_handle_t *OutEvent,
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,
178 size_t Width,
size_t Height,
char Value,
179 std::vector<ur_event_handle_t> DepEvents,
180 ur_event_handle_t *OutEvent,
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,
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,
198 ur_exp_command_buffer_handle_t CommandBuffer,
SYCLMemObjI *SYCLMemObj,
201 unsigned int SrcElemSize,
void *DstMem,
unsigned int DimDst,
204 std::vector<ur_exp_command_buffer_sync_point_t> Deps,
205 ur_exp_command_buffer_sync_point_t *OutSyncPoint);
209 ur_exp_command_buffer_handle_t CommandBuffer,
SYCLMemObjI *SYCLMemObj,
212 unsigned int SrcElemSize,
char *DstMem,
unsigned int DimDst,
214 std::vector<ur_exp_command_buffer_sync_point_t> Deps,
215 ur_exp_command_buffer_sync_point_t *OutSyncPoint);
219 ur_exp_command_buffer_handle_t CommandBuffer,
SYCLMemObjI *SYCLMemObj,
221 sycl::id<3> SrcOffset,
unsigned int SrcElemSize,
void *DstMem,
224 unsigned int DstElemSize,
225 std::vector<ur_exp_command_buffer_sync_point_t> Deps,
226 ur_exp_command_buffer_sync_point_t *OutSyncPoint);
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);
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);
243 ur_exp_command_buffer_handle_t CommandBuffer,
SYCLMemObjI *SYCLMemObj,
244 void *Mem,
size_t PatternSize,
const unsigned char *Pattern,
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);
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);
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);
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);
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.
Objects of the property_list class are containers for the SYCL properties.
std::shared_ptr< sycl::detail::context_impl > ContextImplPtr
std::shared_ptr< event_impl > EventImplPtr
std::shared_ptr< sycl::detail::queue_impl > QueueImplPtr
class __SYCL_EBO __SYCL_SPECIAL_CLASS AccessMode