• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023-2024 Tomeu Vizoso <tomeu@tomeuvizoso.net>
3  * SPDX-License-Identifier: MIT
4  */
5 
6 #include "etnaviv_ml.h"
7 #include "etnaviv_context.h"
8 
9 void
10 etna_ml_calc_addition_sizes(unsigned *input_width, unsigned *input_height, unsigned *input_channels,
11                             unsigned *output_width, unsigned *output_height, unsigned *output_channels);
12 
13 unsigned
14 etna_ml_calculate_tiling_v7(struct etna_context *ctx, const struct etna_operation *operation, unsigned *tile_width_out, unsigned *tile_height_out);
15 
16 struct etna_bo *
17 etna_ml_create_coeffs_v7(struct etna_ml_subgraph *subgraph, const struct etna_operation *operation, unsigned *cache_size);
18 
19 unsigned
20 etna_ml_calculate_tiling_v8(struct etna_context *ctx, const struct etna_operation *operation, unsigned *tile_width_out, unsigned *tile_height_out);
21 
22 struct etna_bo *
23 etna_ml_create_coeffs_v8(struct etna_ml_subgraph *subgraph, const struct etna_operation *operation, unsigned *cache_size);
24 
25 void
26 etna_ml_lower_convolution(struct etna_ml_subgraph *subgraph,
27                           const struct pipe_ml_operation *poperation,
28                           struct etna_operation *operation);
29 
30 void
31 etna_ml_lower_add(struct etna_ml_subgraph *subgraph,
32                   const struct pipe_ml_operation *poperation,
33                   struct etna_operation *operation);
34 
35 void
36 etna_ml_lower_fully_connected(struct etna_ml_subgraph *subgraph,
37                               const struct pipe_ml_operation *poperation,
38                               struct etna_operation *operation);
39 
40 void
41 etna_ml_compile_operation_nn(struct etna_ml_subgraph *subgraph,
42                              const struct etna_operation *operation,
43                              struct etna_vip_instruction *instruction);
44 
45 void
46 etna_ml_emit_operation_nn(struct etna_ml_subgraph *subgraph,
47                           struct etna_vip_instruction *operation,
48                           unsigned idx);
49