Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/Build_RPS_AppKit-E8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
- name: Add Beta packs
working-directory: ./
run: |
cpackget add ./packs/PyTorch.ExecuTorch.1.3.1-rc8/PyTorch.ExecuTorch.pdsc --agree-embedded-license
cpackget add ./packs/PyTorch.ExecuTorch.1.1.0-rc1-build.12/PyTorch.ExecuTorch.pdsc --agree-embedded-license
- name: Build the target-set
working-directory: ./RockPaperScissors/AppKit-E8_USB
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Build_RPS_Variants.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
- name: Add Beta packs
working-directory: ./
run: |
cpackget add ./packs/PyTorch.ExecuTorch.1.3.1-rc8/PyTorch.ExecuTorch.pdsc --agree-embedded-license
cpackget add ./packs/PyTorch.ExecuTorch.1.1.0-rc1-build.12/PyTorch.ExecuTorch.pdsc --agree-embedded-license
- name: ${{matrix.context.tool}} Build-Test for context ${{matrix.context.proj}}.${{matrix.context.build-type}}+${{matrix.context.target-type}}
working-directory: ${{matrix.context.dir}}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Test_RPS_SSE-320-U85.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
- name: Add Beta packs
working-directory: ./
run: |
cpackget add ./packs/PyTorch.ExecuTorch.1.3.1-rc8/PyTorch.ExecuTorch.pdsc --agree-embedded-license
cpackget add ./packs/PyTorch.ExecuTorch.1.1.0-rc1-build.12/PyTorch.ExecuTorch.pdsc --agree-embedded-license
- name: Build the target-set
working-directory: ./RockPaperScissors/AppKit-E8_USB
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,25 @@ layer:

packs:
- pack: PyTorch::ExecuTorch
path: ../../../../../packs/PyTorch.ExecuTorch.1.3.1-rc8
path: ../../../../../packs/PyTorch.ExecuTorch.1.1.0-rc1-build.12

define:
- ET_LOG_ENABLED : 0

components:
# ExecuTorch core runtime. Runtime now ships the weak PAL (minimal.cpp),
# so the 1.1.0 "Platform Bare-Metal" posix stub is no longer needed.
# ExecuTorch core runtime
- component: Machine Learning:ExecuTorch:Runtime
- component: Machine Learning:ExecuTorch:Kernel Utils
- component: Machine Learning:ExecuTorch:Kernel Registration
# Ethos-U NPU backend
- component: Machine Learning:ExecuTorch:Backend EthosU
# Quantized operators used by the RPS model. 1.3.x moves operators to the
# "ExecuTorch Operators" Cgroup and #ifdef-guards each registration, so the
# 1.1.0 "Stubs RandomOps" component is no longer needed.
- component: Machine Learning:ExecuTorch Operators:Quantized quantize
- component: Machine Learning:ExecuTorch Operators:Quantized dequantize
# Bare-metal PAL stubs (replaces posix.cpp)
- component: Machine Learning:ExecuTorch:Platform Bare-Metal
# Random op stubs (no std::random_device on bare-metal)
- component: Machine Learning:ExecuTorch:Stubs RandomOps
# Quantized operators used by the RPS model
- component: Machine Learning:ExecuTorch:Operators Quantized quantize
- component: Machine Learning:ExecuTorch:Operators Quantized dequantize

groups:
# AI Model - replace this group with a ModelNova-generated model pack
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# ExecuTorch CMSIS Pack

## Overview

ExecuTorch is the PyTorch Edge Runtime, enabling efficient on-device AI inference on Arm Cortex-M processors.

This pack provides:
- **Core Runtime**: Program loading and execution
- **Portable Operators**: Platform-independent operator implementations
- **Quantized Operators**: Optimized quantized inference
- **Ethos-U Backend**: Hardware acceleration for Arm Ethos-U NPU
- **Cortex-M Backend**: CMSIS-NN optimized operators

## Getting Started

### Basic Usage

1. Add the pack to your csolution:
```yaml
packs:
- pack: PyTorch::ExecuTorch
```

2. Add required components:
```yaml
components:
# Core runtime (always required)
- component: Machine Learning:ExecuTorch:Runtime
- component: Machine Learning:ExecuTorch:Kernel Utils

# Backend (choose one or more)
- component: Machine Learning:ExecuTorch:Backend::EthosU
# or
- component: Machine Learning:ExecuTorch:Backend::CortexM
```

3. Include ExecuTorch headers in your code:
```cpp
#include <executorch/runtime/executor/program.h>
#include <executorch/runtime/executor/method.h>
```

### Model Integration

For automatic operator selection, use a Model Pack generated from your `.pte` file. The model pack declares dependencies on required operators, which are automatically resolved.

Alternatively, manually add required operators:
```yaml
components:
- component: Machine Learning:ExecuTorch:Operators::Portable::add
- component: Machine Learning:ExecuTorch:Operators::Portable::mul
# ... other operators used by your model
```

## Memory Requirements

| Component | Flash (approx) | RAM (approx) |
|-----------|----------------|--------------|
| Runtime | 50-100 KB | 4-8 KB |
| Per Operator | 1-10 KB | minimal |
| Ethos-U Backend | 20-40 KB | 2-4 KB |

Actual requirements depend on:
- Selected operators
- Model complexity
- Tensor sizes

## Compiler Support

- **GCC**: arm-none-eabi-gcc 13.x+
- **Arm Compiler 6**: armclang 6.24+
- **LLVM/Clang**: Arm Compiler for Embedded

## Dependencies

- ARM::CMSIS (core headers)
- ARM::CMSIS-NN (for Cortex-M backend)
- ARM::ethos-u-core-driver (for Ethos-U backend)

## Resources

- [ExecuTorch Documentation](https://pytorch.org/executorch/)
- [CMSIS-Pack Specification](https://open-cmsis-pack.github.io/Open-CMSIS-Pack-Spec/main/html/index.html)
- [Issue Tracker](https://github.com/pytorch/executorch/issues)
29 changes: 29 additions & 0 deletions packs/PyTorch.ExecuTorch.1.1.0-rc1-build.12/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
BSD 3-Clause License

Copyright (c) Meta Platforms, Inc. and affiliates.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Loading