Skip to content

Commit 0a1629d

Browse files
authored
Merge pull request #477 from foss-for-synopsys-dwc-arc-processors/exmpl_har_vpx_fix
[Examples][HAR] Rework example to align with Lib changes
2 parents 39cc0bd + e9ff248 commit 0a1629d

File tree

6 files changed

+662
-1171
lines changed

6 files changed

+662
-1171
lines changed

examples/auxiliary/examples_aux.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,9 @@ static inline int arg_max(mli_tensor * net_output_) {
342342
};
343343

344344
int pred_label = 0;
345-
mli_tensor out_tensor;
345+
mli_tensor out_tensor = { 0 };
346346
out_tensor.data.mem.pi32 = &pred_label;
347+
out_tensor.data.capacity = sizeof(pred_label);
347348
out_tensor.el_type = MLI_EL_SA_32;
348349
out_tensor.rank = 2;
349350
out_tensor.shape[0] = 1;

examples/example_har_smartphone/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ set(EXAMPLE_FLAGS
2020
-Hnocopyr
2121
-Hpurge
2222
-Hheap=8K
23-
-Hstack=1K
23+
-Hstack=3K
2424
-e_start
2525
-Bgrouplib
2626
-Hldopt=-q

examples/example_har_smartphone/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ configuration define and listed in table below. Before compiling application for
117117
| Data | MODEL_BIT_DEPTH=8 | MODEL_BIT_DEPTH=816 | MODEL_BIT_DEPTH=16 |
118118
| :-----------------------------------------------: | :-------------------: | :-------------------: | :------------------: |
119119
| Weights <br/>(*.mli_model* section) | 18040 bytes | 17160 bytes | 34316 bytes |
120-
| Activations <br/>(*.Xdata* and *.Ydata* sections) | 29824 bytes | 18752 bytes | 18752 bytes |
121-
| Structures <br/>(*.mli_data* section) | 1540 bytes | 1220 bytes | 1220 bytes |
120+
| Activations <br/>(*.Xdata* and *.Ydata* sections) | 14880 bytes | 18752 bytes | 18752 bytes |
122121

123122
By default, application uses MODEL_BIT_DEPTH=16 mode. Application code size depends on target hardware configuration and compilation flags. MLI Library code is wrapped into mli_lib section.
124123

0 commit comments

Comments
 (0)