Changes between Version 19 and Version 20 of venice/npu


Ignore:
Timestamp:
09/10/2024 08:21:14 PM (9 days ago)
Author:
Tim Harvey
Comment:

update mainline details (python verisions)

Legend:

Unmodified
Added
Removed
Modified
  • venice/npu

    v19 v20  
    236236Therefore to support the NPU you need to build a custom fork of mesa that is being worked on by [https://blog.tomeuvizoso.net/ Tomeu Vizoso] with the work being sponsored by [https://ideasonboard.com/ Ideas On board].
    237237
    238 On a Gateworks Venice board with an IMX8MP and an Ubuntu root filesystem:
    239 - update kernel to v6.10 with NPU support
     238On a Gateworks Venice board with an IMX8MP and an Ubuntu noble root filesystem:
     239- update kernel to v6.10 with NPU support (if using an older kernel)
    240240{{{#!bash
    241241# update kernel
     
    255255su -l $USER
    256256}}}
    257 - to avoid a lot of python dependency issues with tensorflow-lite install an older version of python (python3.9) using the [https://launchpad.net/%7Edeadsnakes/+archive/ubuntu/ppa deadsnakes ppa] and create a virtualenv
     257- to avoid a lot of python dependency issues with tensorflow-lite install an older version of python using the [https://launchpad.net/%7Edeadsnakes/+archive/ubuntu/ppa deadsnakes ppa] and create a virtualenv
    258258{{{#!bash
    259259sudo add-apt-repository ppa:deadsnakes/ppa
     
    265265source tflite-env/bin/activate
    266266}}}
    267 - build mesa (fork with updated teflon support for imx8mp)
     267 - Note Python 3.9, 3.10, 3.11 work, 3.12 does not
     268- build mesa (22.2.0-devel fork with updated teflon support for imx8mp)
    268269{{{#!bash
    269270# install build deps
     
    273274git clone https://gitlab.freedesktop.org/tomeu/mesa.git -b etnaviv-imx8mp mesa
    274275cd mesa
    275 # mesa requires meson >= 1.1.0 (newer than jammy's), pycparser >= 2.20, and mako
     276# mesa requires meson (v1.1.0 or greater), pycparser (2.20 or greater), and mako
    276277pip3 install meson pycparser mako
    277278meson setup build -Dgallium-drivers=etnaviv -Dvulkan-drivers= -Dteflon=true
    278279meson compile -C build # 20 mins or so on imx8mp
    279280ldd build/src/gallium/targets/teflon/libteflon.so
    280 }}}
    281 - install tensorflow lite runtime
    282 {{{#!bash
    283 # install tensorflow lite runtime
     281cd ..
     282}}}
     283- install tensorflow lite runtime (requires python <= 2.11)
     284{{{#!bash
    284285pip3 install tflite_runtime
    285 # clone tensorflow for some examples and assets used below
    286 cd
     286}}}
     287- clone tensorflow for some examples and assets used below
     288{{{#!bash
    287289git clone https://github.com/tensorflow/tensorflow.git
    288290}}}
     
    305307}}}
    306308- run tensorflow label_image example:
    307 {{{#!bash
    308 # we need to patch the label_image example to use tflite_runtime
     309 * first we need to patch the label_image example to use tflite_runtime
     310{{{#!bash
    309311cd ~/tensorflow
    310312cat <<EOF |
     
    334336EOF
    335337patch -p1
     338}}}
     339 * now we can run the label_image example:
     340{{{#!bash
    336341# without acceleration (175.993ms on imx8mp)
    337342python3 ~/tensorflow/tensorflow/lite/examples/python/label_image.py \