bwijgers / accelerate-tensorflow

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

henlo, my name is Theia

TensorFlow backend for the Accelerate array language

CI-Linux CI-MacOS CI-Windows
Stackage LTS Stackage Nightly Hackage

This package compiles Accelerate code to a TensorFlow graph. For details on Accelerate, refer to the main repository.

Contributions and bug reports are welcome!
Please feel free to contact me through GitHub or gitter.im.

Here be dragons

To build a (local) copy of tensorflow-lite:

mkdir build
cd build
cmake ../extra-deps/tensorflow/tensorflow/lite
cmake --build . -j

Installing the TensorFlow C-libraries

The TensorFlow C-bindings are required to build this project. In order to install them, follow the instructions provided by TensorFlow. Make sure to install the TensorFlow 2.3.0 CPU or GPU bindings, and not the latest version, since this is the version required by the TensorFlow-Haskell dependency. As such, we recommend not installing in the default location (/usr/local on Linux or MacOS systems), but to a different location. To make sure the build succeeds, you need to tell stack where to find these files, using the extra-lib-dirs and extra-include-dirs fields. Make sure to set the LIBRARY_PATH and LD_LIBRARY_PATH as described in the installation instructions as well.

Installing protoc

To build the required TensorFlow and TensorFlow-haskell packages, you need to have protoc installed. If you do not have it installed, follow the directions on this webpage.

Installing the edgetpu library

TODO: Make sure everything in this section is correct; at the moment, the list of what to install might be incomplete. TODO: non-debian Linux instructions. Follow the instructions from Coral to get access to their debian packages through apt(-get). Then, install the following libraries:

  • libedgetpu-dev (TODO: check necessity, probably required)
  • edgetpu_compiler
  • libedgetpu1-std (recommended unless the higher frequency is required)

Installing other dependencies

Other dependencies have to be installed manually before running stack build. Among these are cpuinfo, farmhash. (TODO: find out what exactly is on this list.) These exist in the Ubuntu package management system and can be installed through apt:

sudo apt install libcpuinfo-dev libfarmhash-dev

About

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Haskell 88.4%Language:C++ 9.2%Language:Python 2.5%