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. */