27void evalQuantized(
const circle::Tensor *x,
const circle::Tensor *y,
const circle::Tensor *output,
30 auto x_data = kernels::getTensorData<uint8_t>(runtime_graph->getDataByTensor(x));
31 if (x_data ==
nullptr)
32 x_data = kernels::getTensorData<uint8_t>(runtime_graph->getConstDataByTensor(x));
34 assert(x_data !=
nullptr);
36 auto y_data = kernels::getTensorData<uint8_t>(runtime_graph->getDataByTensor(y));
37 if (y_data ==
nullptr)
38 y_data = kernels::getTensorData<uint8_t>(runtime_graph->getConstDataByTensor(y));
40 assert(y_data !=
nullptr);
42 auto output_data = kernels::getTensorData<bool>(runtime_graph->getDataByTensor(output));
61 op_params.
is_broadcast = Tensor::num_elements(x) != Tensor::num_elements(y);
65 luci_interpreter_pal::BroadcastComparison4DSlowWithScaling<uint8_t>(
72 luci_interpreter_pal::ComparisonWithScaling<uint8_t>(op_params, flat_size, x_data, y_data,
85 Tensor::element_type(kernel.
input2()));
93 switch (Tensor::element_type(kernel.
input1()))
96 kernels::evalComparisonGeneric<int64_t>(kernel.
input1(), kernel.
input2(), kernel.
output(),
100 kernels::evalComparisonGeneric<int32_t>(kernel.
input1(), kernel.
input2(), kernel.
output(),
109 case DataType::FLOAT32:
110 kernels::evalComparisonGeneric<float>(kernel.
input1(), kernel.
input2(), kernel.
output(),
115 assert(
false &&
"Unsupported type.");
const circle::Tensor * output() const
const circle::Tensor * input2() const
const circle::Tensor * input1() const
#define LUCI_INTERPRETER_CHECK(cond)
tflite::RuntimeShape getTensorShape(const Tensor *tensor)
void quantizeMultiplierSmallerThanOneExp(double double_multiplier, int32_t *quantized_multiplier, int *left_shift)
bool LessFn(T lhs, T rhs)
void configure_kernel_CircleLess(const circle::Operator *cur_op, BaseRuntimeGraph *runtime_graph)
void execute_kernel_CircleLess(const circle::Operator *cur_op, BaseRuntimeGraph *runtime_graph)
RuntimeGraph BaseRuntimeGraph
int32_t input2_multiplier
int32_t input1_multiplier