Skip to content

Add cmsis_nn pip package to executorch installation#18940

Closed
Erik-Lundell wants to merge 1 commit into
pytorch:mainfrom
Erik-Lundell:upstream-cmsis-nn-dep
Closed

Add cmsis_nn pip package to executorch installation#18940
Erik-Lundell wants to merge 1 commit into
pytorch:mainfrom
Erik-Lundell:upstream-cmsis-nn-dep

Conversation

@Erik-Lundell
Copy link
Copy Markdown
Collaborator

@Erik-Lundell Erik-Lundell commented Apr 16, 2026

@Erik-Lundell Erik-Lundell requested a review from rascani as a code owner April 16, 2026 11:51
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Apr 16, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/18940

Note: Links to docs will display an error until the docs builds have been completed.

❌ 6 New Failures, 2 Cancelled Jobs

As of commit 1511f23 with merge base 490ec5c (image):

NEW FAILURES - The following jobs have failed:

CANCELLED JOBS - The following jobs were cancelled. Please retry:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 16, 2026
@Erik-Lundell Erik-Lundell added partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm ciflow/trunk release notes: none Do not include this in the release notes and removed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Apr 16, 2026
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 16, 2026
@Erik-Lundell
Copy link
Copy Markdown
Collaborator Author

macOS builds of cmsis_nn are not doing well... But what do you think about adding cmsis_nn as a dependency like this in general? @digantdesai

It is needed for the Cortex-M AoT flow.

Signed-off-by: Erik Lundell <erik.lundell@arm.com>
Change-Id: Ie37faff065a7d58653aa9181bcbfbf70a6bc5768
@Erik-Lundell Erik-Lundell force-pushed the upstream-cmsis-nn-dep branch from d4685eb to 1511f23 Compare April 20, 2026 09:04
Comment thread pyproject.toml
"scikit-learn==1.7.1",
"hydra-core>=1.3.0",
"omegaconf>=2.3.0",
"cmsis_nn @ git+https://github.com/ARM-software/CMSIS-NN.git@ba16fde665262d2ca3cc5074e1b4894461e06a2f",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than a project wide dependency, I think we should move this to a cortex-m specific requirements file, similar to how we have backends/arm/requirements-arm-ethos-u.txt. We'll probably need to update the cortex-m documentation to reference this extra step.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue here is that this will be required for AOT, so requiring something like that will either break the Cortex-M backend for pip installation completely, or at least disable the buffer planning functionality. My other proposal is to add it as an optional dependency: pip install executorch[cortex_m]. Or, thirdly, built it into the executorch wheel. WDYT?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rascani we have the same thing going on for the TOSA arm-backends now when all tools needed to AOT is pip installable (is about a week ago) and we have an old wish from @digantdesai (and also from us/Arm) to make it more part of the executorch pip install process and easier to use. So whatever we decide/do here we will probably do the same for Ethos-U/VGF backends soonish. (before 1.3 ).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a slight difference in that tosa-tools is available from pypi while cmsis_nn needs building. But my original point still stands imo.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I lean towards the optional dependency approach (pip install executorch[cortex_m]).

Additionally, we should ensure we keep the SHA in sync with the SHA in CMakeLists.txt that is used for fetching the source.

I think it would also be a good idea to publish a pip package for this.

Copy link
Copy Markdown
Collaborator

@zingo zingo Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@digantdesai would this be a good solution for Arm (and other) backends also.
e.g.
pip install executorch[cortex_m]
pip install executorch[ethos_u]
pip install executorch[vgf]
pip install executorch[nxp]
pip install executorch[qcom]
...
We will probably think about our names a bit, maybe we end up with a common for ethos_u & vgf like tosa_backend or arm_backends there are a lot of common deps but I also think the devs in most cases not overlapping and 2 packages with clear names might be easier to understand, lets see. Any preferences are welcome as a discussion.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, I will push an updated PR proposing this

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing this here #19149 which the cmsis_nn dependency can then build on. Closing this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm release notes: none Do not include this in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants