Commit Graph

24 Commits

Author SHA1 Message Date
gongsu832 72de6eb004
Fix check-onnx-backend build on x86 Linux. (#91) 2020-04-16 14:38:52 +08:00
Tian Jin d06dbfefdd
Specify each lib only once; allow llvm build in shared libs mode. (#77)
* Specify each lib only once; allow llvm build in shared libs mode.

* Remove debug code.

* For library targets, retain dependency information using add_dependencies, but do not link using taget_link_libraries.

* Do not set LD_PRELOAD by default.

Co-authored-by: Gong Su <gongsu@us.ibm.com>
Co-authored-by: Gheorghe-Teodor Bercea <gt.bercea@gmail.com>
2020-04-14 17:40:05 +08:00
Tian Jin 7dba324404
Setup Documentation Page using Github Pages (#76)
* Setup documentation server, move doc files from /doc to /docs as per Github Pages convention.

* Include deleted files in patch.

* /doc -> /docs

* /doc -> /docs

* Update documentation on importing ONNX spec into ONNX Dialect; provide documentation on how to add new documentation pages.
2020-04-09 23:37:04 +08:00
Byron Changuion b65e77305c
Move to more recent LLVM commit ID (#64)
* Move to more recent LLVM commit ID

* Update LLVM cache version from V9 to V10

* Update to latest LLVM commit id from master, roll back conditions in util scripts

* Update circlci LLVM cache tag to ensure ci updates builds with latest LLVM commit id

* Update README.md to have matching LLVM commit id

* Update doc/Dialtects/onnx.md
2020-04-01 12:38:34 -04:00
Gheorghe-Teodor Bercea b3719d486b
Make path relative to onnx-mlir project only (#40)
* Make path relative to onnx-mlir project.

* Use binary root folder path for onnx-mlir.
2020-03-20 12:04:22 -04:00
Tian Jin febee542ee
[NFC] Breakdown CMake Build Scripts to Smaller Parts (#39)
* 1.Break down CMake scripts to smaller libraries per-directory.
2. Move some transformations and interfaces to the right folder.
3. Fix minor merge failure of the patch renaming files to use LLVM convention.

* Link OMBuilder with OMONNXOps.

* 1. Update the src location of generated ONNX dialect definition.
2. Link OMONNXRewrite with OMONNXOps.

* Fix path to tablegen for add_onnx_mlir_dialect_doc.

* Update build script for onnx_mlir_transform.

* 1. Remove comment code.
2. onnx_mlir_attribute_promotion -> OMAttributePromotion.

* Name tablegen generated files with LLVM convention.

* Nit: reorder libraries to link against.

* Nit: Link against MLIR first.
2020-03-20 22:40:51 +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
Gheorghe-Teodor Bercea b28c6906b4
Fix building ONNF with latest LLVM/MLIR (#89)
* Fix build and link errors.

* Fix end to end tests.

* Fix indentation.

* Fix type conversion.

* Use newest LLVM version.

* Use newest LLVM version.
2020-02-19 18:15:02 -05:00
Tian Jin 181803ebf4
Using Tablegen to Generate Op Documentation (#74)
* Add dialect documentation.

* Add a step in our CI to ensure documentation is up-to-date.

* Add dialect documentation.

* Fix config file mistake, using multi-line commands.

* Fix a bug in DocCheck.
2020-02-10 14:18:54 -05:00
Tian Jin 38e7d2d068 Update LLVM_SRC, LLVM_BUILD env vars to LLVM_PROJ_SRC, LLVM_PROJ_BUILD since MLIR is now parallel to LLVM in llvm-project repository. 2020-01-06 15:59:19 -05:00
Tian Jin 33f988e18a Update CMake build script. 2019-12-30 22:41:37 -05:00
Tian Jin 206fb5db67 fix whole-archive link 2019-12-23 11:40:15 -05:00
Tian Jin 50ea6bed03 fix build 2019-12-23 02:09:11 -05:00
Tian Jin 685bf23b40 Enable ONNX Backend Test (#1)
* wip, commit before merging with upstream

* organize API, return wrapped output

* enable onnx backend test

* undo unintentional commit

* fix krnl ops tablegen

* format krnl ops

* reorder fillDynMemRefWithMemRef to be after fillPtrToMemRefWithDynMemRef, better comments

* more onnx backend tests

* ensure that test names refer to existing tests

* improve code readability by shortening type names

* nit

* restore unintentional changes

* more nits

* fix ; -> :

* split runtime implementation into header and body file, add support for data types

* comment on the onnx backend test

* make the comments read better

* do not dump when lowering
2019-12-22 23:14:57 -05:00
Tian Jin 5573cb39fe clean up, remove dependency for boost 2019-12-22 20:33:33 -05: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
Tian Jin b2a1103915 [MLIR] Refactor Krnl Dialect and Krnl Dialect Lowering (#375)
* Store bounds as affine map attributes & check in test cases with generic printer

* Upgrading MLIR

MLIR is outdated on Buildbot, rebuilding a newer version.

* work with new version of mlir

* check-in parser tests

* custom printer

* nit

* bug fix

* enable custom asm printer test

* enable custom asm printer test

* more consistent variable naming

* test max/min

* variable naming scheme change to MLIR style

* can lower krnl to llvm

* kernel -> llvm

* comments

* bug fix

* try fixing ci

* fix ci

* deactivate model test

* fix lit test

* nit

* fix z buildbot
2019-12-21 01:34:14 -05:00
GHEORGHE-TEOD BERCEA 652ce4b7d4 Add test for checking lowering of Add op to KRNL IR (#385)
* Add test for checking lowering of Add op to KRNL IR.

* Add test file.
2019-12-21 01:20:36 -05:00
GHEORGHE-TEOD BERCEA b02652dd76 [MLIR] Lowering of frontend dialect to KRNL dialect (#382)
* Partial support for lowering operations to KRNL dialect.

* Attempt to lower to KRNL IR.

* Update file.

* Add lowering.

* Address comments. Fix alloc dynamic dimensions. Correctly link StandardOps.

* Temporarily remove deallocation of locally allocated tensors.
2019-12-21 01:11:14 -05:00
Tian Jin d01ac7732f [MLIR] compartmentalize build script (#369)
* compartmentalize build script, temporarily remove dependency of onnf_opt on helper.cpp

* fix test includes

* fix op directory include

* compiler -> op

* compiler test depends on boost system

* fix function name

* specify libcompiler dependencies

* let cmake take care of transitive dependencies

* remove unnecessary includes

* use ONNF_SRC_ROOT and ONNF_BIN_ROOT

* allow whole-archive linked libraries to be appended

* [MLIR] Support filecheck (#371)

* support lit+FileCheck

* add lit into build script

* format MLIR.cmake

* format cmake

* [MLIR] Remove input/output ops (#372)

* remove input/output ops

* get output tensor type from symbol table
2019-12-21 00:34:51 -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 02e1e8720f [MLIR] Add onnf-opt Support (#359)
* support onnf-opt, register standard dialect

* use onnf native assertions

* fix build

* nit
2019-12-19 19:31:48 -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