DPC++ Runtime
Runtime libraries for oneAPI DPC++
memory_manager.cpp File Reference
#include "ur_api.h"
#include <detail/context_impl.hpp>
#include <detail/device_image_impl.hpp>
#include <detail/event_impl.hpp>
#include <detail/mem_alloc_helper.hpp>
#include <detail/memory_manager.hpp>
#include <detail/queue_impl.hpp>
#include <detail/ur_utils.hpp>
#include <detail/xpti_registry.hpp>
#include <sycl/detail/ur.hpp>
#include <sycl/ext/oneapi/bindless_images_memory.hpp>
#include <sycl/usm/usm_enums.hpp>
#include <sycl/usm/usm_pointer_info.hpp>
#include <algorithm>
#include <cassert>
#include <cstring>
#include <vector>
Include dependency graph for memory_manager.cpp:

Go to the source code of this file.

Classes

struct  sycl::_V1::detail::TermPositions
 

Namespaces

 sycl
 
 sycl::_V1
 
 sycl::_V1::detail
 

Functions

uint64_t sycl::_V1::detail::emitMemAllocBeginTrace (uintptr_t ObjHandle, size_t AllocSize, size_t GuardZone)
 
void sycl::_V1::detail::emitMemAllocEndTrace (uintptr_t ObjHandle, uintptr_t AllocPtr, size_t AllocSize, size_t GuardZone, uint64_t CorrelationID)
 
uint64_t sycl::_V1::detail::emitMemReleaseBeginTrace (uintptr_t ObjHandle, uintptr_t AllocPtr)
 
void sycl::_V1::detail::emitMemReleaseEndTrace (uintptr_t ObjHandle, uintptr_t AllocPtr, uint64_t CorrelationID)
 
static void sycl::_V1::detail::waitForEvents (const std::vector< EventImplPtr > &Events)
 
void sycl::_V1::detail::memBufferCreateHelper (const PluginPtr &Plugin, ur_context_handle_t Ctx, ur_mem_flags_t Flags, size_t Size, ur_mem_handle_t *RetMem, const ur_buffer_properties_t *Props=nullptr)
 
void sycl::_V1::detail::memReleaseHelper (const PluginPtr &Plugin, ur_mem_handle_t Mem)
 
void sycl::_V1::detail::memBufferMapHelper (const PluginPtr &Plugin, ur_queue_handle_t command_queue, ur_mem_handle_t buffer, bool blocking_map, ur_map_flags_t map_flags, size_t offset, size_t size, uint32_t num_events_in_wait_list, const ur_event_handle_t *event_wait_list, ur_event_handle_t *event, void **ret_map)
 
void sycl::_V1::detail::memUnmapHelper (const PluginPtr &Plugin, ur_queue_handle_t command_queue, ur_mem_handle_t memobj, void *mapped_ptr, uint32_t num_events_in_wait_list, const ur_event_handle_t *event_wait_list, ur_event_handle_t *event)
 
static ur_mem_flags_t sycl::_V1::detail::getMemObjCreationFlags (void *UserPtr, bool HostPtrReadOnly)
 
void sycl::_V1::detail::prepTermPositions (TermPositions &pos, int Dimensions, detail::SYCLMemObjI::MemObjType Type)
 
void sycl::_V1::detail::copyH2D (SYCLMemObjI *SYCLMemObj, char *SrcMem, QueueImplPtr, unsigned int DimSrc, sycl::range< 3 > SrcSize, sycl::range< 3 > SrcAccessRange, sycl::id< 3 > SrcOffset, unsigned int SrcElemSize, ur_mem_handle_t 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)
 
void sycl::_V1::detail::copyD2H (SYCLMemObjI *SYCLMemObj, ur_mem_handle_t SrcMem, QueueImplPtr SrcQueue, unsigned int DimSrc, sycl::range< 3 > SrcSize, sycl::range< 3 > SrcAccessRange, sycl::id< 3 > SrcOffset, unsigned int SrcElemSize, char *DstMem, QueueImplPtr, 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)
 
void sycl::_V1::detail::copyD2D (SYCLMemObjI *SYCLMemObj, ur_mem_handle_t SrcMem, QueueImplPtr SrcQueue, unsigned int DimSrc, sycl::range< 3 > SrcSize, sycl::range< 3 > SrcAccessRange, sycl::id< 3 > SrcOffset, unsigned int SrcElemSize, ur_mem_handle_t DstMem, QueueImplPtr, unsigned int DimDst, sycl::range< 3 > DstSize, sycl::range< 3 >, 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 sycl::_V1::detail::copyH2H (SYCLMemObjI *, char *SrcMem, QueueImplPtr, unsigned int DimSrc, sycl::range< 3 > SrcSize, sycl::range< 3 > SrcAccessRange, sycl::id< 3 > SrcOffset, unsigned int SrcElemSize, char *DstMem, QueueImplPtr, unsigned int DimDst, sycl::range< 3 > DstSize, sycl::range< 3 > DstAccessRange, sycl::id< 3 > DstOffset, unsigned int DstElemSize, std::vector< ur_event_handle_t >, ur_event_handle_t &, const detail::EventImplPtr &)
 
static void sycl::_V1::detail::memcpyToDeviceGlobalUSM (QueueImplPtr Queue, DeviceGlobalMapEntry *DeviceGlobalEntry, size_t NumBytes, size_t Offset, const void *Src, const std::vector< ur_event_handle_t > &DepEvents, ur_event_handle_t *OutEvent, const detail::EventImplPtr &OutEventImpl)
 
static void sycl::_V1::detail::memcpyFromDeviceGlobalUSM (QueueImplPtr Queue, DeviceGlobalMapEntry *DeviceGlobalEntry, size_t NumBytes, size_t Offset, void *Dest, const std::vector< ur_event_handle_t > &DepEvents, ur_event_handle_t *OutEvent, const detail::EventImplPtr &OutEventImpl)
 
static ur_program_handle_t sycl::_V1::detail::getOrBuildProgramForDeviceGlobal (QueueImplPtr Queue, DeviceGlobalMapEntry *DeviceGlobalEntry)
 
static void sycl::_V1::detail::memcpyToDeviceGlobalDirect (QueueImplPtr Queue, DeviceGlobalMapEntry *DeviceGlobalEntry, size_t NumBytes, size_t Offset, const void *Src, const std::vector< ur_event_handle_t > &DepEvents, ur_event_handle_t *OutEvent)
 
static void sycl::_V1::detail::memcpyFromDeviceGlobalDirect (QueueImplPtr Queue, DeviceGlobalMapEntry *DeviceGlobalEntry, size_t NumBytes, size_t Offset, void *Dest, const std::vector< ur_event_handle_t > &DepEvents, ur_event_handle_t *OutEvent)