teflon: Add quantize operation

Add the plumbing for quantize 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-08 15:31:51 -05:00 committed by Marge Bot
parent 2fe1301e5e
commit e6f4f6aa5d
2 changed files with 8 additions and 0 deletions

View file

@ -294,6 +294,10 @@ fill_operation(struct teflon_delegate *delegate, TfLiteContext *tf_context, TfLi
operation->type = PIPE_ML_OPERATION_TYPE_RESIZE;
break;
}
case kTfLiteBuiltinQuantize: {
operation->type = PIPE_ML_OPERATION_TYPE_QUANTIZE;
break;
}
default:
return false;
}
@ -514,6 +518,9 @@ dump_graph(struct pipe_tensor *tensors, unsigned tensor_count, struct pipe_ml_op
case PIPE_ML_OPERATION_TYPE_MUL:
teflon_debug("%-15s ", "MUL");
break;
case PIPE_ML_OPERATION_TYPE_QUANTIZE:
teflon_debug("%-15s ", "QUANT");
break;
case PIPE_ML_OPERATION_TYPE_LEAKY_RELU:
teflon_debug("%-15s ", "LEAKY_RELU");
break;

View file

@ -1069,6 +1069,7 @@ enum pipe_ml_operation_type {
PIPE_ML_OPERATION_TYPE_RESIZE,
PIPE_ML_OPERATION_TYPE_MUL,
PIPE_ML_OPERATION_TYPE_LEAKY_RELU,
PIPE_ML_OPERATION_TYPE_QUANTIZE,
};
enum pipe_ml_pooling_type {