Commit Graph

8 Commits

Author SHA1 Message Date
GHEORGHE-TEOD BERCEA dc36fd416b [MLIR] Fix shape inference and enable ONNF to read in MLIR files. (#367)
* Fix inference. Enable ONNF to read in MLIR files.

* Fix input of onnx or mlir models.

* Address comments.
2019-12-21 00:12:27 -05:00
GHEORGHE-TEOD BERCEA 63596e723f [MLIR] Add optimization based on TableGen pattern (#363)
* Define pattern.

* Fix file names.

* Add canonicalizer optimization based on TableGen pattern.

* Remove custom builders.

* Enable canonicalization in ONNF and ONNF-OPT.
2019-12-21 00:04:51 -05:00
Tian Jin 780e6f0aa0 [MLIR] Krnl Dialect Definition (#357)
* a complete, roud-trippable Krnl dialect operation definition

* remove old dialect definition files, edit build files

* register dialect

* check in src for onnf_opt and dimension handler types

* re-trigger jenkins

* fix build

* clarify operation semantics

* add verifier for krnl.iterate

* refactor to make things clear

* do not hard code types

* nit and add comments

* fix rebase

* update op implementation

* fix merge

* update kernel dialect definition

* more comment on how to use the builder for krnl.iterate operation

* ammend the comment

* can parse krnl.iterate

* can parse and print if bounds are not SSA values

* address comments

* better error handling

* Update CMakeLists.txt

* update comment

* reflow comments
2019-12-20 11:37:09 -05:00
GHEORGHE-TEOD BERCEA 03be41f7df [MLIR] Add shape inference pass (#361)
* Add shape inference pass.

* Format code.

* Enable shape inference pass.

* Rename new files to use ONNF convention.

* Use include path from src folder.

* Replace guards with pragma once.

* Format variable names. Shuffle headers.

* Fix comment.

* Fix comments.
2019-12-19 20:14:07 -05:00
GHEORGHE-TEOD BERCEA 958a2fbffc ONNX Dialect creation and registration with MLIR (#358)
* Create and register ONNX Dialect with one Add operation.

* Fix file formatting.

* Change name from ONNX to SGIR.

* Use ONNX dialect. Change SGIR to frontend placeholder dialect.

* Add comments.

* Type clean-up.
2019-12-19 16:56:30 -05:00
GHEORGHE-TEOD BERCEA 45a5a8499c Fix MLIR-enabled build. (#354)
* Add new build paths. Add Ranker or Unracked tensor types.

* Remove path to LLVM root folder, it is not needed anymore.

* Code clean-up.

* Clean-up code.

* update LLVM_PROJECT_SRC

* Update p9.sh

* Update MLIR.cmake
2019-12-19 16:16:06 -05:00
Tian Jin 00aee2e0b6 Use TableGen (#347)
* use table gen

* fix name of the dialect

* add old compilation path

* add some doc

* fix bug, sgir importer imports every op twice

* knl.visit -> knl.iterate
2019-12-19 15:18:35 -05:00
Doru Bercea 63427030ca Enable building of first commit. 2019-12-19 14:24:37 -05:00