pytorch / pytorch/executorch

CORTEX_M: Target configuration

Open
#16,039 0 comments 0 reactions 1 assignee View on GitHub

@Erik-Lundell is already working on this.

Since Apr 14, 2026.

Dominant language
Python
Stars
5k
Forks
1.2k
Avg merge
2d 10h
Merged PRs (30d)
581

Description

CMSIS-NN requires slightly different lowerings for different architecture extensions (scalar/DSP/vector). Currently
vector extension is assumed, so we might need to add a way to configure this and do modifications in the pass lowering where required.

For example, the linear operator currently only pass the kernel_sum scratch buffer and no bias to the operator call, which only works for the MVE implementation of the operator. To run this on another Cortex-M would involve passing the target CPU to the ConvertToCortexMPass which lowers the operator and add the bias as an argument if it does not have MVE support.

Alternatively, it might not be worth the effort to do this in the lowering and it is better to do the target configuration in the runtime flow only, then the scratch buffer would need to be computed in the runtime. This decision of how to best do this is part of the ticket.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.