aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorRaul Farkas <raul.farkas@arm.com>2023-01-16 16:52:18 +0000
committerRaul Farkas <raul.farkas@arm.com>2023-02-09 15:38:02 +0000
commit428a8d54f574a73804274e53e61f711aebc25a0a (patch)
tree251bb0a54234fb9a62b8a22a9ba9f82e2b5f3ca5 /README.md
parent59b9ab9121d17793b5a240f7c51028b6b37a7a6e (diff)
downloadethos-u-vela-428a8d54f574a73804274e53e61f711aebc25a0a.tar.gz
MLBEDSW-6982: Move to setup.cfg and pyproject.toml3.7.0.rc1
- Move all static information from setup.py to newly added pyproject.toml - Add setup.cfg used for static information that cannot be added to pyproject.toml due to it still being in beta. - Modify mlw_codec to to throw a real python exception when importing NumPy arrays instead of just printing them to stdout. - Surround mlw_codec import with try catch statement to catch NumPy C API mismatch errors and throw them again with a more detailed message. - Update README.md with documentation about known issue with changing used NumPy version after installing ethos-u-vela. Change-Id: I1eeee5536be7c1744e30d6088f7069fbb1403e06 Signed-off-by: Raul Farkas <raul.farkas@arm.com>
Diffstat (limited to 'README.md')
-rw-r--r--README.md60
1 files changed, 60 insertions, 0 deletions
diff --git a/README.md b/README.md
index ecd13228..974b0b63 100644
--- a/README.md
+++ b/README.md
@@ -189,6 +189,66 @@ Some example networks that contain quantised operators which can be compiled by
Vela to run on the Ethos-U NPU can be found at:
<https://tfhub.dev/s?deployment-format=lite&q=quantized>
+## Known Issues
+
+### 1. NumPy C API version change
+
+Once ethos-u-vela is installed, the user might want to install a different NumPy
+version that is still within the dependency constraints defined in pyproject.toml.
+
+In some scenarios, doing so might prevent ethos-u-vela from functioning as
+expected due to incompatibilities between the installed NumPy C headers used in
+the mlw_codec and the current version of NumPy.
+
+**Example scenario:**
+
+In the ethos-u-vela source directory, run:
+
+```bash
+virtualenv -p 3.8 venv
+. venv/bin/activate
+pip install ethos-u-vela
+```
+
+Next, install a different NumPy version (e.g. 1.21.3)
+
+```bash
+pip install numpy==1.21.3 --force
+```
+
+Finally, run ethos-u-vela. You might get an error similar to this:
+
+```
+ImportError: NumPy C API version mismatch
+(Build-time version: 0x10, Run-time version: 0xe)
+This is a known issue most likely caused by a change in the API version in
+NumPy after installing ethos-u-vela.
+```
+
+#### Solution
+
+In order for ethos-u-vela to work with an older version of NumPy that uses
+different C APIs, you will need to install the desired NumPy version first, and
+then build ethos-u-vela with that specific NumPy version:
+
+1) Uninstall ethos-u-vela and install the desired version of NumPy
+ ```
+ pip uninstall ethos-u-vela
+ pip install numpy==1.21.3 --force
+ ```
+
+2) Install required build dependencies
+ ```
+ pip install "setuptools_scm[toml]<6" wheel
+ ```
+
+3) Install ethos-u-vela without build isolation. Not using build isolation
+ ensures that the correct version of NumPy is used when copying the C headers
+ in mlw_codec during the build process.
+ ```
+ pip install ethos-u-vela --no-build-isolation --no-cache-dir
+ ```
+
## APIs
Please see [Vela External APIs](API.md).