Fails to import EthosUPartitioner for ARM backend as there is numpy inconsistency with tosa-tools
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5k
- Forks
- 1.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 581
Description
🐛 Describe the bug
I am failing to run fresh install for executorch with ARM backend and convert simple model with EthosUPartitioner. My steps are the following:
- Create empty environment:
virtualenv -p 3.10 ~/.venv - Clone repo:
git clone --recurse-submodules https://github.com/pytorch/executorch.git - Run executorch install script:
cd executorch && ./install_executorch.sh - Run ARM setup script:
examples/arm/setup.sh --i-agree-to-the-contained-eula
Here it complains about numpy inconsistency:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of t
he following dependency conflicts.
tosa-tools 1.0.0rc0.post1.dev314+g1e6e452 requires jsonschema, which is not installed.
tosa-tools-v0-80 0.80.2.dev2+g641f0e2.d20250730 requires jsonschema, which is not installed.
tosa-tools 1.0.0rc0.post1.dev314+g1e6e452 requires flatbuffers==23.5.26, but you have flatbuffers 24.3.25 which is incompatible.
tosa-tools 1.0.0rc0.post1.dev314+g1e6e452 requires numpy<2, but you have numpy 2.2.6 which is incompatible.
tosa-tools-v0-80 0.80.2.dev2+g641f0e2.d20250730 requires flatbuffers==23.5.26, but you have flatbuffers 24.3.25 which is incompatible.
tosa-tools-v0-80 0.80.2.dev2+g641f0e2.d20250730 requires numpy<2, but you have numpy 2.2.6 which is incompatible.
- Check import of
EthosUPartitionerwithpython3 -c "from executorch.backends.arm.ethosu_partitioner impo rt EthosUPartitioner"
which gives me an error:
/home/tymons/.venvs/et03/lib/python3.10/site-packages/executorch/exir/dialects/edge/_ops.py:9: UserWarning: pkg_resources is deprecated as a
n API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30.
Refrain from using this package or pin to Setuptools<81.
import pkg_resources
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.2.6 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.
Traceback (most recent call last): File "<string>", line 1, in <module>
File "/home/tymons/.venvs/et03/lib/python3.10/site-packages/executorch/backends/arm/ethosu_partitioner.py", line 13, in <module>
from executorch.backends.arm.ethosu_backend import EthosUBackend
File "/home/tymons/.venvs/et03/lib/python3.10/site-packages/executorch/backends/arm/ethosu_backend.py", line 17, in <module>
from executorch.backends.arm.arm_vela import vela_compile
File "/home/tymons/.venvs/et03/lib/python3.10/site-packages/executorch/backends/arm/arm_vela.py", line 17, in <module>
from ethosu.vela import vela # type: ignore
File "/home/tymons/.venvs/et03/lib/python3.10/site-packages/ethosu/vela/vela.py", line 33, in <module>
from . import compiler_driver
File "/home/tymons/.venvs/et03/lib/python3.10/site-packages/ethosu/vela/compiler_driver.py", line 22, in <module>
from . import graph_optimiser
File "/home/tymons/.venvs/et03/lib/python3.10/site-packages/ethosu/vela/graph_optimiser.py", line 20, in <module>
from .graph_optimiser_util import check_format_restrictions
File "/home/tymons/.venvs/et03/lib/python3.10/site-packages/ethosu/vela/graph_optimiser_util.py", line 30, in <module>
from .operation_util import create_avgpool_nop
File "/home/tymons/.venvs/et03/lib/python3.10/site-packages/ethosu/vela/operation_util.py", line 25, in <module>
from .high_level_command_to_npu_op import ifm_ifm2_correct_order
File "/home/tymons/.venvs/et03/lib/python3.10/site-packages/ethosu/vela/high_level_command_to_npu_op.py", line 76, in <module>
from .weight_compressor import NpuWeightTensor
File "/home/tymons/.venvs/et03/lib/python3.10/site-packages/ethosu/vela/weight_compressor.py", line 45, in <module>
from ethosu import mlw_codec
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/tymons/.venvs/et03/lib/python3.10/site-packages/executorch/backends/arm/ethosu_partitioner.py", line 13, in <module>
from executorch.backends.arm.ethosu_backend import EthosUBackend
File "/home/tymons/.venvs/et03/lib/python3.10/site-packages/executorch/backends/arm/ethosu_backend.py", line 17, in <module>
from executorch.backends.arm.arm_vela import vela_compile
File "/home/tymons/.venvs/et03/lib/python3.10/site-packages/executorch/backends/arm/arm_vela.py", line 17, in <module>
from ethosu.vela import vela # type: ignore
File "/home/tymons/.venvs/et03/lib/python3.10/site-packages/ethosu/vela/vela.py", line 33, in <module>
from . import compiler_driver
File "/home/tymons/.venvs/et03/lib/python3.10/site-packages/ethosu/vela/compiler_driver.py", line 22, in <module>
from . import graph_optimiser
File "/home/tymons/.venvs/et03/lib/python3.10/site-packages/ethosu/vela/graph_optimiser.py", line 20, in <module>
from .graph_optimiser_util import check_format_restrictions
File "/home/tymons/.venvs/et03/lib/python3.10/site-packages/ethosu/vela/graph_optimiser_util.py", line 30, in <module>
from .operation_util import create_avgpool_nop
File "/home/tymons/.venvs/et03/lib/python3.10/site-packages/ethosu/vela/operation_util.py", line 25, in <module>
from .high_level_command_to_npu_op import ifm_ifm2_correct_order
File "/home/tymons/.venvs/et03/lib/python3.10/site-packages/ethosu/vela/high_level_command_to_npu_op.py", line 76, in <module>
from .weight_compressor import NpuWeightTensor
File "/home/tymons/.venvs/et03/lib/python3.10/site-packages/ethosu/vela/weight_compressor.py", line 45, in <module>
from ethosu import mlw_codec
RuntimeError: mlw_codec error: _ARRAY_API not found
Versions
[pip3] executorch==0.8.0a0+b6b7a16
[pip3] numpy==2.2.6
[pip3] nvidia-cublas-cu12==12.6.4.1
[pip3] nvidia-cuda-cupti-cu12==12.6.80
[pip3] nvidia-cuda-nvrtc-cu12==12.6.77
[pip3] nvidia-cuda-runtime-cu12==12.6.77
[pip3] nvidia-cudnn-cu12==9.5.1.17
[pip3] nvidia-cufft-cu12==11.3.0.4
[pip3] nvidia-curand-cu12==10.3.7.77
[pip3] nvidia-cusolver-cu12==11.7.1.2
[pip3] nvidia-cusparse-cu12==12.5.4.2
[pip3] nvidia-cusparselt-cu12==0.6.3
[pip3] nvidia-nccl-cu12==2.26.2
[pip3] nvidia-nvjitlink-cu12==12.6.85
[pip3] nvidia-nvtx-cu12==12.6.77
[pip3] pytorch_tokenizers==0.1.0
[pip3] torch==2.9.0.dev20250725+cpu
[pip3] torchao==0.13.0+git2eb4f9762
[pip3] torchaudio==2.8.0.dev20250725+cpu
[pip3] torchdata==0.11.0
[pip3] torchsr==1.0.4
[pip3] torchtune==0.6.1
[pip3] torchvision==0.24.0.dev20250725+cpu
[pip3] triton==3.3.1
[conda] Could not collect
cc @digantdesai @freddan80 @per @zingo @oscarandersson8218
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with examples/arm/setup.sh and the ARM backend import path executorch.backends.arm.ethosu_partitioner. Check how the setup installs tosa-tools, ethosu, numpy, and flatbuffers, then reproduce the import command in a clean Python 3.10 environment. Done means the setup completes without dependency conflicts and EthosUPartitioner imports successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- embedded-iot, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100