diff options
author | Francis Murtagh <francis.murtagh@arm.com> | 2023-01-25 16:18:45 +0000 |
---|---|---|
committer | Matthew Sloyan <matthew.sloyan@arm.com> | 2023-01-31 13:08:16 +0000 |
commit | 417abd436573c0b6f3def468f69211b653e35f1f (patch) | |
tree | a46325cb6a8021941164f19a7ca8bc756f32ab53 /python/pyarmnn/README.md | |
parent | 00ca496da643ff167c3851f3cdec864b14d173d4 (diff) | |
download | armnn-417abd436573c0b6f3def468f69211b653e35f1f.tar.gz |
GitHub #651: Add PyArmNN installation instructions for prebuilt binaries
* Previous instruction didn't generate SWIG wrappers.
Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
Change-Id: I8e4a28ad334fc7fec1740d520d1fde9359c30397
Diffstat (limited to 'python/pyarmnn/README.md')
-rw-r--r-- | python/pyarmnn/README.md | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/python/pyarmnn/README.md b/python/pyarmnn/README.md index 3962e11395..0defd910b0 100644 --- a/python/pyarmnn/README.md +++ b/python/pyarmnn/README.md @@ -50,7 +50,7 @@ The recommended way to build the python packages is by CMake. ### CMake build -The recommended aproach is to build PyArmNN together with Arm NN by adding the following options to your CMake command: +The recommended approach is to build PyArmNN together with Arm NN by adding the following options to your CMake command: ``` -DBUILD_PYTHON_SRC=1 ``` @@ -113,6 +113,44 @@ $ python -c "import pyarmnn as ann;print(ann.GetVersion())" '32.0.0' ``` + +## Installing PyArmNN while using ArmNN prebuilt binaries + +If you wish to use ArmNN prebuilt binaries from our release page, you will need to generate the PyArmNN SWIG wrappers. + +Again setup your environmental variables along with a virtual environment: + +```bash +$ python -m venv env +$ source env/bin/activate + +$ export ARMNN_LIB=/path/to/libs +$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/libs +$ export ARMNN_INCLUDE=/full/path/to/armnn/include:/full/path/to/armnn/profiling/common/include +``` + +Then generate the SWIG wrappers: +```bash +$ cd armnn/python/pyarmnn/ +$ python swig_generate.py -v +``` + +Then install PyArmNN: +```bash +# From directory armnn/python/pyarmnn/ +$ pip install . +``` + +As above, you can verify that PyArmNN library is installed and check PyArmNN version using: +```bash +$ pip show pyarmnn +``` +You can also verify it by running the following and getting output similar to below: +```bash +$ python -c "import pyarmnn as ann;print(ann.GetVersion())" +'32.0.0' +``` + # PyArmNN API overview #### Getting started |