Home
last modified time | relevance | path

Searched refs:img_size (Results 1 – 25 of 29) sorted by relevance

12

/third_party/mindspore/mindspore/lite/src/runtime/gpu/opencl/
Dopencl_allocator.cc49 void *OpenCLAllocator::MinimumFit(MemType mem_type, size_t size, const ImageSize &img_size) { in MinimumFit() argument
56 is_match &= mem_buf->img_size_ == img_size; in MinimumFit()
97 int OpenCLAllocator::CreateImage2D(size_t size, const ImageSize &img_size, void *data, size_t flags… in CreateImage2D() argument
104 …cl_image_desc desc = {CL_MEM_OBJECT_IMAGE2D, img_size.width, img_size.height, 0, 0, 0, 0, 0, 0, (*… in CreateImage2D()
106 cl_image_format image_format{CL_RGBA, static_cast<uint32_t>(img_size.dtype)}; in CreateImage2D()
109 cl::ImageFormat image_format(CL_RGBA, img_size.dtype); in CreateImage2D()
111 … image_format, img_size.width, img_size.height, 0, data, &ret); in CreateImage2D()
127 …MS_LOG(DEBUG) << "Malloc a new Image2D, width=" << img_size.width << ", height=" << img_size.heigh… in CreateImage2D()
130 std::vector<size_t> region{img_size.width, img_size.height, 1}; in CreateImage2D()
149 int OpenCLAllocator::GetImgDtypeSize(const ImageSize &img_size) { in GetImgDtypeSize() argument
[all …]
Dopencl_allocator.h65 …void *Malloc(const ImageSize &img_size, void *data = nullptr) { return _Malloc(MemType::IMG, data,…
79 int GetImageSize(void *host_ptr, ImageSize *img_size);
90 void *MinimumFit(MemType mem_type, size_t size, const ImageSize &img_size);
91 …void *_Malloc(MemType mem_type, void *data, size_t size = 0, const ImageSize &img_size = ImageSize…
93 …int CreateImage2D(size_t size, const ImageSize &img_size, void *data, size_t flags, bool is_map, c…
95 int GetImgDtypeSize(const ImageSize &img_size);
Dopencl_runtime.cc532 ImageSize img_size; in ReadOrWriteImage() local
533 int ret = allocator_->GetImageSize(buffer, &img_size); in ReadOrWriteImage()
539 cl::array<size_t, 3> region = {img_size.width, img_size.height, 1}; in ReadOrWriteImage()
/third_party/mindspore/mindspore/lite/src/runtime/kernel/opencl/kernel/
Dscale.cc95 ImageSize img_size; in InitWeights() local
96 GetImageSize(0, &img_size); in InitWeights()
97 img_size.dtype = scale_dtype == kNumberTypeFloat16 ? CL_HALF_FLOAT : CL_FLOAT; in InitWeights()
102 img_size.height = 1; in InitWeights()
103 img_size.width = UP_DIV(scale_tensor->shape()[0], C4NUM); in InitWeights()
104 scale_ptr_ = allocator->Malloc(img_size, scale_tensor->data()); in InitWeights()
109 offset_ptr_ = allocator->Malloc(img_size, offset_tensor->data()); in InitWeights()
Dfill.cc35 ImageSize img_size; in RunFill() local
40 if (allocator_->GetImageSize(src_data, &img_size) != RET_OK) { in RunFill()
45 auto region = cl::array<cl::size_type, 3U>{img_size.width, img_size.height, 1}; in RunFill()
Dstrassen.cc65 …ImageSize img_size{static_cast<size_t>(UP_DIV(NumA, C4NUM)), static_cast<size_t>(NumA), img_dtype}; in AllocatorMemoryForStrassen() local
74 A_temp[depth] = allocator->Malloc(img_size); in AllocatorMemoryForStrassen()
79 M1[depth] = allocator->Malloc(img_size); in AllocatorMemoryForStrassen()
84 M2[depth] = allocator->Malloc(img_size); in AllocatorMemoryForStrassen()
89 M3[depth] = allocator->Malloc(img_size); in AllocatorMemoryForStrassen()
94 M4[depth] = allocator->Malloc(img_size); in AllocatorMemoryForStrassen()
99 M5[depth] = allocator->Malloc(img_size); in AllocatorMemoryForStrassen()
104 M6[depth] = allocator->Malloc(img_size); in AllocatorMemoryForStrassen()
109 M7[depth] = allocator->Malloc(img_size); in AllocatorMemoryForStrassen()
Dconcat.cc35 ImageSize img_size; in RunAxis0() local
42 if (allocator_->GetImageSize(src_data, &img_size) != RET_OK) { in RunAxis0()
47 auto region = cl::array<cl::size_type, 3U>{img_size.width, img_size.height, 1}; in RunAxis0()
217 ImageSize img_size{in_shape.width, in_shape.height, dtype}; in ConvertWeightToTensor() local
218 auto weight_ptr_ = allocator->Malloc(img_size, weight.data()); in ConvertWeightToTensor()
Dsplit.cc45 ImageSize img_size; in RunAxis0() local
46 if (allocator_->GetImageSize(dst_data, &img_size) != RET_OK) { in RunAxis0()
51 auto region = cl::array<cl::size_type, 3U>{img_size.width, img_size.height, 1}; in RunAxis0()
Dstack.cc33 ImageSize img_size; in RunAxis0() local
41 if (allocator_->GetImageSize(src_data, &img_size) != RET_OK) { in RunAxis0()
46 auto region = cl::array<cl::size_type, 3U>{img_size.width, img_size.height, 1}; in RunAxis0()
Dsparse_to_dense.cc36 ImageSize img_size; in InitOutputToDefault() local
41 if (allocator_->GetImageSize(src_data, &img_size) != RET_OK) { in InitOutputToDefault()
46 auto region = cl::array<cl::size_type, 3U>{img_size.width, img_size.height, 1}; in InitOutputToDefault()
Dfullconnection.cc218 ImageSize img_size{im_dst_x, im_dst_y, img_dtype}; in InitBias() local
219 bias_ = allocator->Malloc(img_size); in InitBias()
Darithmetic.cc99 ImageSize img_size{in_shape.width, in_shape.height, dtype}; in InitWeights() local
100 auto weight_ptr_ = allocator->Malloc(img_size, weight.data()); in InitWeights()
Dconv2d_transpose.cc250 ImageSize img_size{im_dst_x, im_dst_y, img_dtype}; in InitBias() local
251 bias_ = allocator->Malloc(img_size); in InitBias()
Dmatmul.cc220 lite::opencl::ImageSize img_size{im_dst_x, im_dst_y, img_dtype}; in InitBias() local
221 bias_ = allocator->Malloc(img_size); in InitBias()
Ddepthwise_conv2d.cc158 ImageSize img_size{(size_t)plane_out / C4NUM, (size_t)out_info.N * CO4, img_dtype}; in InitWeights() local
159 packed_weight_ = allocator->Malloc(img_size, temp_filter.data()); in InitWeights()
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/gpu/cuda_impl/
Dbias_add_grad_impl.cu102 int img_size = h * w; in BiasAddGradNCHW() local
104 int count = batch * img_size; in BiasAddGradNCHW()
109 int img_offset = i % img_size; in BiasAddGradNCHW()
110 int img_id = i / img_size; in BiasAddGradNCHW()
111 T val = *(dy + (img_id * bias_size + bg_offset) * img_size + img_offset); in BiasAddGradNCHW()
/third_party/mindspore/tests/st/fl/cross_silo_femnist/
Dtest_cross_silo_femnist.py235 def create_dataset_from_folder(data_path, img_size, batch_size=32, repeat_size=1, num_parallel_work… argument
248 resize_height, resize_width = img_size[0], img_size[1]
272 def evalute_process(model, eval_data, img_size, batch_size): argument
274 ds_eval = create_dataset_from_folder(eval_data, img_size, batch_size)
317 …dataset = create_dataset_from_folder(train_path, args.img_size, args.client_batch_size, args.repea…
344 train_acc, _ = evalute_process(model, train_path, args.img_size, args.client_batch_size)
345 test_acc, _ = evalute_process(model, test_path, args.img_size, args.client_batch_size)
/third_party/mindspore/mindspore/lite/src/runtime/kernel/opencl/
Dopencl_kernel.cc61 int OpenCLKernel::GetImageSize(size_t idx, lite::opencl::ImageSize *img_size) { in GetImageSize() argument
62 MS_ASSERT(img_size); in GetImageSize()
90 *img_size = {img_info.width, img_info.height, img_dtype}; in GetImageSize()
166 ImageSize img_size; in PreProcess() local
167 ret = GetImageSize(i, &img_size); in PreProcess()
173 …output->allocator()->Malloc(img_size.width, img_size.height, static_cast<enum DataType>(output->da… in PreProcess()
/third_party/mesa3d/src/gallium/drivers/r600/sfn/
Dsfn_nir_legalize_image_load_store.cpp83 auto img_size = nir_image_size(b, num_components, 32, ir->src[0].ssa, nir_imm_int(b, 0), in r600_legalize_image_load_store_impl() local
94 nir_channels(b, img_size, mask)); in r600_legalize_image_load_store_impl()
/third_party/ffmpeg/libavcodec/
Dtarga.c253 size_t img_size = w * ((bpp + 1) >> 3); in decode_frame() local
255 if (bytestream2_get_bytes_left(&s->gb) < img_size * h) { in decode_frame()
264 bytestream2_get_buffer(&s->gb, line, img_size); in decode_frame()
/third_party/gstreamer/gstplugins_good/sys/v4l2/
Dgstv4l2allocator.c249 gsize img_size, buf_size; in gst_v4l2_memory_group_new() local
281 img_size = obj->format.fmt.pix_mp.plane_fmt[i].sizeimage; in gst_v4l2_memory_group_new()
283 if (buf_size < img_size) in gst_v4l2_memory_group_new()
287 img_size = obj->format.fmt.pix.sizeimage; in gst_v4l2_memory_group_new()
289 if (buf_size < img_size) in gst_v4l2_memory_group_new()
337 buf_size, img_size); in gst_v4l2_memory_group_new()
1162 GstV4l2MemoryGroup * group, gsize img_size, int n_planes, in gst_v4l2_allocator_import_userptr() argument
1182 maxsize = psize = img_size; in gst_v4l2_allocator_import_userptr()
1184 g_assert (psize <= img_size); in gst_v4l2_allocator_import_userptr()
Dgstv4l2allocator.h148 gsize img_size, int n_planes,
/third_party/mindspore/mindspore/lite/src/runtime/kernel/opencl/kernel/int8/
Darithmetic_int8.cc100 ImageSize img_size{in_shape.width, in_shape.height, dtype}; in InitWeights() local
101 auto weight_ptr_ = allocator->Malloc(img_size, weight.data()); in InitWeights()
/third_party/e2fsprogs/lib/ext2fs/
Dsparse_io.c130 uint64_t img_size; in io_manager_configure() local
153 img_size = (uint64_t)sm->block_size * sm->blocks_count; in io_manager_configure()
156 sm->sparse_file = sparse_file_new(sm->block_size, img_size); in io_manager_configure()
/third_party/mesa3d/src/intel/vulkan/
Danv_android.c628 uint64_t img_size = image->bindings[ANV_IMAGE_MEMORY_BINDING_MAIN].memory_range.size; in anv_image_bind_from_gralloc() local
629 if (img_size < bo->size) { in anv_image_bind_from_gralloc()
633 bo->size, img_size); in anv_image_bind_from_gralloc()

12