45 const T *&cast_input_data2,
bool *&cast_output_data,
49 const circle::Tensor *input1 =
nullptr;
50 const circle::Tensor *input2 =
nullptr;
51 const circle::Tensor *output =
nullptr;
53 uint8_t *input_data1 =
nullptr;
54 uint8_t *input_data2 =
nullptr;
55 uint8_t *output_data =
nullptr;
57 input1 = runtime_kernel->
inputs[input1TensorIdx];
58 input2 = runtime_kernel->
inputs[input2TensorIdx];
59 output = runtime_kernel->
outputs[outputTensorIdx];
61 assert(input1 !=
nullptr);
62 assert(input2 !=
nullptr);
63 assert(output !=
nullptr);
65 input_data1 = runtime_kernel->
inputs_data[input1TensorIdx];
66 input_data2 = runtime_kernel->
inputs_data[input2TensorIdx];
67 output_data = runtime_kernel->
outputs_data[outputTensorIdx];
69 assert(input_data1 !=
nullptr);
70 assert(input_data2 !=
nullptr);
71 assert(output_data !=
nullptr);
73 cast_input_data1 = core::utils::castInputData<T>(input_data1);
74 cast_input_data2 = core::utils::castInputData<T>(input_data2);
75 cast_output_data = core::utils::castOutputData<bool>(output_data);
85 const T *cast_input_data1 =
nullptr;
86 const T *cast_input_data2 =
nullptr;
87 bool *cast_output_data =
nullptr;
93 readDataKernel(runtime_kernel, cast_input_data1, cast_input_data2, cast_output_data, input1_shape,
101 onert_micro::execute::pal::BroadcastComparison4DSlowNoScaling<T>(
102 op_params, input1_shape, cast_input_data1, input2_shape, cast_input_data2,
output_shape,
103 cast_output_data, F);
107 const int64_t flat_size = input1_shape.
flatSize();
108 onert_micro::execute::pal::ComparisonNoScaling<T>(flat_size, cast_input_data1, cast_input_data2,
109 cast_output_data, F);
116 const circle::Tensor *input1 =
nullptr;
117 const circle::Tensor *input2 =
nullptr;
118 const circle::Tensor *output =
nullptr;
120 input1 = runtime_kernel->
inputs[input1TensorIdx];
121 input2 = runtime_kernel->
inputs[input2TensorIdx];
122 output = runtime_kernel->
outputs[outputTensorIdx];
124 assert(input1 !=
nullptr);
125 assert(input2 !=
nullptr);
126 assert(output !=
nullptr);
128 const T *cast_input_data1 =
nullptr;
129 const T *cast_input_data2 =
nullptr;
130 bool *cast_output_data =
nullptr;
136 readDataKernel(runtime_kernel, cast_input_data1, cast_input_data2, cast_output_data, input1_shape,
139 assert(input1->quantization() !=
nullptr);
140 assert(input1->quantization()->scale() !=
nullptr);
141 assert(input1->quantization()->scale()->size() == 1);
142 assert(input1->quantization()->zero_point() !=
nullptr);
143 assert(input1->quantization()->zero_point()->size() == 1);
145 auto input1_scale = *input1->quantization()->scale()->begin();
146 auto input2_scale = *input2->quantization()->scale()->begin();
148 auto input1_zero_point = *input1->quantization()->zero_point()->begin();
149 auto input2_zero_point = *input2->quantization()->zero_point()->begin();
151 int32_t x_multiplier;
154 int32_t y_multiplier;
173 onert_micro::execute::pal::BroadcastComparison4DSlowWithScaling<T>(
174 op_params, input1_shape, cast_input_data1, input2_shape, cast_input_data2,
output_shape,
175 cast_output_data, F);
179 const int64_t flat_size = input1_shape.
flatSize();
180 onert_micro::execute::pal::ComparisonWithScaling<T>(op_params, flat_size, cast_input_data1,
181 cast_input_data2, cast_output_data, F);
void readDataKernel(OMRuntimeKernel *runtime_kernel, const T *&cast_input_data1, const T *&cast_input_data2, bool *&cast_output_data, core::OMRuntimeShape &input1_shape_ref, core::OMRuntimeShape &input2_shape_ref, core::OMRuntimeShape &output_shape_ref)