/third_party/mindspore/mindspore/ccsrc/runtime/device/cpu/ |
D | cpu_device_address.cc | 55 …iceAddress::SyncDeviceToHost(const ShapeVector &, size_t size, TypeId type, void *host_ptr) const { in SyncDeviceToHost() 65 if (host_ptr == ptr_) { in SyncDeviceToHost() 75 auto ret_code = memcpy_s(host_ptr, size, ptr_, size); in SyncDeviceToHost() 78 ConvertSameType(host_ptr, ptr_, size, type); in SyncDeviceToHost() 86 FloatToHalf(host_ptr, ptr_, size >> 1); in SyncDeviceToHost() 88 FloatToDouble(host_ptr, ptr_, size / sizeof(double)); in SyncDeviceToHost() 90 IntToShort(host_ptr, ptr_, size >> 1); in SyncDeviceToHost() 92 IntToLong(host_ptr, ptr_, size / sizeof(int64_t)); in SyncDeviceToHost() 101 …eviceAddress::SyncHostToDevice(const ShapeVector &, size_t size, TypeId type, const void *host_ptr, in SyncHostToDevice() argument 112 if (host_ptr == ptr_) { in SyncHostToDevice() [all …]
|
/third_party/mindspore/mindspore/lite/src/runtime/gpu/opencl/ |
D | opencl_allocator.cc | 80 void *host_ptr = ocl_runtime_->MapBuffer(**buffer, CL_MAP_READ | CL_MAP_WRITE, size); in CreateBuffer() local 81 MS_ASSERT(host_ptr); in CreateBuffer() 82 if (host_ptr == nullptr) { in CreateBuffer() 90 ret = ocl_runtime_->UnmapBuffer(*mem, host_ptr); in CreateBuffer() 94 return host_ptr; in CreateBuffer() 98 cl::Buffer **buffer, cl::Image2D **image, void **host_ptr) { in CreateImage2D() argument 131 *host_ptr = ocl_runtime_->MapBuffer(**image, true, CL_MAP_READ | CL_MAP_WRITE, region); in CreateImage2D() 132 if (*host_ptr == nullptr) { in CreateImage2D() 137 …MS_LOG(ERROR) << "Map image failed, can not found image :" << *image << ", host_ptr=" << *host_ptr; in CreateImage2D() 141 ret = ocl_runtime_->UnmapBuffer(*mem, *host_ptr); in CreateImage2D() [all …]
|
D | opencl_allocator.h | 74 cl::Image2D *GetImage(void *host_ptr); 76 void *MapBuffer(void *host_ptr, int flags, void *command_queue = nullptr, bool sync = true); 77 int UnmapBuffer(void *host_ptr, void *command_queue = nullptr); 78 MemType GetMemType(void *host_ptr); 79 int GetImageSize(void *host_ptr, ImageSize *img_size); 94 cl::Image2D **image, void **host_ptr);
|
D | opencl_runtime_wrapper.cc | 89 void *OpenCLRuntimeWrapper::MapBuffer(void *host_ptr, int flags, bool sync) { in MapBuffer() argument 92 return ocl_runtime->GetAllocator()->MapBuffer(host_ptr, flags, nullptr, sync); in MapBuffer() 95 Status OpenCLRuntimeWrapper::UnmapBuffer(void *host_ptr) { in UnmapBuffer() argument 98 if (ocl_runtime->GetAllocator()->UnmapBuffer(host_ptr, nullptr) == RET_OK) { in UnmapBuffer()
|
D | opencl_wrapper.cc | 407 cl_mem clCreateBuffer(cl_context context, cl_mem_flags flags, size_t size, void *host_ptr, cl_int *… in clCreateBuffer() argument 410 return func(context, flags, size, host_ptr, errcode_ret); in clCreateBuffer() 589 … size_t imageHeight, size_t image_row_pitch, void *host_ptr, cl_int *errcode_ret) { in clCreateImage2D() argument 592 …return func(context, flags, image_format, imageWidth, imageHeight, image_row_pitch, host_ptr, errc… in clCreateImage2D() 598 void *host_ptr, cl_int *errcode_ret) { in clCreateImage3D() argument 602 host_ptr, errcode_ret); in clCreateImage3D() 669 const cl_image_desc *image_desc, void *host_ptr, cl_int *errcode_ret) { in clCreateImage() argument 672 return func(context, flags, image_format, image_desc, host_ptr, errcode_ret); in clCreateImage() 723 …EnqueueSVMMap(cl_command_queue command_queue, cl_bool blocking, cl_map_flags flags, void *host_ptr, in clEnqueueSVMMap() argument 727 …return func(command_queue, blocking, flags, host_ptr, size, num_events_in_wait_list, event_wait_li… in clEnqueueSVMMap() [all …]
|
/third_party/mindspore/mindspore/ccsrc/runtime/device/gpu/ |
D | gpu_device_address.cc | 37 bool GPUDeviceAddress::SyncDeviceToHost(size_t size, void *host_ptr) const { in SyncDeviceToHost() 44 MS_EXCEPTION_IF_NULL(host_ptr); in SyncDeviceToHost() 64 return GPUDeviceManager::GetInstance().CopyDeviceMemToHost(host_ptr, ptr_, size); in SyncDeviceToHost() 67 bool GPUDeviceAddress::SyncHostToDevice(size_t size, const void *host_ptr) const { in SyncHostToDevice() 74 MS_EXCEPTION_IF_NULL(host_ptr); in SyncHostToDevice() 87 if (!GPUDeviceManager::GetInstance().CopyHostMemToDeviceAsync(ptr_, host_ptr, size, stream)) { in SyncHostToDevice() 94 bool GPUDeviceAddress::SyncDeviceToHost(const ShapeVector &, size_t size, TypeId, void *host_ptr) c… in SyncDeviceToHost() 95 return SyncDeviceToHost(size, host_ptr); in SyncDeviceToHost() 98 … GPUDeviceAddress::SyncHostToDevice(const ShapeVector &, size_t size, TypeId, const void *host_ptr, in SyncHostToDevice() argument 104 return SyncHostToDevice(size, host_ptr); in SyncHostToDevice() [all …]
|
D | gpu_device_address.h | 41 bool SyncDeviceToHost(size_t size, void *host_ptr) const override; 42 bool SyncHostToDevice(size_t size, const void *host_ptr) const override; 43 …bool SyncDeviceToHost(const ShapeVector &shape, size_t size, TypeId type, void *host_ptr) const ov… 44 bool SyncHostToDevice(const ShapeVector &shape, size_t size, TypeId type, const void *host_ptr,
|
/third_party/mesa3d/src/gallium/frontends/clover/core/ |
D | memory.cpp | 32 size_t size, void *host_ptr) : in memory_obj() argument 34 _size(size), _host_ptr(host_ptr) { in memory_obj() 36 data.append((char *)host_ptr, size); in memory_obj() 72 memory_obj::host_ptr() const { in host_ptr() function in memory_obj 79 size_t size, void *host_ptr) : in buffer() argument 80 memory_obj(ctx, properties, flags, size, host_ptr) { in buffer() 91 size_t size, void *host_ptr) : in root_buffer() argument 92 buffer(ctx, properties, flags, size, host_ptr) { in root_buffer() 99 data_ptr = !data.empty() ? data.data() : host_ptr(); in resource_in() 136 (char *)parent.host_ptr() + offset), in sub_buffer() [all …]
|
D | memory.hpp | 41 size_t size, void *host_ptr); 64 void *host_ptr() const; 84 size_t size, void *host_ptr); 95 size_t size, void *host_ptr); 143 void *host_ptr); 182 void *host_ptr); 194 void *host_ptr); 207 void *host_ptr);
|
/third_party/mindspore/mindspore/ccsrc/runtime/device/ |
D | memory_scheduler.cc | 53 void MemScheduler::Init(const void *key, void *host_ptr, size_t mem_size, MemPriority priority) { in Init() argument 58 init_host_ptr_[key] = host_ptr; in Init() 96 auto host_ptr = init_host_ptr_[event->key]; in PreCompute() local 97 MS_EXCEPTION_IF_NULL(host_ptr); in PreCompute() 104 mem_handler_->SwapIn(host_ptr, iter->second, event->mem_size, stream); in PreCompute() 115 mem_handler_->SwapIn(host_ptr, device_ptr, event->mem_size, stream); in PreCompute() 125 auto host_ptr = init_host_ptr_[event->key]; in PreCompute() local 126 if (host_ptr == nullptr) { in PreCompute() 127 host_ptr = swap_host_ptr_[event->key]; in PreCompute() 134 MS_EXCEPTION_IF_NULL(host_ptr); in PreCompute() [all …]
|
D | memory_manager.h | 99 void SwapIn(const void *host_ptr, void *device_ptr, size_t mem_size, void *stream) override { in SwapIn() argument 100 …MS_LOG(INFO) << "Call default swap in " << host_ptr << "," << device_ptr << "," << mem_size << ","… in SwapIn() 102 void SwapOut(const void *device_ptr, void *host_ptr, size_t mem_size, void *stream) override { in SwapOut() argument 103 …MS_LOG(INFO) << "Call default swap out " << host_ptr << "," << device_ptr << "," << mem_size << ",… in SwapOut()
|
/third_party/boost/libs/compute/include/boost/compute/container/ |
D | mapped_view.hpp | 63 mapped_view(T *host_ptr, in mapped_view() argument 66 : m_buffer(_make_mapped_buffer(host_ptr, n, context)) in mapped_view() 75 mapped_view(const T *host_ptr, in mapped_view() argument 78 : m_buffer(_make_mapped_buffer(host_ptr, n, context)) in mapped_view() 217 static buffer _make_mapped_buffer(T *host_ptr, in _make_mapped_buffer() argument 225 host_ptr in _make_mapped_buffer() 230 static buffer _make_mapped_buffer(const T *host_ptr, in _make_mapped_buffer() argument 238 const_cast<void *>(static_cast<const void *>(host_ptr)) in _make_mapped_buffer()
|
/third_party/boost/boost/compute/container/ |
D | mapped_view.hpp | 63 mapped_view(T *host_ptr, in mapped_view() argument 66 : m_buffer(_make_mapped_buffer(host_ptr, n, context)) in mapped_view() 75 mapped_view(const T *host_ptr, in mapped_view() argument 78 : m_buffer(_make_mapped_buffer(host_ptr, n, context)) in mapped_view() 217 static buffer _make_mapped_buffer(T *host_ptr, in _make_mapped_buffer() argument 225 host_ptr in _make_mapped_buffer() 230 static buffer _make_mapped_buffer(const T *host_ptr, in _make_mapped_buffer() argument 238 const_cast<void *>(static_cast<const void *>(host_ptr)) in _make_mapped_buffer()
|
/third_party/mindspore/mindspore/ccsrc/runtime/device/ascend/ |
D | ascend_device_address.h | 45 bool SyncDeviceToHost(size_t size, void *const host_ptr) const override; 46 bool SyncHostToDevice(size_t size, const void *host_ptr) const override; 47 …bool SyncDeviceToHost(const ShapeVector &shape, size_t size, TypeId type, void *host_ptr) const ov… 48 bool SyncHostToDevice(const ShapeVector &shape, size_t size, TypeId type, const void *host_ptr, 62 …ceToHostAndConvertFormat(const ShapeVector &shape, size_t size, TypeId type, void *host_ptr) const; 63 …ndSyncHostToDevice(const ShapeVector &shape, size_t size, TypeId type, const void *host_ptr) const; 65 … mindspore::TypeId type, void *host_ptr) const;
|
D | ascend_device_address.cc | 181 bool AscendDeviceAddress::SyncDeviceToHost(size_t size, void *const host_ptr) const { in SyncDeviceToHost() 182 MS_EXCEPTION_IF_NULL(host_ptr); in SyncDeviceToHost() 184 SyncMemory(host_ptr, ptr_, size, RT_MEMCPY_DEVICE_TO_HOST); in SyncDeviceToHost() 188 bool AscendDeviceAddress::SyncHostToDevice(size_t size, const void *host_ptr) const { in SyncHostToDevice() 189 MS_EXCEPTION_IF_NULL(host_ptr); in SyncHostToDevice() 190 SyncMemory(ptr_, host_ptr, size, RT_MEMCPY_HOST_TO_DEVICE); in SyncHostToDevice() 195 void *host_ptr) const { in SyncDeviceToHost() 210 SyncMemory(host_ptr, ptr_, size, RT_MEMCPY_DEVICE_TO_HOST); in SyncDeviceToHost() 213 sync_ok = SyncDeviceToHostAndFloatToFloat64(host_ptr, size, ptr_, size_); in SyncDeviceToHost() 219 sync_ok = trans::TransDataType(type_args, host_ptr); in SyncDeviceToHost() [all …]
|
D | ascend_memory_manager.cc | 225 void AscendMemoryManager::SwapIn(const void *host_ptr, void *device_ptr, size_t mem_size, void *str… in SwapIn() argument 227 … auto ret_rt_memcpy = rtMemcpy(device_ptr, mem_size, host_ptr, mem_size, RT_MEMCPY_HOST_TO_DEVICE); in SwapIn() 232 …auto ret_rt_memcpy = rtMemcpyAsync(device_ptr, mem_size, host_ptr, mem_size, RT_MEMCPY_HOST_TO_DEV… in SwapIn() 242 void AscendMemoryManager::SwapOut(const void *device_ptr, void *host_ptr, size_t mem_size, void *st… in SwapOut() argument 244 … auto ret_rt_memcpy = rtMemcpy(host_ptr, mem_size, device_ptr, mem_size, RT_MEMCPY_DEVICE_TO_HOST); in SwapOut() 249 …auto ret_rt_memcpy = rtMemcpyAsync(host_ptr, mem_size, device_ptr, mem_size, RT_MEMCPY_DEVICE_TO_H… in SwapOut()
|
/third_party/mesa3d/src/gallium/frontends/clover/api/ |
D | memory.cpp | 107 void *host_ptr, cl_int *r_errcode) try { in clCreateBufferWithProperties() argument 113 if (bool(host_ptr) != bool(flags & (CL_MEM_USE_HOST_PTR | in clCreateBufferWithProperties() local 124 return new root_buffer(ctx, properties, flags, size, host_ptr); in clCreateBufferWithProperties() 133 void *host_ptr, cl_int *r_errcode) { in clCreateBuffer() argument 135 host_ptr, r_errcode); in clCreateBuffer() 174 void *host_ptr, cl_int *r_errcode) try { in clCreateImageWithProperties() argument 191 if (!host_ptr && in clCreateImageWithProperties() 201 if (bool(host_ptr) != bool(d_flags & (CL_MEM_USE_HOST_PTR | in clCreateImageWithProperties() local 229 row_pitch, host_ptr); in clCreateImageWithProperties() 244 row_pitch, host_ptr); in clCreateImageWithProperties() [all …]
|
/third_party/boost/libs/compute/include/boost/compute/ |
D | command_queue.hpp | 300 void *host_ptr, in enqueue_read_buffer() argument 306 BOOST_ASSERT(host_ptr != 0); in enqueue_read_buffer() 316 host_ptr, in enqueue_read_buffer() 338 void *host_ptr, in enqueue_read_buffer_async() argument 344 BOOST_ASSERT(host_ptr != 0); in enqueue_read_buffer_async() 354 host_ptr, in enqueue_read_buffer_async() 382 void *host_ptr, in enqueue_read_buffer_rect() argument 387 BOOST_ASSERT(host_ptr != 0); in enqueue_read_buffer_rect() 402 host_ptr, in enqueue_read_buffer_rect() 429 void *host_ptr, in enqueue_read_buffer_rect_async() argument [all …]
|
/third_party/boost/boost/compute/ |
D | command_queue.hpp | 300 void *host_ptr, in enqueue_read_buffer() argument 306 BOOST_ASSERT(host_ptr != 0); in enqueue_read_buffer() 316 host_ptr, in enqueue_read_buffer() 338 void *host_ptr, in enqueue_read_buffer_async() argument 344 BOOST_ASSERT(host_ptr != 0); in enqueue_read_buffer_async() 354 host_ptr, in enqueue_read_buffer_async() 382 void *host_ptr, in enqueue_read_buffer_rect() argument 387 BOOST_ASSERT(host_ptr != 0); in enqueue_read_buffer_rect() 402 host_ptr, in enqueue_read_buffer_rect() 429 void *host_ptr, in enqueue_read_buffer_rect_async() argument [all …]
|
/third_party/mindspore/mindspore/core/ir/ |
D | device_sync.h | 35 virtual bool SyncDeviceToHost(size_t size, void *host_ptr) const { return true; } in SyncDeviceToHost() argument 36 virtual bool SyncHostToDevice(size_t size, const void *host_ptr) const { return true; } in SyncHostToDevice() argument 39 …virtual bool SyncDeviceToHost(const ShapeVector &shape, size_t size, TypeId type, void *host_ptr) … 40 …ual bool SyncHostToDevice(const ShapeVector &shape, size_t size, TypeId type, const void *host_ptr,
|
/third_party/boost/libs/compute/include/boost/compute/image/ |
D | image2d.hpp | 56 void *host_ptr = 0, in image2d() argument 82 host_ptr, in image2d() 91 host_ptr, in image2d() 107 void *host_ptr = 0) in image2d() argument 132 host_ptr, in image2d() 141 host_ptr, in image2d()
|
D | image3d.hpp | 51 void *host_ptr = 0, in image3d() argument 78 host_ptr, in image3d() 89 host_ptr, in image3d() 107 void *host_ptr = 0) in image3d() argument 132 host_ptr, in image3d() 143 host_ptr, in image3d()
|
/third_party/boost/boost/compute/image/ |
D | image2d.hpp | 56 void *host_ptr = 0, in image2d() argument 82 host_ptr, in image2d() 91 host_ptr, in image2d() 107 void *host_ptr = 0) in image2d() argument 132 host_ptr, in image2d() 141 host_ptr, in image2d()
|
D | image3d.hpp | 51 void *host_ptr = 0, in image3d() argument 78 host_ptr, in image3d() 89 host_ptr, in image3d() 107 void *host_ptr = 0) in image3d() argument 132 host_ptr, in image3d() 143 host_ptr, in image3d()
|
/third_party/ffmpeg/libavfilter/ |
D | opencl.h | 197 #define CL_CREATE_BUFFER_FLAGS(ctx, buffer_name, flags, size, host_ptr) do { \ argument 202 host_ptr, \ 214 #define CL_BLOCKING_WRITE_BUFFER(queue, buffer, size, host_ptr, event) do { \ argument 221 host_ptr, \
|