* Define krnl.permute op.
* Support krnl.permute operation.
* Properly remove loop references.
* Re-push, Github was down.
* Need to debug interpretOp error.
* Fix lowering bug by erasing ops after full krnl IR interpretation is done, and clean up & comment code.
* Introduce permute, unroll operations.
* More debug.
* Remove std::set.
* krnl.terminate fails to be converted.
* Pass all tests, need to add legal ops as well as part of the conversion target.
* Change test format to new permute spec.
* Bug fix for nested iterate op lowering.
* Simplify error reporting.
* Fix compilation error.
* Increase comments coverage.
* Remove unnecessary imports.
* Re-trigger Jenkins
* Add permute/unroll tests.
* Retrigger Jenkins
* initial implementation of gather
* added tests
* format
* remove affine load for second load, as it uses an indirection
* changes suggested by reviewers
* remove backend tests until I can verify them locally
Co-authored-by: Tian Jin <tjingrant@gmail.com>
* Add lowering of Vector dialect for lower-all-llvm pass
* Fix generating CallOp instructions when return type is void
* Fix lowering of memref
* Reformat using clang-format
* Record more context.
* Reflow comments.
Co-authored-by: Tian Jin <tjingrant@gmail.com>
* Define krnl.permute op.
* Support krnl.permute operation.
* Properly remove loop references.
* Re-push, Github was down.
* Need to debug interpretOp error.
* Fix lowering bug by erasing ops after full krnl IR interpretation is done, and clean up & comment code.
* Introduce permute, unroll operations.
* More debug.
* Remove std::set.
* krnl.terminate fails to be converted.
* Pass all tests, need to add legal ops as well as part of the conversion target.
* Change test format to new permute spec.
* Bug fix for nested iterate op lowering.
* Simplify error reporting.
* Fix compilation error.
* Increase comments coverage.
* Remove unnecessary imports.
* Re-trigger Jenkins
* Add permute/unroll tests.
* Retrigger Jenkins
* remove & (ref) for Attributes
Co-authored-by: Tian Jin <tjingrant@gmail.com>
* Define krnl.permute op.
* Support krnl.permute operation.
* Properly remove loop references.
* Re-push, Github was down.
* Need to debug interpretOp error.
* Fix lowering bug by erasing ops after full krnl IR interpretation is done, and clean up & comment code.
* Introduce permute, unroll operations.
* More debug.
* Remove std::set.
* krnl.terminate fails to be converted.
* Pass all tests, need to add legal ops as well as part of the conversion target.
* Change test format to new permute spec.
* Bug fix for nested iterate op lowering.
* Simplify error reporting.
* Fix compilation error.
* Increase comments coverage.
* Remove unnecessary imports.
* Re-trigger Jenkins
* Add permute/unroll tests.
* Retrigger Jenkins
* transpose fusion and removal
* format
* fix comments
Co-authored-by: Tian Jin <tjingrant@gmail.com>
* Use && instead of and for Windows
* Simulate fork on Windows by redirecting stderr
* Use exisiting onnx-mlir instead of cloning from master
* Update python3 libary for azo
* avoid git add .vscode
* revert change
Co-authored-by: Gheorghe-Teodor Bercea <gt.bercea@gmail.com>
* Add shape inference and names
- Add shape inference for PRelu
- Fix shape inference for group conv
for ConvTranspose
- Add input and output names for
graphs (functions)
- Add support for (u)int8 tensor
attributes
* Fix format issues
* Revert formatting for gen_onnx_mlir.py
* Pads can have ArrayAttr and DenseElementsAttr so support both
* NumInputs is the number of graph inputs that don't have initializers
* Add test for 2D batchnorm
* Fix typo in define_loops in new 2d BN test
* Change 'name' to 'onnx_node_name'
* Fix Batchnorm for 2D I/O and add lowering test
Co-authored-by: Gheorghe-Teodor Bercea <gt.bercea@gmail.com>
* Create gtest submodule and point benchmark to master
* Added submodule files for gtest
* Update benchmark submodule
* Add googletest to top level cmake so that any gtest_adds are not dependent on benchmark.
* Update buildbot, circle CI and travis CI
* Copy test-onnx-mlir.sh to docker container
* build dependencies for tests
Co-authored-by: Tian Jin <tjingrant@gmail.com>
* Rewriting rule
* Fix formulas
* Reuse op results
* Const propagation for Div and Sqrt
* Explicitly use ONNXConstantOp
* Minor revise
* Const propagation for unsqueeze
* Do const propagationnce all tensors have inferred shapes
* LIT tests for fusion
* Add LIT tests for constant propagation on Div, Sqrt, and Unsqueeze
* Missing dash
Co-authored-by: Tian Jin <tjingrant@gmail.com>
* move scalerop to decompose
* change clang format
* change clang format
* add shape inference for scaler op
* fixing generated onnxop
* generate onnx.md
* redo get onnx.md and onnxop.td.inc using onnx 1.6
* Add shape inference for scaler op
* add benefit for scaler decompose and simplify scaler shape inference
* add scaler decompose benefit num and simplify shape inference
* add cast builder
* cast rewrite only for float
* add cast op same type rewrite rule
* working on cast lowering
* cast lowering working
* add cast lowering
* fix format
* Delete OpBuildTable.inc
* complete requested changes
Co-authored-by: chentong319 <chentong@us.ibm.com>
* Update LLVM commit ID to include to the new modeling of LLVM type in MLIR
* Fix commit id discrepancy
* Update README.md
* Update MLIR version
* Force rebuild prereq dockers and see what happens.
* Use LLVM commit ID that corresponds to MLIR News, 13th edition (8/7/2020)
Co-authored-by: Tian Jin <tjingrant@gmail.com>
* Reorganize main function.
* Follow review comments.
* Emit constants are globals in Krnl and LLVM dialects.
* Make mempooling more robust.
* Fix.
* Update MainUtils.cpp
Additional canonicalization not required anymore.
* 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
* working on cast lowering
* cast lowering working
* correct onnx version
* update onnx md
* add test for tensor<10xf64>
* Add shape inference for Ops used by BERT
* Erf
* Pow
* ReduceMean
* Dropout
* Expand
https://github.com/onnx/onnx/blob/master/docs/Operators.md#expand
Deduce the value of the shape operand by looking at the producer
of the operand.
Currently supported producers are: onnx.Constant and onnx.Shape.
* Add corresponding tests for each op.
* Sort the list of ops with shape inference in gen_onnx_mlir.py
in alphabetic order for clarity.
* Restart CI
Co-authored-by: Tian Jin <tjingrant@gmail.com>
* catch errors after build command
* remove spaces
* use %ERRORLEVEL% instead
* move modification to CI command only
* add extra nextline to prevent modification
* base implementation
* add example
* change table gen
* docs
* small change for review
Co-authored-by: Alexandre Eichenberger <alexe@us.ibm.com>
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
* Fix MainUtils.cpp compilation on Windows
* Fix clang-format
* Update comments on Windows not to delete the constant pack object file
* 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>
* Define krnl.permute op.
* Support krnl.permute operation.
* Properly remove loop references.
* Re-push, Github was down.
* Need to debug interpretOp error.
* Fix lowering bug by erasing ops after full krnl IR interpretation is done, and clean up & comment code.
* Introduce permute, unroll operations.
* More debug.
* Remove std::set.
* krnl.terminate fails to be converted.
* Pass all tests, need to add legal ops as well as part of the conversion target.
* Change test format to new permute spec.
* Bug fix for nested iterate op lowering.
* Simplify error reporting.
* Fix compilation error.
* Increase comments coverage.
* Remove unnecessary imports.
* Re-trigger Jenkins
* Add permute/unroll tests.
* Retrigger Jenkins
* Using a non-trivial example.
* Add more complex example/test case.
* 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
* Reorganize main function.
* Follow review comments.
* Emit constants are globals in Krnl and LLVM dialects.
* Add support for moving dynamic alloca instructions to top of functions.
* Fix memory pooling tests.
* Various fixes.
* Fix lit tests.
* More test fixes.
* Reformat.
* Reformat some more.
* Fix issue with TestConv and split-input-file.
* Use smart pointers.
* Remove redundant pointer.
* Reformat.
* Add initMap description.
* Clean up tests.