Lines Matching refs:sigmoid_op
34 xnn_operator_t sigmoid_op = NULL; in xnn_create_sigmoid_nc_qu8() local
107 sigmoid_op = xnn_allocate_zero_simd_memory(sizeof(struct xnn_operator)); in xnn_create_sigmoid_nc_qu8()
108 if (sigmoid_op == NULL) { in xnn_create_sigmoid_nc_qu8()
115 sigmoid_op->lookup_table = xnn_allocate_simd_memory(256 * sizeof(uint8_t)); in xnn_create_sigmoid_nc_qu8()
116 if (sigmoid_op->lookup_table == NULL) { in xnn_create_sigmoid_nc_qu8()
123 uint8_t* lookup_table = sigmoid_op->lookup_table; in xnn_create_sigmoid_nc_qu8()
139 sigmoid_op->channels = channels; in xnn_create_sigmoid_nc_qu8()
140 sigmoid_op->input_pixel_stride = input_stride; in xnn_create_sigmoid_nc_qu8()
141 sigmoid_op->output_pixel_stride = output_stride; in xnn_create_sigmoid_nc_qu8()
143 sigmoid_op->type = xnn_operator_type_sigmoid_nc_qu8; in xnn_create_sigmoid_nc_qu8()
145 sigmoid_op->state = xnn_run_state_invalid; in xnn_create_sigmoid_nc_qu8()
147 *sigmoid_op_out = sigmoid_op; in xnn_create_sigmoid_nc_qu8()
151 xnn_delete_operator(sigmoid_op); in xnn_create_sigmoid_nc_qu8()
156 xnn_operator_t sigmoid_op, in xnn_setup_sigmoid_nc_qu8() argument
162 if (sigmoid_op->type != xnn_operator_type_sigmoid_nc_qu8) { in xnn_setup_sigmoid_nc_qu8()
165 xnn_operator_type_to_string(sigmoid_op->type)); in xnn_setup_sigmoid_nc_qu8()
168 sigmoid_op->state = xnn_run_state_invalid; in xnn_setup_sigmoid_nc_qu8()
177 sigmoid_op->state = xnn_run_state_skip; in xnn_setup_sigmoid_nc_qu8()
181 sigmoid_op->batch_size = batch_size; in xnn_setup_sigmoid_nc_qu8()
182 sigmoid_op->input = input; in xnn_setup_sigmoid_nc_qu8()
183 sigmoid_op->output = output; in xnn_setup_sigmoid_nc_qu8()
185 const size_t channels = sigmoid_op->channels; in xnn_setup_sigmoid_nc_qu8()
186 const size_t input_stride = sigmoid_op->input_pixel_stride; in xnn_setup_sigmoid_nc_qu8()
187 const size_t output_stride = sigmoid_op->output_pixel_stride; in xnn_setup_sigmoid_nc_qu8()
190 sigmoid_op->context.lut_contiguous = (struct lut_contiguous_context) { in xnn_setup_sigmoid_nc_qu8()
193 .t = sigmoid_op->lookup_table, in xnn_setup_sigmoid_nc_qu8()
198 sigmoid_op->compute.type = xnn_parallelization_type_1d_tile_1d; in xnn_setup_sigmoid_nc_qu8()
199 … sigmoid_op->compute.task_1d_tile_1d = (pthreadpool_task_1d_tile_1d_t) xnn_compute_lut_contiguous; in xnn_setup_sigmoid_nc_qu8()
200 sigmoid_op->compute.range[0] = batch_size * channels * sizeof(uint8_t); in xnn_setup_sigmoid_nc_qu8()
201 sigmoid_op->compute.tile[0] = block_size; in xnn_setup_sigmoid_nc_qu8()
203 sigmoid_op->context.lut_strided = (struct lut_strided_context) { in xnn_setup_sigmoid_nc_qu8()
207 .t = sigmoid_op->lookup_table, in xnn_setup_sigmoid_nc_qu8()
212 sigmoid_op->compute.type = xnn_parallelization_type_1d; in xnn_setup_sigmoid_nc_qu8()
213 sigmoid_op->compute.task_1d = (pthreadpool_task_1d_t) xnn_compute_lut_strided; in xnn_setup_sigmoid_nc_qu8()
214 sigmoid_op->compute.range[0] = batch_size; in xnn_setup_sigmoid_nc_qu8()
215 sigmoid_op->compute.tile[0] = 0; in xnn_setup_sigmoid_nc_qu8()
217 sigmoid_op->state = xnn_run_state_ready; in xnn_setup_sigmoid_nc_qu8()