* emitConstantOp with a given type
* Helper functions to create infinity constants
* Use new constant helper functions for MaxPoolSingleOut
Co-authored-by: Gheorghe-Teodor Bercea <gt.bercea@gmail.com>
* Lower MaxPoolSingleOutOp to Krnl dialect
* Edit comments
* Update changes according to the new folder structure
* Add MLIR tests
* Support ceil_mode
* Merge the first two krnl loops into one krnl loop; remove attribute checks
* Dynamically allocate memory for the result if the result has unknown dimensions
Co-authored-by: Gheorghe-Teodor Bercea <gt.bercea@gmail.com>
* 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>
* helper to gen krnl code, applied to conv
* suggested changes, name, removed set insertion point
* format
* suggested changes
* added comments and made a small name change
* 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 result type inference to op definition
* Edit MLIR tests
* Fix result type for Mul
* Format comments
* Return UnrankedTensorType as result type
* Just for testing -split-input-file
* Undo: Just for testing -split-input-file
* Extract a function, get_operand_ins, that gets operand types; rewrite gen_attr_ins function
* Generate custom builders
* Call existing build methods
* Add comments
* Minor changes
* Generate build methods with attributes
* Add support of variadic type
* Do not generate custom build methods for ops having only attributes
Co-authored-by: Gheorghe-Teodor Bercea <gt.bercea@gmail.com>
* 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>
* Get memreftype for result types
* Revise
* Replace convertToMemRefType
* Use convertToMemRefType in ONNXConvNoBiasOpLowering
* Merge with the master branch
* Reverse an unintentional change
Co-authored-by: Gheorghe-Teodor Bercea <gt.bercea@gmail.com>
* Create two categories: elementwise and tensor
* typos
* Create directories for categories
* Edit comments
* Extract a function that creates a KrnlIterateOp
* Add comments
* Extract some common parts
* Revise softmax
* Add reduction.inc
* Move lower-frontend to lib/conversion
* Move directory to directory
* Change file/directory names
* Comment format
* Add matmul.inc
* 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>