* Remove rank constraints in gemm fusion
* Add an MLIR test
Co-authored-by: Tian Jin <tjingrant@gmail.com>
Co-authored-by: Gheorghe-Teodor Bercea <gt.bercea@gmail.com>
* 1. Combine variadicIn/Out with expectedNumOperands/Results to simplify import function arguments.
2. Generic improvements to code readability in gen_doc.py.
* Update ONNX Dialect doc.
* Remove redundant code in ImportNode.
* Prettify op_build_table.inc.
* 1. Remove irrelevant code in gen_doc.py
* Refactor code to be more readable.
* Further refactoring for readability improvements.
* Allow gemm to have an optional operand (bias term), and include an example of declarative optimization pattern targeting gemm with bias term ommitted.
* Make shape inference/lowering of gemm op compatible with optional operand declaration.
* Apply canonicalization again after lowering from onnx -> std dialects.
* Make hasBias compatible with the situation of GemmNoBias op.
* Update doc.
* Add a canonicalization test.
* Remove special handler for importing Gemm op, as it's redundant now.
* Add ONNXBatchNormalizationTestModeOp and its shape inference
* Lower batchnormalization test mode
* re-use scale, bias, mean, and variance
* Add MLIR tests
* Add e2e tests
* fix typos
* Fix a bug in MLIR tests
* Change type from int to int64_t for indices
* Uncomment e2e tests due to segmentation fault
* Uncomment e2e tests due to segmentation fault
* Revise the code
* [Tian] Fix segmentation fault in e2e tests
* Re-generate onnx.md to include BatchNormalizationTestModeOp
* Reverse an unintentional change
* Fix some typos in comments
* Use convertToMemRefType from the master branch
Co-authored-by: Gheorghe-Teodor Bercea <gt.bercea@gmail.com>
* Allocate memory for matmul's result
* Group cases
* Add support of N-D x N-D, N>=2
* Revise createIterateOperandPack
* Add 1-D x 1-D
* Add 1-D x N-D
* Add MLIR tests
* Change variable names
* Change type from int to int64_t for indices
* Change variable names
* Change int64_t back to int
* Change int64_t back to int
* Change int64_t back to int
* Use decltype
Co-authored-by: Gheorghe-Teodor Bercea <gt.bercea@gmail.com>
Co-authored-by: Tian Jin <tjingrant@gmail.com>
* Fix scalar entry point parameter lowering issue.
* Enable scalar bias test.
* Nit. Improve comments and remove debug code.
* Make helper function static, move to upfront position.
* Move helper function to top of the file.
Co-authored-by: Gheorghe-Teodor Bercea <gt.bercea@gmail.com>
* handle pad op which does not have the optional third argment
* rewrite PadConstantValue with constant pad into PadConstantValuePad
* add test for PadConstantValuePad
* update onnx.md
* Shape inference for reduction
* Lower ReduceSum
* Support list-like attributes
* Add ReduceMax, ReduceMin, ReduceProd
* Add tests
* Emit errors for unsupported types
* Typos
* Add backend test
* Fix axis computation
* Update the use of attributes
* Use SmallVector
* Address stylistic comments
* Change type from int to int64_t for indices
* Change type from int to int64_t for indices
* Ensure data shape is at least 4.
* First version of convolution.
* Simplify code for KRNL lowering.
* Add test without padding or strides.
* Refactor code for lowering frontend operations to KRNL dialect.
* Add test for conv with no bias and no padding.
* Add test with group greater than one.
* Address comment.
* Support lowering of SignOp
* Fixed test code for signop of integer input
* Inserted Sigh and Reciprocal in SharingWork.md (Reciprocal is for past commit 7e3f96e)
* Added test for Sign Op
* Fixed minus_one -> minusOne
* Fixed test for signop
* Rewrite ReduceSumSquare
* Edit gen_doc.py
* Revise the code
* Do shape inference after canonicalization so that there is no need to implement shape inference of rewritten ops
* Rewrite ReduceL2
* Add onnx_rewrite.cpp for all rewriting for ONNX ops
* Rewrite ReduceL1, ReduceLogSum, ReduceLogSumExp
* Edit comments
* Change the use of -> to .
* Checkout gen_doc.py from the master branch
* Use emplace_back instead of push_back
* Revise the code
* Edit comments
Co-authored-by: Tian Jin <tjingrant@gmail.com>
* first steps for shape inference of maxpool
* setps forward
* ongoing
* working version
* first steps for shape inference of maxpool
* setps forward
* ongoing
* working version
* fix errors introduced by github merge
* changes suggested by Doru
* updates
* requested fixes
* reqested changes
Co-authored-by: Gheorghe-Teodor Bercea <gt.bercea@gmail.com>
* Initial implementation
* Support transposing inputs
* Revise unidirectional broadcasting and unknown dimensions
* Revise gemm
* Add testcase
* Rename some variables
* Update SharingWork.md
* Change from the use of Value* to Value
* Insert deallocation
* Initilize the output matrix and fix wrong computation
* Add end-to-end testcases
* Edit lowering tests
* Change attribute names
* Use emplace_push for SmallVector
* Use the new way of getting attributes
* Revise the use of attributes
* Check the bias's shape
Co-authored-by: Gheorghe-Teodor Bercea <gt.bercea@gmail.com>
* Infer shape for Unsqueeze
* Lower Unsqueeze
* Revise
* Turn off backend tests
* Compute tensorSize for static shape
* Compute tensorSize with unknown dims
* Edit tests
* Update the use of attributes
* Add e2e tests
* Use SmallVector
* Remove return
* Check whether the operand is ranked or not
Co-authored-by: Gheorghe-Teodor Bercea <gt.bercea@gmail.com>
* Initial lowering of KrnlSqrtOp
* Fix errors and add a testcase
* typos
* Add the MLIR example
* Restore doc/doc_check/CMakeLists.txt
* Clean the code
* Edit comments
* Remove redundant parts
* Chang the use of -> to .
* Add a test for f64
* Support ONNXSqrtOp
* Fix indentation
Co-authored-by: Gheorghe-Teodor Bercea <gt.bercea@gmail.com>
* add attributes of Op into parameters
* fix rewrite rule for GemmOp with attributes
* use I64Attr instead of I32Attr and modify test cases for the changes in attributes
* add output name (prefixed with o_) to Op definition
* update shape inference for the new attributes
* Support Softplus and Softsign operations
* Add the default shape inference for the transposition operation.
* Fix conflict with master
* Fix conflict with master branch
* Add test for softplus and softsign in test/backend/test.py
* Re-enable Reciprocal tests.
Co-authored-by: Gheorghe-Teodor Bercea <gt.bercea@gmail.com>
Co-authored-by: Tian Jin <tjingrant@gmail.com>