From 13a120d13cbca372b84494e68dcaff1887eb99be Mon Sep 17 00:00:00 2001
From: Philipp Zabel
Date: Thu, 28 Nov 2024 11:16:52 +0100
Subject: [PATCH] etnaviv/ml: Drop duplicated function
reorder_for_hw_depthwise()
This function is unused, remove it.
An identical copy is found (and used) in etnaviv_ml_nn.c.
Signed-off-by: Philipp Zabel
Part-of:
---
src/gallium/drivers/etnaviv/etnaviv_ml_nn_v8.c | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/src/gallium/drivers/etnaviv/etnaviv_ml_nn_v8.c b/src/gallium/drivers/etnaviv/etnaviv_ml_nn_v8.c
index f486f7994c7..8da575da69d 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_ml_nn_v8.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_ml_nn_v8.c
@@ -154,24 +154,6 @@ etna_ml_calculate_tiling_v8(struct etna_context *ctx, const struct etna_operatio
return superblocks;
}
-static void
-reorder_for_hw_depthwise(struct etna_ml_subgraph *subgraph, struct etna_operation *operation)
-{
- struct pipe_context *context = subgraph->base.context;
- uint8_t *input = map_resource(operation->weight_tensor);
- struct pipe_resource *output_res = etna_ml_create_resource(context, pipe_buffer_size(operation->weight_tensor));
- uint8_t (*output)[operation->weight_width * operation->weight_height] = (void *)map_resource(output_res);
-
- for (int i = 0; i < operation->weight_height * operation->weight_width * operation->output_channels; i++) {
- unsigned out_channel = i % operation->output_channels;
-
- output[out_channel][i / operation->output_channels] = input[i];
- }
-
- pipe_resource_reference(&operation->weight_tensor, NULL);
- operation->weight_tensor = output_res;
-}
-
struct bitstream {
unsigned bits_in_buffer;
uint64_t buffer;