2019-12-24 05:33:08 +08:00
|
|
|
version: 2
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
docker:
|
2019-12-24 06:03:22 +08:00
|
|
|
- image: circleci/python
|
2020-01-21 01:30:08 +08:00
|
|
|
resource_class: medium+
|
2019-12-24 05:33:08 +08:00
|
|
|
|
|
|
|
steps:
|
2019-12-24 07:19:55 +08:00
|
|
|
- run:
|
2019-12-31 14:45:32 +08:00
|
|
|
name: Installing GCC, CMake, Ninja, Protobuf
|
2020-01-01 02:28:26 +08:00
|
|
|
command: sudo apt-get update && sudo apt-get install -y gcc g++ cmake ninja-build protobuf-compiler
|
2020-01-21 01:30:08 +08:00
|
|
|
- checkout:
|
2020-03-17 21:16:33 +08:00
|
|
|
path: onnx-mlir
|
2020-01-21 01:30:08 +08:00
|
|
|
- run:
|
|
|
|
name: Pull Submodules
|
|
|
|
command: |
|
2020-03-17 21:16:33 +08:00
|
|
|
cd onnx-mlir
|
2020-01-21 01:30:08 +08:00
|
|
|
git submodule update --init --recursive
|
2019-12-31 14:45:32 +08:00
|
|
|
# Use cached mlir installation if possible.
|
2019-12-24 13:09:31 +08:00
|
|
|
- restore_cache:
|
2020-08-14 12:52:48 +08:00
|
|
|
key: V17-LLVM-PROJECT-{{ arch }}
|
2019-12-24 05:33:08 +08:00
|
|
|
- run:
|
2019-12-24 07:19:55 +08:00
|
|
|
name: Install MLIR
|
2019-12-24 05:53:08 +08:00
|
|
|
command: |
|
2019-12-31 14:45:32 +08:00
|
|
|
# Check whether cache restoration succeeds by checking whether
|
|
|
|
# mlir-opt executable exists.
|
2019-12-24 13:48:42 +08:00
|
|
|
if [ ! -f llvm-project/build/bin/mlir-opt ]; then
|
2020-01-31 23:24:45 +08:00
|
|
|
export MAKEFLAGS=-j4
|
2020-03-17 21:16:33 +08:00
|
|
|
source onnx-mlir/utils/install-mlir.sh
|
2019-12-24 13:09:31 +08:00
|
|
|
fi
|
|
|
|
- save_cache:
|
2020-08-14 12:52:48 +08:00
|
|
|
key: V17-LLVM-PROJECT-{{ arch }}
|
2019-12-24 13:09:31 +08:00
|
|
|
paths:
|
|
|
|
- llvm-project
|
2020-01-10 07:35:52 +08:00
|
|
|
- run:
|
2020-03-17 21:16:33 +08:00
|
|
|
name: Install ONNX MLIR
|
|
|
|
command: source onnx-mlir/utils/install-onnx-mlir.sh
|
2020-01-21 01:30:08 +08:00
|
|
|
- run:
|
|
|
|
name: Run End-To-End Tests
|
|
|
|
command: |
|
2020-03-17 21:16:33 +08:00
|
|
|
sudo pip install -q -e ./onnx-mlir/third_party/onnx
|
|
|
|
cd onnx-mlir/build
|
Compiling Models with Large Constant Arrays (#146)
* PoC works.
* MNist works.
* Clean up.
* Fix test.
* Make Linux work.
* Use consistent symbol name.
* Fix variable name.
* Fix array addr access.
* Bug fix.
* Bug fix.
* install before running e2e tests.
* Fix build config.
* Use sudo when installing.
* Make embeddedDataLoader position independent.
* Enable ResNet50.
* Format code.
* Format MainUtil.
* Try not using sudo to install.
* Supply runtime dir via environment variable.
* Dump problematic operation.
* Dump entire function.
* Debug.
* Dump input.
* Dump constant op.
* Debug.
* Debug.
* Debug.
* Print to stderr.
* take care of endianness.
* Use endianness-aware execution session.
* Fix ZLinux error.
* Include warning when desired output endianness can't be deduced.
* Remove debug code.
* Remove debug code in shape inference.
* Support binary-decoder for testing constants packing.
* Support filename, move-to-file, elision-threshold configurations in constant packing pass for easy testing.
* Add lit test, fix lit test type mismatch.
* Add more consts packing tests.
* Ensure intermediate files are properly cleaned up.
* No need for constant elimination.
* Link with threading libraries.
* Remove debug code.
* Format code.
* More tests.
* test nit.
* Remove debug code.
* Reduce hard-coded constants.
* Use temporary and unique working directory for hosting model parameters.
* Test if it works.
* Try to find objcopy.
* Rename symbols using objcopy.
* Move sanitized name to linux section.
* Use verbose mode for debugging.
* Disambiguate pass constructor.
* Fix symbol name.
* Use Command API to build and execute commands.
* Move linux to use Command API.
* Fix reset args.
* Execute redefine sym.
* Format code.
* Do not use verbose mode for CircleCI.
* Remove debug code.
* Prettify code, add comments.
* getSegmentData -> getEmbeddedConstPool
* vector -> std::vector.
* Make sure we properly clean up intermediate files.
* Fix test cases.
* Add runtime directory.
* Trigger rebuild.
* [Merge with master] fix debug script.
* Diable affine fusion pass for now.
* Support generic fallback const packing mechanism.
* Remove debug code.
* Handle the case where objcopy is not available.
* Fix Windows missing types.
* Support int64.
* Copy packed constant to a local directory for non-Linux/Mac platforms.
* Nit: remove debug code, refactor const pack preprocessing out as a separate function.
* Cannot make preprocessConstPack a standalone function because file removers are stack-allocated, and they are deallocated prematurely when function stack gets popped, deleteing intermediate files too early.
* Don't require executable filename.
* Import ONNX data types directly.
* Fix LIT test.
* Bug fix, use moved string value.
* Remove redundant filenames.
* Fix CMake script.
* Embed endianness information as a symbol, and check during runtime.
* More comments, update lit tests.
* Fix lit test on BE machine.
* Copyright notices.
2020-06-12 10:27:05 +08:00
|
|
|
RUNTIME_DIR=$(pwd)/lib cmake --build . --target check-onnx-backend
|
2020-06-08 10:18:55 +08:00
|
|
|
- run:
|
|
|
|
name: Run Unit Tests
|
|
|
|
command: |
|
|
|
|
cd onnx-mlir/build
|
|
|
|
# Need to include the bin directory in $PATH,
|
|
|
|
# otherwise CTest fails to find the test executables.
|
Compiling Models with Large Constant Arrays (#146)
* PoC works.
* MNist works.
* Clean up.
* Fix test.
* Make Linux work.
* Use consistent symbol name.
* Fix variable name.
* Fix array addr access.
* Bug fix.
* Bug fix.
* install before running e2e tests.
* Fix build config.
* Use sudo when installing.
* Make embeddedDataLoader position independent.
* Enable ResNet50.
* Format code.
* Format MainUtil.
* Try not using sudo to install.
* Supply runtime dir via environment variable.
* Dump problematic operation.
* Dump entire function.
* Debug.
* Dump input.
* Dump constant op.
* Debug.
* Debug.
* Debug.
* Print to stderr.
* take care of endianness.
* Use endianness-aware execution session.
* Fix ZLinux error.
* Include warning when desired output endianness can't be deduced.
* Remove debug code.
* Remove debug code in shape inference.
* Support binary-decoder for testing constants packing.
* Support filename, move-to-file, elision-threshold configurations in constant packing pass for easy testing.
* Add lit test, fix lit test type mismatch.
* Add more consts packing tests.
* Ensure intermediate files are properly cleaned up.
* No need for constant elimination.
* Link with threading libraries.
* Remove debug code.
* Format code.
* More tests.
* test nit.
* Remove debug code.
* Reduce hard-coded constants.
* Use temporary and unique working directory for hosting model parameters.
* Test if it works.
* Try to find objcopy.
* Rename symbols using objcopy.
* Move sanitized name to linux section.
* Use verbose mode for debugging.
* Disambiguate pass constructor.
* Fix symbol name.
* Use Command API to build and execute commands.
* Move linux to use Command API.
* Fix reset args.
* Execute redefine sym.
* Format code.
* Do not use verbose mode for CircleCI.
* Remove debug code.
* Prettify code, add comments.
* getSegmentData -> getEmbeddedConstPool
* vector -> std::vector.
* Make sure we properly clean up intermediate files.
* Fix test cases.
* Add runtime directory.
* Trigger rebuild.
* [Merge with master] fix debug script.
* Diable affine fusion pass for now.
* Support generic fallback const packing mechanism.
* Remove debug code.
* Handle the case where objcopy is not available.
* Fix Windows missing types.
* Support int64.
* Copy packed constant to a local directory for non-Linux/Mac platforms.
* Nit: remove debug code, refactor const pack preprocessing out as a separate function.
* Cannot make preprocessConstPack a standalone function because file removers are stack-allocated, and they are deallocated prematurely when function stack gets popped, deleteing intermediate files too early.
* Don't require executable filename.
* Import ONNX data types directly.
* Fix LIT test.
* Bug fix, use moved string value.
* Remove redundant filenames.
* Fix CMake script.
* Embed endianness information as a symbol, and check during runtime.
* More comments, update lit tests.
* Fix lit test on BE machine.
* Copyright notices.
2020-06-12 10:27:05 +08:00
|
|
|
RUNTIME_DIR=$(pwd)/lib PATH=$(pwd)/bin:$PATH make test -j$(nproc)
|
2020-01-10 07:35:52 +08:00
|
|
|
- run:
|
|
|
|
name: Run DocCheck
|
2020-03-17 21:16:33 +08:00
|
|
|
command: cd onnx-mlir/build && cmake --build . --target check-doc
|
2020-02-11 03:18:54 +08:00
|
|
|
- run:
|
|
|
|
name: Ensure tablegen documentation is up-to-date
|
|
|
|
command: |
|
2020-03-17 21:16:33 +08:00
|
|
|
cd onnx-mlir/build
|
|
|
|
cmake --build . --target onnx-mlir-doc
|
2020-02-11 03:18:54 +08:00
|
|
|
# Check whether dialect documentation is up-to-date.
|
2020-04-09 23:37:04 +08:00
|
|
|
diff docs/Dialects ../docs/Dialects
|
2019-12-24 05:33:08 +08:00
|
|
|
- run:
|
|
|
|
name: Print the Current Time
|
2020-07-07 21:26:00 +08:00
|
|
|
command: date
|