From e6f4f6aa5d7b4df94e7285dd3ab21da16edf4b07 Mon Sep 17 00:00:00 2001 From: "Rob Herring (Arm)" Date: Wed, 8 Apr 2026 15:31:51 -0500 Subject: [PATCH] teflon: Add quantize operation Add the plumbing for quantize operations. Signed-off-by: Rob Herring (Arm) Part-of: --- src/gallium/frontends/teflon/tfl_device.c | 7 +++++++ src/gallium/include/pipe/p_state.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/gallium/frontends/teflon/tfl_device.c b/src/gallium/frontends/teflon/tfl_device.c index cafbca920e5..0d7153d1877 100644 --- a/src/gallium/frontends/teflon/tfl_device.c +++ b/src/gallium/frontends/teflon/tfl_device.c @@ -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; diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index 0a19768ddcb..3e2224d24e4 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -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 {