* Support encoding data type infomration as part of the DMR struct.
* Support full range of np types.
* Report error when encountering unsupported type.
* Add gerRank method API.
* Add missing API declarations.
* DynMemRef -> RtMemRef
* Format code.
* Missed DynMemRef -> RtMemRef conversion.
* More comments for RMR, and rename variable names from dmr -> rmr.
* DynMemRef -> RtMemRef.
* Format code.
* Support krnl.block printing/parsing.
* Checkpoing, PoC working.
* Implement krnl.block operation.
* Make tuple -> make pair.
* Bug fix, white list krnl.iterate op while lowering.
* Add return loop op lowering.
* Bug fix.
* Allow using loop refs more than once if they are used by krnl.iterate op.
* More comments and include lit test.
* Make krnl.block definition more restrictive.
* Splitting tests creates modules, making affine_map matching more verbose, prefer not splitting since test cases are small.
* Use verbose mode for LIT test on Z.
* Use verbose build to diagnose.
* Missing libraries linking when building in shared mode.
* Fix whole-archive linkage.
* Try preloading affinetransforms.
* Try put AffineTransforms into LD_LIBRARY_PATH.
* Fix python syntax error.
* No need to link with whole-archive libs, as they are pre-loaded.
* Do not preload any library.
* Link with whole-archive libs.
* Explicitly shared linkage in CMake.
* Fix CMake syntax error.
* Restore test.py
* Update z13.sh
* Update z13.sh
* Provide krnl.block operation description.
* string type from tensorflow
* simplify type
* parser and print
* gen StringType for tablegen
* onnx to onnx-mlir type
* add namespace
* allow all integer type
* dialect document
* add test case
* format
* more precise type for ONNXOp
* format
* enable the failed test
* update comment
* update onnx.md
Co-authored-by: Gheorghe-Teodor Bercea <gt.bercea@gmail.com>
* Reorganize main function.
* Follow review comments.
* Emit constants are globals in Krnl and LLVM dialects.
* Add more passes to onnx-mlir-opt.
* Clean-up.
* Explicit pass registration.
* Remove whole-archive linking, replace with regular linking.
* Remove whole-archive linkage related scripts.
* No need to preload library, simply expose them through LD_LIBRARY_PATH.
* Use OMLibs to record all onnx-mlir libs.
* Add OMResultTypeInferenceOpInterface lib to OMLibs.
* nit.
* No need to expose libs through LD_LIBRARY_PATH.
* Fix missing onnx header file issue.
* Define OMLibs before Tool subdirectory is imported.
* Define OMLibs at parent scope.
* Specify dependency of MainUtils on OMLibs early.
* Set OMLibs both at current & parent scope.
* Add comment about what future pass implementation should do.
* support map and seq in tablegen
* register MLONNX for testing
* format
* remove the unwanted test
* add a test
Co-authored-by: Tian Jin <tjingrant@gmail.com>
* initial const prop attempt
* added support for broadcast ops
* adde all binary broadcast ops into custom builders with precise type
* added test example
* working
* format
* fixed suggestion by Tung, start woring on unary
* added subtraction and neg the right way, and added elementwise mul too
* formatting changes
* format
* format
* added instructions to add new optimizations
* added propagation rules that always migrate constants toward the root of the expression, using assoc and commutativity
* format comment
* 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.
* Reorganize main function.
* Follow review comments.
* Emit constants are globals in Krnl and LLVM dialects.
* Replace internal malloc with memory pool and getref instruction.
* Lower krnl.getref to LLVM.
* Fix formatting issues.
* Add tests.
* Add missing dependency.
* Improve LLVM lowering.
* Add test to show getref is generic.
* 1. Add shape inference for the following ops:
- Atan
- Tan
- Sin
- Cast
- ConvTranspose
- Flatten
- DynamicQuantizeLinear
- QuantizeLinear
- DequantizeLinear
- ConvInteger
2. Import attributes for generic nodes
3. Fixes for cases where .cast<> should be .isa<> (ONNXConcat::inferShapes)
* Fix foormatting issues
* Address comments:
- SmallVector<> * -> SmallVectorImpl<> &
- switch-case -> helper function
- Inside helper function, preserve signed-ness
- add TODOs
* Can't use signed integers yet in convertONNXTypeToMLIRType, add TODO
Co-authored-by: Tian Jin <tjingrant@gmail.com>
* Detect llvm-project commit change in utils/clone-mlir.sh and rebuild llvm-project
for zLinux Jenkins build bot
* Since many headers are generated and included indirectly through
other headers, there are often missing dependencies that break
parallel build. So we add header targets for KrnlOps, ONNXOps, and
MLONNXOps, and add explicit dependencies for all the relevant headers.
* fix copy-and-paste bug
Co-authored-by: Tian Jin <tjingrant@gmail.com>
* initial const prop attempt
* added support for broadcast ops
* adde all binary broadcast ops into custom builders with precise type
* added test example
* working
* format
* fixed suggestion by Tung, start woring on unary
* added subtraction and neg the right way, and added elementwise mul too
* formatting changes
* format
* format
* added instructions to add new optimizations
* Call llc, ld from within onnx-mlir.
* Rename EmitLLVMBC -> EmitLib., reorder header files
* Edit comment.
* Checkpoint, debug.py works.
* Automatically generate inputs in debug.py.
* Use float.
* initial support for rapidcheck tests.
* Convolution test case works.
* Format code.
* Link library with MainUtils.
* Fix CMake script error.
* Fast implementation of array assertion, more detailed error analysis.
* More utility for DynMemRef.
* Fix linking issue.
* Uncomment unit test.
* Refactor to separate C++/Python ExecutionSession, enable unit test.
* format code.
* Verbose build.
* Enable PIC option for ExecusionSession.
* Fix cmake error.
* Build all targets.
* Fix doc to build all targets.
* Clean up.
* Clean up, debug.
* Use type alias consistently.
* Move definitions to DynMemRef.cpp.
* include algorithm.
* pyruntime -> PyRuntime
* Format code.
* Free memory.
* Add comments.
* Copyright notice.
* Improve stylistic consistency.
* Add comment.
* Revert irrelevant changes.
* Disambiguate.
* Refator test case generator out from test case implementation, implement example exhaustive test driver.
* Add documentation for testing.
* Add type inference for CastOp
* Share type translation between op builder and onnx importer
* clang-format
* Format emitted code
* Remove unnecessary dependencies
* removed warning missing return, dangling else
* fixed errors, made sure to return false in all shape inference failures
* shape inference use LogicalResults as return value
* format fixed
* format error
* additional error correction
* handle errors properly for all former emitError site, using either emitError, assert, or llvm_unreachable
* help added
* fixes
* edit of doc
* doc edit
* Update .travis.yml
* add Z and Power builds
* Build (#1)
* prereq build for Z and Power
* prereq build for Z and Power
* prereq build for Z and Power
* Update MLIR version
* Update MLIR version
* Update MLIR version
* Update MLIR version
* Update MLIR version
* Update MLIR version
* Update MLIR version
* Update MLIR version
* Update MLIR version
* Update MLIR version
* Update MLIR version
* Update MLIR version
* Update MLIR version
* Update MLIR version
* Update MLIR version
* Update MLIR version
* Update MLIR version
* test build
* test build
* Update MLIR version
* test build
* test build
* test build
* test build
* test build
* test build
* test build
* test build
* test build
* test build
* test build
* test build
* test build
* test build
* removed warning missing return, dangling else
* fixed errors, made sure to return false in all shape inference failures
* shape inference use LogicalResults as return value
* format fixed
* format error
Co-authored-by: Tian Jin <tjingrant@gmail.com>
* fix type inference for ConstantOp and MaxPoolSingleOut
* modify interface
* use OpInterface
* change name to OpInterface
* Builder dependence
* Update CMakeLists.txt
* Update CMakeLists.txt
Co-authored-by: Tian Jin <tjingrant@gmail.com>
* mount clone in container
Mount the clone that travis created inside the docker container so we get the correct set of commits for this build
* Update Dockerfile
* start with docker file
* change docker run to exec
used wrong docker command in a bunch of places
* fix docker commands
* Update compile-onnx-mlir.sh
* Update .travis.yml
* save build result
* commit the built container
* copy clone rather than mount
Copy the files that travis cloned since using -v $(pwd):/onnx-mlir to mount them as a volume doesn't persist when we push the image to docker hub.
* move 'cd docker' later
* fix location for Dockerfile
* Update .travis.yml
* Update compile-onnx-mlir.sh
* fix mount directory
* conditional push of build
* remove old docker push
forgot to do this previously
Co-authored-by: Gheorghe-Teodor Bercea <gt.bercea@gmail.com>
* Call llc, ld from within onnx-mlir.
* Rename EmitLLVMBC -> EmitLib., reorder header files
* Checkpoint, debug.py works.
* Automatically generate inputs in debug.py.
* Use float.
* Fix merge conflict, remove RapidCheck from this patch.
* Remove submodule rapidcheck properly.
* Reformat code.
* More comments.
* Add documentation.
* Add documentation to navigation.
* Account for the fact that some initializers may also appear as input.
* Move to more recent LLVM ID (May 15)
* clang-format
* Bump cache version up
* Update readme
* Fix doc check
* Move to a newer commit id
* Update LoopToStandard -> SCFToStandard
* Change MLIRSideEffects to MLIRSideEffectInterfaces
Co-authored-by: Tian Jin <tjingrant@gmail.com>
* Reorganize main function.
* Follow review comments.
* Emit constants are globals in Krnl and LLVM dialects.
* Change extensions of intermediate file.
* enable promote attr for pad
* use optional arguments for pad
* shape infereance for pad
* Lowering Pad
* format file
* use DenseTensor for the attribute
* use Pad in ONNXRewrite
* fix the merge conflict
* fix the attr given to constantOp
* handle ONNXConstantOp in attribute promotion
* Fix bug when AttributePromotion is called more than once
* update ONNXOps.td.inc with correct version of onnx
* update onnx.md
* responses to review
* fix the build error
* change the implementation of Pad
* delete commented out code
* clang format
Co-authored-by: Tian Jin <tjingrant@gmail.com>
* Use AffineMap
* Shared AffineMap
* AffineMap for Conv/Pooling
* Create helper files
* Remove changes for Relu
* Remove redundant includes
* Use AffineMap for AveragePool's shape inference
* Add MLIR tests for unknown dimension case
* Extract a method AffineMapIntConstant
* Comment stylist and include path
Co-authored-by: Gheorghe-Teodor Bercea <gt.bercea@gmail.com>
* Specialize the op lowering logic for elementwise operations
* Fix clang-format error.
* Update tests for LSTM since LSTM uses element-wise ops
Co-authored-by: Tian Jin <tjingrant@gmail.com>
* Support importing tensor proto.
* Use signed types, use template.
* Resotre using signless integer types because Reshape faults with integer signs; using traits to declare/define attribute types.
* Simplify attribute importing logic.
* Use existing code to import TensorProto.
* nit.