teflon: Add minimum and maximum operations

Add the plumbing for minimum and maximum operations.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39975>
This commit is contained in:
Rob Herring (Arm) 2026-04-09 07:53:13 -05:00 committed by Marge Bot
parent dce4b0313a
commit 03e29e2fa5
2 changed files with 18 additions and 0 deletions

View file

@ -182,6 +182,12 @@ fill_operation(struct teflon_delegate *delegate, TfLiteContext *tf_context, TfLi
}
break;
}
case kTfLiteBuiltinMaximum:
operation->type = PIPE_ML_OPERATION_TYPE_MAXIMUM;
break;
case kTfLiteBuiltinMinimum:
operation->type = PIPE_ML_OPERATION_TYPE_MINIMUM;
break;
case kTfLiteBuiltinMul:
operation->type = PIPE_ML_OPERATION_TYPE_MUL;
break;
@ -515,6 +521,12 @@ dump_graph(struct pipe_tensor *tensors, unsigned tensor_count, struct pipe_ml_op
case PIPE_ML_OPERATION_TYPE_RESIZE:
teflon_debug("%-15s ", "RESIZE");
break;
case PIPE_ML_OPERATION_TYPE_MAXIMUM:
teflon_debug("%-15s ", "MAX");
break;
case PIPE_ML_OPERATION_TYPE_MINIMUM:
teflon_debug("%-15s ", "MIN");
break;
case PIPE_ML_OPERATION_TYPE_MUL:
teflon_debug("%-15s ", "MUL");
break;
@ -723,6 +735,10 @@ tflite_builtin_op_name(TfLiteBuiltinOperator op)
return "DEQUANT";
case kTfLiteBuiltinHardSwish:
return "HSWISH";
case kTfLiteBuiltinMaximum:
return "MAX";
case kTfLiteBuiltinMinimum:
return "MIN";
case kTfLiteBuiltinMul:
return "MUL";
case kTfLiteBuiltinPad:

View file

@ -1070,6 +1070,8 @@ enum pipe_ml_operation_type {
PIPE_ML_OPERATION_TYPE_MUL,
PIPE_ML_OPERATION_TYPE_LEAKY_RELU,
PIPE_ML_OPERATION_TYPE_QUANTIZE,
PIPE_ML_OPERATION_TYPE_MAXIMUM,
PIPE_ML_OPERATION_TYPE_MINIMUM,
};
enum pipe_ml_pooling_type {