Commit Graph

13 Commits

Author SHA1 Message Date
Tung D. Le e32f531546
Add the split marker to test files (#90)
Co-authored-by: Tian Jin <tjingrant@gmail.com>
2020-04-16 15:17:27 +08:00
Tung D. Le f4fefcf713
Re-add tanh lowering (#75)
* Re-add tanh lowering

* Make the emission deterministic
2020-04-09 14:22:36 +08:00
Gheorghe-Teodor Bercea 1622b9f161
[NFC] Change ONNF based names to ONNX-MLIR (#32)
* Rename onnf to onnx-mlir.

* Change workspace name.
2020-03-17 09:16:33 -04:00
Tian Jin 51b0f4c9dd
Chentong319 attribute with variant (#25)
* change the read-in of attribute, using variant

* Use backported variant.

* Reduce code duplication.

* 1. Make array attribute parsing more clear.
2. int -> int64_t.

* 1. Fix how array attributes are imported.

* 1. Fix clang-tidy warnings.

* 1. Nit: fix clang-tidy warnings.

* Fix MaxPool node construction.

* Fix call to MaxPool.

* Comment out backend tests that fail.

* Add path to variant submodule to enable include file detection.

* Allow unused argument to avoid special casing generator.

* Address attribute related e2e test failures for Hard sigmoid,Elu,LeakyRelu,Selu,Softmax

Co-authored-by: chentong319 <chentong@us.ibm.com>
Co-authored-by: Gheorghe-Teodor Bercea <gt.bercea@gmail.com>
2020-01-21 19:36:21 -07:00
Tung D. Le 44ec333dfa Update test cases 2020-01-08 13:11:57 +09:00
TUNG LEDUC 06a968d4a1 [MLIR] Add broadcasting support for element wise operations (#398)
* Add broadcasting support for elementwise operations

* Remove MLIRDialect from MLIRWholeArchiveLibs

* Rewrite getLoopIVsForBroadcasting

* Compute dimensions for allocating result memory

* Compute dimensions for allocating result memory (revised)

* Use static dimension for element-wise operation testcases

* Add a test for addition with broadcasting

* Missed Traits.h when merging

* Revise

* Update SharedWork.md

* Broadcasting for variadic operations

* Edit comments

* Update SharedWork.md

* Reorganize the code

* Add CHECK-LABEL for test_add_with_broadcasting
2019-12-21 02:08:27 -05:00
Haruki Imai 7e3f96e642 [MLIR] Add support for Reciprocal (#397)
* Added support for Reciprocal

* Fixed format
2019-12-21 02:07:44 -05:00
TUNG LEDUC 5ed79083d5 [MLIR] Add support for Max, Min, Sum, Elu, Selu, LeakyRelu, HardSigmoid (#395)
* Lower ONNXSumOp

* Add inferShapes() and test cases

* Load the first operand to the result

* Update SharingWork.md

* Update SharingWork.md

* Update SharingWork.md

* Add support for Max, Min

* Pass operation instead of location to mapToLowerScalarOp

* Add support for Elu, Selu, LeakyRelu, HardSigmoid

* Add test cases

* Update SharingWork.md

* Rewrite the part of lowering variadic ops and use it for binary ops

* Use two diffenrent templates for Unary and Variadic Ops

* Revise the code
2019-12-21 02:02:09 -05:00
TUNG LEDUC 45608282e0 [MLIR] Add support for Relu (#392)
* Add support for Relu

* Add comments
2019-12-21 01:38:16 -05:00
TUNG LEDUC 1c3176bf9f [MLIR] Lower ONNX element-wise unary ops: Exp, Tanh, Sinh, Cosh, Sigmoid (#389)
* Lower ExpOp

* Lower ONNXTanhOp

* Lower Exp Tanh, Sinh, and Cosh

* Lower ONNX Sigmoid op

* Merge

* Specialize template lowerScalarOp

* Unify ONNXEWUnaryOpLowering and ONNXEWBinaryOpLowering

* Support multiple types

* Reformat the code

* Add test cases

* Reformat the code

* Change names

* Apply clang-format

* Update variable names
2019-12-21 01:37:29 -05:00
Tian Jin 0048f2fd86 clean up 2019-12-21 01:36:03 -05:00
TUNG LEDUC c3ef1d93ae [MLIR] Lower ONNX element-wise binary ops: Mul, Div, Sub, And, Or, Xor (#388)
* Lower ONNX element-wise binary ops: Mul, Div, Sub, And, Or, Xor

* Edit gen_doc.py to avoid changes about AnyTypeOf<[AnyMemRef, AnyTensor]>

* Miss a space

* Add tests

* Shorten ONNXElementWiseBinaryOpLowering into ONNXEWBinaryOpLowering

* Move lowering patterns into runOnModule()

* Redundant space
2019-12-21 01:35:31 -05:00
GHEORGHE-TEOD BERCEA 7fb2f80dce [MLIR] Add support for dealloc insertion (#386)
* Add support for dealloc op.

* Check dealloc for returned result not present.
2019-12-21 01:34:48 -05:00