build.sh 892 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/bin/sh
  2. # Copyright (C) 2019 Intel Corporation. All rights reserved.
  3. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. CURR_PATH=$(cd $(dirname $0) && pwd -P)
  5. # WASM application that uses WASI-NN
  6. /opt/wasi-sdk/bin/clang \
  7. --target=wasm32-wasi \
  8. -DNN_LOG_LEVEL=1 \
  9. -Wl,--allow-undefined \
  10. -I../include -I../src/utils \
  11. -o test_tensorflow.wasm \
  12. test_tensorflow.c utils.c
  13. # TFLite models to use in the tests
  14. cd ${CURR_PATH}/models
  15. python3 average.py
  16. python3 max.py
  17. python3 mult_dimension.py
  18. python3 mult_outputs.py
  19. python3 sum.py
  20. # Specific tests for TPU
  21. cd ${CURR_PATH}
  22. /opt/wasi-sdk/bin/clang \
  23. --target=wasm32-wasi \
  24. -DNN_LOG_LEVEL=1 \
  25. -Wl,--allow-undefined \
  26. -I../include -I../src/utils \
  27. -o test_tensorflow_quantized.wasm \
  28. test_tensorflow_quantized.c utils.c
  29. cd ${CURR_PATH}/models
  30. python3 quantized.py
  31. cd ${CURR_PATH}