Add cmsis_nn pip package to executorch installation#18940
Conversation
🔗 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 JobsAs of commit 1511f23 with merge base 490ec5c ( 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. |
|
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
d4685eb to
1511f23
Compare
| "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", |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
@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 ).
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
@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.
There was a problem hiding this comment.
I agree, I will push an updated PR proposing this
There was a problem hiding this comment.
Doing this here #19149 which the cmsis_nn dependency can then build on. Closing this PR.
It is needed for the Cortex-M AoT flow.
cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell