From 33b75f298cf9a1cf54f7f292904bb988770ed9bd Mon Sep 17 00:00:00 2001 From: Ioana Ciocoi-Radulescu Date: Fri, 24 Apr 2026 12:38:01 +0300 Subject: [PATCH] teflon: Add a name field to pipe_tensor Signed-off-by: Ioana Ciocoi-Radulescu --- src/gallium/frontends/teflon/tfl_device.c | 2 ++ src/gallium/include/pipe/p_state.h | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/gallium/frontends/teflon/tfl_device.c b/src/gallium/frontends/teflon/tfl_device.c index 15069ffa38a..ff48137b197 100644 --- a/src/gallium/frontends/teflon/tfl_device.c +++ b/src/gallium/frontends/teflon/tfl_device.c @@ -408,6 +408,8 @@ fill_tensor(struct teflon_delegate *delegate, TfLiteContext *tf_context, struct tensor->dims[out_dim] = 1; } + tensor->name = strdup(tf_tensor.name); + if (tf_tensor.quantization.type == kTfLiteAffineQuantization) { const TfLiteAffineQuantization *quant = (const TfLiteAffineQuantization *)tf_tensor.quantization.params; tensor->scale = quant->scale->data[0]; diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index 45f625d110c..2305802d0d2 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -1039,6 +1039,10 @@ struct pipe_tensor { * Zero-points used to quantize this tensor, per-axis quantization. */ int *zero_points; + /** + * Tensor name + */ + const char *name; /** * Whether the tensor contains data in INT8 or UINT8 format. */