From 9409595c325dae8ec19861ed6081931cf3e6bb81 Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Thu, 10 Apr 2025 17:42:35 +0200 Subject: [PATCH] etnaviv/ml: All tensors are now 4D, adapt to it After "teflon: Set unused dimensions to 1", all tensors have 4 dimensions, so change the dim index accordingly. Part-of: --- src/gallium/drivers/etnaviv/etnaviv_ml_nn.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_ml_nn.c b/src/gallium/drivers/etnaviv/etnaviv_ml_nn.c index 897a48a0351..657957ca4cb 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_ml_nn.c +++ b/src/gallium/drivers/etnaviv/etnaviv_ml_nn.c @@ -807,7 +807,7 @@ etna_ml_lower_fully_connected(struct etna_ml_subgraph *subgraph, operation->stride = 1; operation->input_count = 1; - operation->input_width = poperation->input_tensors[0]->dims[1]; + operation->input_width = poperation->input_tensors[0]->dims[3]; operation->input_height = 1; operation->input_channels = 1; operation->input_zero_point = etna_tensor_zero_point(poperation->input_tensors[0]); @@ -819,7 +819,7 @@ etna_ml_lower_fully_connected(struct etna_ml_subgraph *subgraph, operation->output_count = 1; operation->output_width = 1; operation->output_height = 1; - operation->output_channels = poperation->output_tensors[0]->dims[1]; + operation->output_channels = poperation->output_tensors[0]->dims[3]; operation->output_zero_point = etna_tensor_zero_point(poperation->output_tensors[0]); operation->output_scale = poperation->output_tensors[0]->scale; operation->output_tensor_sizes[0] = operation->output_width * @@ -827,7 +827,7 @@ etna_ml_lower_fully_connected(struct etna_ml_subgraph *subgraph, operation->output_channels; pipe_resource_reference(&operation->weight_tensor, poperation->conv.weight_tensor->resource); - operation->weight_width = poperation->conv.weight_tensor->dims[1]; + operation->weight_width = poperation->conv.weight_tensor->dims[3]; operation->weight_height = 1; operation->weight_zero_point = poperation->conv.weight_tensor->zero_point; operation->weight_scale = poperation->conv.weight_tensor->scale;