Skip to content

Commit 8412383

Browse files
authored
Merge branch 'main' into fix_logging
2 parents e7f33c9 + a55367b commit 8412383

File tree

23 files changed

+1183
-151
lines changed

23 files changed

+1183
-151
lines changed

.ci/docker/ci_commit_pins/pytorch.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7ae0ce6360b6e4f944906502d20da24c04debee5
1+
59d5cf083b4f860dea76fe8936076177f9367f10

backends/arm/test/models/test_conformer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class TestConformer(unittest.TestCase):
3131
# .to_executorch step, i.e. after Arm partitioner.
3232
ops_after_partitioner = {
3333
"executorch_exir_dialects_edge__ops_aten_max_default": 1,
34-
"torch.ops.aten._assert_scalar.default": 10,
34+
"torch.ops.aten._assert_scalar.default": 7,
3535
"torch.ops.aten._local_scalar_dense.default": 1,
3636
}
3737

backends/arm/test/models/test_llama.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import sys
1212
import unittest
1313

14+
import pytest
1415
import torch
1516

1617
from executorch.backends.arm.test import common, conftest
@@ -102,7 +103,7 @@ def test_llama_tosa_MI(self):
102103
llama_model, llama_inputs, llama_meta = self.prepare_model()
103104

104105
if llama_model is None and llama_inputs is None and llama_meta is None:
105-
return
106+
pytest.skip("Missing model and/or input files")
106107

107108
with torch.no_grad():
108109
(

examples/arm/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,16 @@ $ source executorch/examples/arm/ethos-u-scratch/setup_path.sh
3232
$ executorch/examples/arm/run.sh --model_name=mv2 --target=ethos-u85-128 [--scratch-dir=same-optional-scratch-dir-as-before]
3333
```
3434

35+
### Ethos-U minimal example
36+
37+
See the jupyter notebook `ethos_u_minimal_example.ipynb` for an explained minimal example of the full flow for running a
38+
PyTorch module on the EthosUDelegate. The notebook runs directly in some IDE:s s.a. VS Code, otherwise it can be run in
39+
your browser using
40+
```
41+
pip install jupyter
42+
jupyter notebook ethos_u_minimal_example.ipynb
43+
```
44+
3545
### Online Tutorial
3646

3747
We also have a [tutorial](https://pytorch.org/executorch/stable/executorch-arm-delegate-tutorial.html) explaining the steps performed in these
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
From 23712ff626db16793d428dddcb530f9e5faaa073 Mon Sep 17 00:00:00 2001
2+
From: Adrian Lundell <[email protected]>
3+
Date: Thu, 3 Apr 2025 14:25:52 +0200
4+
Subject: [PATCH] Move input_data_sec to NOLOAD area
5+
6+
---
7+
targets/corstone-300/platform.ld | 10 ++++++++--
8+
targets/corstone-320/platform.ld | 8 ++++++--
9+
2 files changed, 14 insertions(+), 4 deletions(-)
10+
11+
diff --git a/targets/corstone-300/platform.ld b/targets/corstone-300/platform.ld
12+
index 1733509..3ccce64 100644
13+
--- a/targets/corstone-300/platform.ld
14+
+++ b/targets/corstone-300/platform.ld
15+
@@ -272,13 +272,12 @@ SECTIONS
16+
*(.bss.tensor_arena)
17+
#endif
18+
19+
- . = ALIGN(4);
20+
- *(input_data_sec)
21+
. = ALIGN(16);
22+
#if (ETHOSU_MODEL == 1)
23+
*(network_model_sec)
24+
#endif
25+
* (expected_output_data_sec)
26+
+ . = ALIGN(16);
27+
* (sec_command_stream, sec_weight_data, sec_input_data)
28+
*(.got*)
29+
*(.rodata*)
30+
@@ -287,6 +286,13 @@ SECTIONS
31+
. = ALIGN(4);
32+
} > DDR :rom_dram
33+
34+
+ .ddr_noload (NOLOAD) :
35+
+ {
36+
+ . = ALIGN(16);
37+
+ *(input_data_sec)
38+
+ . = ALIGN(16);
39+
+ } > DDR :null
40+
+
41+
__eddr_data = ALIGN (4) ;
42+
.sram.data : {
43+
__sram_data_start__ = .;
44+
diff --git a/targets/corstone-320/platform.ld b/targets/corstone-320/platform.ld
45+
index c8261c0..9b7e071 100644
46+
--- a/targets/corstone-320/platform.ld
47+
+++ b/targets/corstone-320/platform.ld
48+
@@ -268,8 +268,6 @@ SECTIONS
49+
*(network_model_sec)
50+
#endif
51+
52+
- . = ALIGN(4);
53+
- *(input_data_sec)
54+
*(expected_output_data_sec)
55+
*(output_data_sec)
56+
57+
@@ -279,6 +277,12 @@ SECTIONS
58+
__etext = .;
59+
} > DDR :rom_dram
60+
61+
+ .ddr_noload (NOLOAD) :
62+
+ {
63+
+ . = ALIGN(16);
64+
+ *(input_data_sec)
65+
+ } > DDR :null
66+
+
67+
.bss :
68+
{
69+
. = ALIGN(4);
70+
--
71+
2.43.0
72+

0 commit comments

Comments
 (0)