diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..c841f205bb9f5af8e9b036efbfefd27863532a96 --- /dev/null +++ b/.gitignore @@ -0,0 +1,28 @@ +# ignore pycharm working files +**/__pycache__ +*.idea/* + +# ignore compiled python scripts +*pyc + +# ignore TFMin auto-generated code +**/tfmin_generated + +# ignore pytest working files +*.pytest_cache + +# ignore test binaries +*leon_test +*native_test +**/bin + +# ingore all temporary directories wherever they are +**/tmp + +# ignore checkpoint files generated by mobile net example +**/mobile_net/experiments + +# ignore operation pytest temporary files +*/test_source*.h +*/test_source*.cpp +*/test_binary diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..80b1a6ee5db417b7703e1aef5ede3ab8d32e5bd7 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,74 @@ +#sudo: required +#dist: trusty +#language: python +#matrix: + include: + - python: + - "3.4" + env: + - TEST_SUITE=examples + - TF_VERSION=1.12.0 + #- python: + # - "3.4" + # env: + # - TEST_SUITE=op_kernels + # - TF_VERSION=1.12.0 + - python: + - "3.4" + env: + - TEST_SUITE=examples + - TF_VERSION=1.13.2 + #- python: + # - "3.4" + # env: + # - TEST_SUITE=op_kernels + # - TF_VERSION=1.13.2 + - python: + - "3.4" + env: + - TEST_SUITE=examples + - TF_VERSION=1.14.0 + #- python: + # - "3.4" + # env: + # - TEST_SUITE=op_kernels + # - TF_VERSION=1.14.0 +install: + # install Eigen v 3.3.x + - git clone --single-branch --branch branches/3.3 https://github.com/eigenteam/eigen-git-mirror.git eigen + - export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:$PWD/eigen + # install general dependecies + - pip install 'numpy>=1.16.0' + - pip install matplotlib scipy + # squeeze net example dependencies + - pip install Pillow + # mobile net example dependencies + - pip install easydict tqdm + # install tensorflow + - pip install tensorflow==$TF_VERSION +before_script: + # setup environment variables so TFMin is installed + - export PYTHONPATH=$PYTHONPATH:$(pwd)/TFMin + - export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:$(pwd)/cpp +script: + - | + if [ $TEST_SUITE == "examples" ]; then + # first run all pytests in this repo (runs example exports and + # python unit tests) + pytest pytest_tests/examples/ + # test build all example projects + make -C examples/mnist_dense/cpp_project/ + make -C examples/mnist_conv/cpp_project/ + make -C examples/squeeze_net/cpp_project/ + make -C examples/mobile_net/cpp_project/ + make -C examples/simple_rnn/cpp_project/ + # execute built projects and ensure they execute successfully + ./examples/mnist_dense/cpp_project/native_test + ./examples/mnist_conv/cpp_project/native_test + ./examples/squeeze_net/cpp_project/native_squeeze_net + ./examples/mobile_net/cpp_project/native_mobile_net + ./examples/simple_rnn/cpp_project/native_test + fi + - if [ $TEST_SUITE == "op_kernels" ]; then + pytest pytest_tests/op_kernels/; + fi