• Home
  • Raw
  • Download

Lines Matching refs:argmax_pooling_op

55   xnn_operator_t argmax_pooling_op = NULL;  in xnn_create_argmax_pooling2d_nhwc_f32()  local
119 argmax_pooling_op = xnn_allocate_zero_simd_memory(sizeof(struct xnn_operator)); in xnn_create_argmax_pooling2d_nhwc_f32()
120 if (argmax_pooling_op == NULL) { in xnn_create_argmax_pooling2d_nhwc_f32()
127 argmax_pooling_op->padding_top = input_padding_top; in xnn_create_argmax_pooling2d_nhwc_f32()
128 argmax_pooling_op->padding_right = input_padding_right; in xnn_create_argmax_pooling2d_nhwc_f32()
129 argmax_pooling_op->padding_bottom = input_padding_bottom; in xnn_create_argmax_pooling2d_nhwc_f32()
130 argmax_pooling_op->padding_left = input_padding_left; in xnn_create_argmax_pooling2d_nhwc_f32()
132 argmax_pooling_op->kernel_height = pooling_height; in xnn_create_argmax_pooling2d_nhwc_f32()
133 argmax_pooling_op->kernel_width = pooling_width; in xnn_create_argmax_pooling2d_nhwc_f32()
134 argmax_pooling_op->stride_height = pooling_height; in xnn_create_argmax_pooling2d_nhwc_f32()
135 argmax_pooling_op->stride_width = pooling_width; in xnn_create_argmax_pooling2d_nhwc_f32()
136 argmax_pooling_op->dilation_height = 1; in xnn_create_argmax_pooling2d_nhwc_f32()
137 argmax_pooling_op->dilation_width = 1; in xnn_create_argmax_pooling2d_nhwc_f32()
138 argmax_pooling_op->channels = channels; in xnn_create_argmax_pooling2d_nhwc_f32()
139 argmax_pooling_op->input_pixel_stride = input_pixel_stride; in xnn_create_argmax_pooling2d_nhwc_f32()
140 argmax_pooling_op->output_pixel_stride = output_pixel_stride; in xnn_create_argmax_pooling2d_nhwc_f32()
142 argmax_pooling_op->type = xnn_operator_type_argmax_pooling_nhwc_f32; in xnn_create_argmax_pooling2d_nhwc_f32()
143 argmax_pooling_op->flags = flags; in xnn_create_argmax_pooling2d_nhwc_f32()
145 argmax_pooling_op->state = xnn_run_state_invalid; in xnn_create_argmax_pooling2d_nhwc_f32()
147 *argmax_pooling_op_out = argmax_pooling_op; in xnn_create_argmax_pooling2d_nhwc_f32()
151 xnn_delete_operator(argmax_pooling_op); in xnn_create_argmax_pooling2d_nhwc_f32()
156 xnn_operator_t argmax_pooling_op, in xnn_setup_argmax_pooling2d_nhwc_f32() argument
165 if (argmax_pooling_op->type != xnn_operator_type_argmax_pooling_nhwc_f32) { in xnn_setup_argmax_pooling2d_nhwc_f32()
168 xnn_operator_type_to_string(argmax_pooling_op->type)); in xnn_setup_argmax_pooling2d_nhwc_f32()
171 argmax_pooling_op->state = xnn_run_state_invalid; in xnn_setup_argmax_pooling2d_nhwc_f32()
187 argmax_pooling_op->state = xnn_run_state_skip; in xnn_setup_argmax_pooling2d_nhwc_f32()
191 argmax_pooling_op->batch_size = batch_size; in xnn_setup_argmax_pooling2d_nhwc_f32()
192 argmax_pooling_op->input_height = input_height; in xnn_setup_argmax_pooling2d_nhwc_f32()
193 argmax_pooling_op->input_width = input_width; in xnn_setup_argmax_pooling2d_nhwc_f32()
194 argmax_pooling_op->input = input; in xnn_setup_argmax_pooling2d_nhwc_f32()
196 const size_t pooling_height = argmax_pooling_op->kernel_height; in xnn_setup_argmax_pooling2d_nhwc_f32()
197 const size_t pooling_width = argmax_pooling_op->kernel_width; in xnn_setup_argmax_pooling2d_nhwc_f32()
199 if (argmax_pooling_op->flags & XNN_FLAG_TENSORFLOW_SAME_PADDING) { in xnn_setup_argmax_pooling2d_nhwc_f32()
200 argmax_pooling_op->output_height = divide_round_up(input_height, pooling_height); in xnn_setup_argmax_pooling2d_nhwc_f32()
201 argmax_pooling_op->output_width = divide_round_up(input_width, pooling_width); in xnn_setup_argmax_pooling2d_nhwc_f32()
203 … const uint32_t padding_height = argmax_pooling_op->output_height * pooling_height - input_height; in xnn_setup_argmax_pooling2d_nhwc_f32()
204 const uint32_t padding_width = argmax_pooling_op->output_width * pooling_width - input_width; in xnn_setup_argmax_pooling2d_nhwc_f32()
205 argmax_pooling_op->padding_top = padding_height / 2; in xnn_setup_argmax_pooling2d_nhwc_f32()
206 argmax_pooling_op->padding_left = padding_width / 2; in xnn_setup_argmax_pooling2d_nhwc_f32()
207 argmax_pooling_op->padding_bottom = padding_height - argmax_pooling_op->padding_top; in xnn_setup_argmax_pooling2d_nhwc_f32()
208 argmax_pooling_op->padding_right = padding_width - argmax_pooling_op->padding_left; in xnn_setup_argmax_pooling2d_nhwc_f32()
210 argmax_pooling_op->output_height = compute_output_dimension( in xnn_setup_argmax_pooling2d_nhwc_f32()
211 argmax_pooling_op->padding_top + input_height + argmax_pooling_op->padding_bottom, in xnn_setup_argmax_pooling2d_nhwc_f32()
212 argmax_pooling_op->kernel_height); in xnn_setup_argmax_pooling2d_nhwc_f32()
213 argmax_pooling_op->output_width = compute_output_dimension( in xnn_setup_argmax_pooling2d_nhwc_f32()
214 argmax_pooling_op->padding_left + input_width + argmax_pooling_op->padding_right, in xnn_setup_argmax_pooling2d_nhwc_f32()
215 argmax_pooling_op->kernel_width); in xnn_setup_argmax_pooling2d_nhwc_f32()
219 const size_t output_height = argmax_pooling_op->output_height; in xnn_setup_argmax_pooling2d_nhwc_f32()
220 const size_t output_width = argmax_pooling_op->output_width; in xnn_setup_argmax_pooling2d_nhwc_f32()
227 if (input_height != argmax_pooling_op->last_input_height || in xnn_setup_argmax_pooling2d_nhwc_f32()
228 input_width != argmax_pooling_op->last_input_width) in xnn_setup_argmax_pooling2d_nhwc_f32()
234 …(const void**) xnn_reallocate_memory(argmax_pooling_op->indirection_buffer, indirection_buffer_siz… in xnn_setup_argmax_pooling2d_nhwc_f32()
241 argmax_pooling_op->indirection_buffer = indirection_buffer; in xnn_setup_argmax_pooling2d_nhwc_f32()
243 …xnn_indirection_init_maxpool2d(argmax_pooling_op, step_height, step_width, 2 /* log2(sizeof(float)… in xnn_setup_argmax_pooling2d_nhwc_f32()
245 argmax_pooling_op->last_input = input; in xnn_setup_argmax_pooling2d_nhwc_f32()
246 argmax_pooling_op->last_input_height = input_height; in xnn_setup_argmax_pooling2d_nhwc_f32()
247 argmax_pooling_op->last_input_width = input_width; in xnn_setup_argmax_pooling2d_nhwc_f32()
250 const size_t channels = argmax_pooling_op->channels; in xnn_setup_argmax_pooling2d_nhwc_f32()
253 const size_t output_width_stride = argmax_pooling_op->output_pixel_stride * sizeof(float); in xnn_setup_argmax_pooling2d_nhwc_f32()
259 argmax_pooling_op->context.argmax_pooling = (struct argmax_pooling_context) { in xnn_setup_argmax_pooling2d_nhwc_f32()
260 .indirect_input = argmax_pooling_op->indirection_buffer, in xnn_setup_argmax_pooling2d_nhwc_f32()
262 .input_offset = (size_t) ((uintptr_t) input - (uintptr_t) argmax_pooling_op->last_input), in xnn_setup_argmax_pooling2d_nhwc_f32()
263 ….input_batch_stride = input_height * input_width * argmax_pooling_op->input_pixel_stride * sizeof(… in xnn_setup_argmax_pooling2d_nhwc_f32()
276 argmax_pooling_op->compute.type = xnn_parallelization_type_2d; in xnn_setup_argmax_pooling2d_nhwc_f32()
277 argmax_pooling_op->compute.range[0] = batch_size; in xnn_setup_argmax_pooling2d_nhwc_f32()
278 argmax_pooling_op->compute.range[1] = output_height; in xnn_setup_argmax_pooling2d_nhwc_f32()
281 argmax_pooling_op->context.argmax_pooling.unipass_ukernel = ukernel->up; in xnn_setup_argmax_pooling2d_nhwc_f32()
282 argmax_pooling_op->compute.task_2d = (pthreadpool_task_2d_t) xnn_compute_argmax_pooling_unipass; in xnn_setup_argmax_pooling2d_nhwc_f32()
284 argmax_pooling_op->context.argmax_pooling.multipass_ukernel = ukernel->mp; in xnn_setup_argmax_pooling2d_nhwc_f32()
285argmax_pooling_op->compute.task_2d = (pthreadpool_task_2d_t) xnn_compute_argmax_pooling_multipass; in xnn_setup_argmax_pooling2d_nhwc_f32()
287 argmax_pooling_op->state = xnn_run_state_ready; in xnn_setup_argmax_pooling2d_nhwc_f32()