-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathcmsis-executorch.csolution.yml
More file actions
87 lines (81 loc) · 3.28 KB
/
Copy pathcmsis-executorch.csolution.yml
File metadata and controls
87 lines (81 loc) · 3.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# Copyright 2026 Arm Limited and/or its affiliates.
# SPDX-License-Identifier: Apache-2.0
#
# A minimal ExecuTorch-on-Ethos-U85 example for the Corstone-320 (SSE-320) FVP.
# Three steps build it:
#
# cbuild setup cmsis-executorch.csolution.yml --active SSE-320-U85
# python create_ai_layer.py cmsis-executorch.cbuild-mlops.yml
# cbuild cmsis-executorch.csolution.yml --active SSE-320-U85
#
# The `mlops:` node below makes `cbuild setup` emit the *.cbuild-mlops.yml;
# create_ai_layer.py reads the NPU and Vela settings from it, exports the model
# from PyTorch in the project's venv and writes the AI layer.
solution:
created-for: CMSIS-Toolbox@2.14.1
cdefault:
compiler: AC6
packs:
# Pinned exactly: the pack's C++ runtime and the Python exporter pinned in
# requirements.txt must be the same ExecuTorch version, or the .pte fails
# to load. `cbuild setup --packs` fetches it from the public index.
- pack: PyTorch::ExecuTorch@1.4.1
- pack: ARM::CMSIS
- pack: ARM::CMSIS-NN
- pack: ARM::CMSIS-Compiler
- pack: ARM::Cortex_DFP
target-types:
# Corstone-320 with an Ethos-U85 NPU, simulated on the Arm FVP.
- type: SSE-320-U85
board: SSE-320
device: SSE-320-FVP
variables:
- Board-Layer: $SolutionDir()$/board/Corstone-320/Board-U85.clayer.yml
- AI-Layer: $SolutionDir()$/ai_layer/ai_layer.clayer.yml
target-set:
- set:
images:
- project-context: cmsis-executorch.Debug
debugger:
name: Arm-FVP
# The model is its own GDB server (plugins/GDBServer.so, MDK FVP
# models 11.32.23+). fvp.sh resolves that plugin when VS Code was
# not started from a `vcpkg activate` shell, line-buffers the
# model's stdout so the debug adapter sees the "Listening" banner,
# and on macOS runs the model in Docker (Arm ships no macOS build).
# On Windows point this straight at FVP_Corstone_SSE-320.exe.
model: ${workspaceFolder}/.vscode/fvp.sh
config-file: board/Corstone-320/fvp_config.txt
args: "--simlimit 60"
misc:
# CMSIS-Toolbox 2.14.1 passes -mfpu=fpv5-sp-d16 to Clang for the Cortex-M85,
# a single-precision FPU on a core with a double-precision one and MVE;
# LLVM crashes on some kernels with that combination. The later option
# wins, so name the M85's FPU explicitly (newer toolboxes leave it to -mcpu).
- for-compiler: CLANG
C-CPP:
- -mfpu=fp-armv8-fullfp16-d16
ASM:
- -mfpu=fp-armv8-fullfp16-d16
build-types:
- type: Debug
debug: on
optimize: debug
projects:
- project: ./cmsis-executorch.cproject.yml
# MLOps information: exported to cmsis-executorch.cbuild-mlops.yml by
# `cbuild setup ... --active SSE-320-U85`. Retarget the NPU here and
# create_ai_layer.py picks it up on its next run.
# https://open-cmsis-pack.github.io/cmsis-toolbox/build-overview/#mlops-information
mlops:
description: TinyCNN int8 image classifier for Ethos-U85
npu:
type: Ethos-U85
vela:
system: Ethos_U85_SYS_DRAM_Mid # system-config from the Vela config
memory: Shared_Sram # memory-mode from the Vela config
model:
clayer: $AI-Layer$
name: TinyCNN
simulator:
target: SSE-320-U85