* move scalerop to decompose
* change clang format
* change clang format
* add shape inference for scaler op
* fixing generated onnxop
* generate onnx.md
* add benefit for scaler decompose and simplify scaler shape inference
* cast rewrite only for float
* add cast op same type rewrite rule
* fix format
Co-authored-by: chentong319 <chentong@us.ibm.com>
* move scalerop to decompose
* change clang format
* change clang format
* add shape inference for scaler op
* fixing generated onnxop
* generate onnx.md
* Add shape inference for scaler op
* add benefit for scaler decompose and simplify scaler shape inference
* changes for mypipeline.onnx
* format
* rm MLOpBuildTable.inc
* copy string without free
* fix the memory issue
* restore change for STRING
* format
Co-authored-by: Tian Jin <tjingrant@gmail.com>
* Lower Squeeze op to Krnl dialect
* Emit tensor size as a single constant; add a lit test for unknown dimensions
* Code style
* Speical case where the input is only used by this squeeze op
* Remove squeeze-in-place optimization
* Update ConvertONNXToKrnl.cpp
Twek to re-run tests.
* Trigger buildbot re-run.
* Re-run CI
Co-authored-by: Tian Jin <tjingrant@gmail.com>
* 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>
* 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>
* 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>
* 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
* 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>
* 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>
* 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>
* Support dilations and enable e2e tests
* Fix allocating memory for dynamic shape
* Edit comments
* Do dilation by computing an offset from kernel index
* Correct dilation formula, add an example of out-of-bound, and add a test for dilation
* Import optional outputs as NoneType
* Shape inference for ONNXLSTM
* Edit ONNXLSTM::inferShape()
* Shape inference for ONNXLSTMOp
* Create a common function for inferring shape for RNN ops
* CheckInsertDeallocation for a specific result
* Allocate memory for LSTM
* First round of lowering
* Allocate memory for hidden and cell states
* Test with custom Tanh
* Fix an error in Ct's formula
* Add E2E tests
* Return outputs
* Refactor the code
* Enable E2E tests
* Support reverse and bidirectional directions
* Minor revision
* Return all intermediate hidden states
* Call existing activation functions
* Structs for activation functions
* Call existing activations in ONNX
* Minor revision
* Compare strings ignoring case
* Use memreftype of rank 0 for calling activation functions
* Fix getActivationPack()
* Revise the code
* Add one MLIR test
* Add MLIR tests for reverse and bidirectional modes
* Make the order of emiting instructions deterministic
* Use OperandAdaptor instead of directly use an operand index
* Use literal assignments
* Change some variable names
* Use literal assignments
* Use literal assignments
* Format the code
Co-authored-by: Gheorghe-Teodor Bercea <gt.bercea@gmail.com>
* Implement shape inference for SplitOp
* Change spitOpt to SplitAttribute and check the axis range before updating the axis attribute
Co-authored-by: Gheorghe-Teodor Bercea <gt.bercea@gmail.com>
* add buildbot on Windows via Azure Pipeline
Use Py 3.7 instead of 3.6
* Add status badge for Azure Pipeline
* reuse original cmd files, couple build and test on Windows-CI
* Update Python version on .yml
Co-authored-by: Gheorghe-Teodor Bercea <gt.bercea@gmail.com>
Co-authored-by: Tian Jin <tjingrant@gmail.com>
* Make onnx-mlir work with latest mlir.
* Bump CircleCI cache version.
* Fix missing passes in onnx-mlir-opt.
* Fix backend test failure.
* Fix doc.
* Fix doc and exclude the generated _site directory from DocCheck.
* Remove debug code.
* Do not hard code target name, on Mac shared lib can end with .dylib.
* FunctionPass -> PassWrapper.
* Move to more recent LLVM commit ID
* Update LLVM cache version from V9 to V10
* Update to latest LLVM commit id from master, roll back conditions in util scripts
* Update circlci LLVM cache tag to ensure ci updates builds with latest LLVM commit id
* Update README.md to have matching LLVM commit id
* Update doc/Dialtects/onnx.md
* Enable onnx-mlir for VS builds on Windows
* Update README to include lit
* Update build command for Windows to include config
* Update build instructions, add cmd files for windows, enable single source of truth for MLIR commit-id (clone-mlir.sh)
* Add Visual Studio workload info
* Update ONNX op definitions
* Revert onnx submodule back to previous commit, disable warnings in CMakeLists to work around build issues with MSVC
* Update environment for path to PDcurses on Windows
* Fix directory strings to be compatible with Windows or Linux style slashes
* Fix install-mlir.sh so it works when sourced
* Ensure README and cmd files match and have correct paths
* Properly quote ONNX_MLIR_SRC_DIR
* Address PR feedback: Use llvm_unreachable to indicate failure to convert attribute proto to name/value pair
Co-authored-by: Tian Jin <tjingrant@gmail.com>
* Setup documentation server, move doc files from /doc to /docs as per Github Pages convention.
* Include deleted files in patch.
* /doc -> /docs
* /doc -> /docs
* Update documentation on importing ONNX spec into ONNX Dialect; provide documentation on how to add new documentation pages.
* Generate ONNX Dialect TableGen Inc files & operation importing inc files when necessary.
* Ensure TableGen inc file is generated before TableGen is invoked.
* Nit: capitalize builder -> Builder.
* Use file-same-as-stdout directive to ensure generated files are always up-to-date in our codebase.
* Use more up-to-date version of ONNXOps.td.inc.
* Do not automatically invoke gen_doc.py.
* Support dry run in gen_doc.py.
* Fix case.
* Remove debug code.
* Add test for new doc_check primitive.
* Add documentation for file-same-as-stdout.
* Provide more comments.
* Add DocCheck to DocCheck README.
* Nit: format CMake script.
* Update comments.
Co-authored-by: Alexandre Eichenberger <alexe@us.ibm.com>
* Move to more recent LLVM commit ID
* Update LLVM cache version from V9 to V10
* Update to latest LLVM commit id from master, roll back conditions in util scripts
* Update circlci LLVM cache tag to ensure ci updates builds with latest LLVM commit id
* Update README.md to have matching LLVM commit id
* Update doc/Dialtects/onnx.md
* Sync with latest MLIR.
* Enable ONNX backend tests as a means to test ONNF lowering end-to-end.
* Install ONNX using quiet mode.
* Remove debug comments.
* Install ONNX from third_party/onnx.
* Check python version and fix pip command for installing ONNX.
* Using --user install option to prevent permission denied.
* Remove unused imports.
* Try using stock ONNX pip package as there are more tests in them.
* Pip got stuck building wheels, try sudo.
* Use verbose install to debug.
* Invalidate cache to build LLVM tools.
* Fix mlir installation script location.
* Debug to locate ONNF.
* Sanity check.
* Check out ONNF code first.
* Use verbose LIT output.
* 1. Update documentation to always use verbose LIT.
2. Update krnl ops to reflect new affine map attribute syntax.
* See if conda exists
* Install ONNX by manually cloning the repo.
* Install cmake first.
* Using sudo priviledge when installing.
* Limit build parallelism.
* Limit parallelism.
* Larger memory.
* Install onnx package with pip.
* Build MLIR tools.
* Invalidate cache.
* Compile model.so with -fPIC.
* Remove module dump to get concise debug output.
* Print command before executing.
* Use quiet install mode to reduce logging.
* Use -relocation-model=pic to generate position independent code.
* 1. Remove MAKEFLAGS because now buildbot has enough memory.
2. Run DocCheck as a last step.
* 1. Add verbose mode for backtend test.
* When dumping to LLVM bitcode, do not dump module IR, but print a message indicating that bitcode has been written to disk.
* Do not pass MakeFlags to CMake.
* Add more explaination for posible reasons of failing to identify tests.
* 1. Implement doc-check utility.
* 1. Move ONNF installation script to a standalone script file.
* 1. Modify build script to install llvm-project next to ONNF. The build script used to install llvm-project inside ONNF, which didn't make sense.
* 1. Check out code to ONNF directory.
* 1. Pass path parameter correctly.
* 1. Debugging buildbot.
* 1. Remove debug code.
* 1. Update installation instructions in README.md.
2. Enforce consistency with scripts used in testing using doc-check.
* 1. Fix error with respect to syntax to build multiple CMake targets.
* 1. Move doc-check to doc_check.
2. Remove directive_config in top-level driver.
* 1. Build onnf and check-mlir-lit separately because only CMake 3.15+ supports building multiple targets in one cmake --build run.
* 1. Use new env variables to locate LLVM-Project.
* 1. Documentation nits.
* 1. Prettify buildbot scripts.
* 1. Fix build script error.
* 1. Support exclude_dirs in DocCheck.
2. Add README for DocCheck.
* 1. Mark python3 interpreter as required.
2. Use imported interpreter target.
* 1. Automatically deduce doc file extension in DocCheckCtx.
2. Rename ctx.open -> ctx.open_doc since it should only be used to open doc file.
3. Always read line in parser, instead of reading lines in driver and then passing it to parser.py.
* 1. Rename parser -> doc_parser due to name conflict with python built-in module.
2. Explose doc_check module directory first before importing; otherwise if the doc_check utility is invoked by other script, importing will not work correctly.
* 1. Keep renaming parser -> doc_parser.
2. Explicitly define a default configuration parser that parses the configuration into a python dictionary.
* 1. Add test for doc-check.
2. Exclude doc-check tests from project dock-check because base directory is different.
* 1. Raise ValueError if directive configuration fails to parse.
2. Format code.
* Shorten test case documentation.
Show example of using same-as-file directive, check with DocCheck.
* 1. Shorten test case documentation.
2. More documentation, check documentation with DocCheck.
* 1. Add copyright notice.
* 1. Make documentation clearer.
2. Prettify build-scripts.
* 1. Provide more documentation.
2. Fix some non-compliance with pep8 recommendations.
Co-authored-by: Gheorghe-Teodor Bercea <gt.bercea@gmail.com>