- 10 Sep, 2019 2 commits
-
-
Diego Caballero authored
* [MLIR] Enable LIT testing in CMAKE This PR enables LIT testing in nGraph for MLIR Compiler, introduced in PR3523. We can now do `make check-mlir-lit` to run LIT tests. * Address feedback * Revisit PR after cmake clean-up * [MLIR] Introduce ngraph-opt tool To be used, among other things, for LIT testing. `elementwise_binary_ops.mlir` shows a simple LIT test using ngraph-opt. Dummy affine_lowering/lit_test.mlir test that served as initial testing of LIT tool configuration is now removed. * Address feedback
-
Nagy Mostafa authored
* Bump MLIR version and minor fixes in nGraph * advance commit ids * fix commit id
-
- 06 Sep, 2019 1 commit
-
-
Diego Caballero authored
-
- 05 Sep, 2019 1 commit
-
-
Nagy Mostafa authored
* Don't hold to shared pointers after sub-graph extraction pass is done * style
-
- 04 Sep, 2019 2 commits
-
-
Amy Zhuang authored
-
Diego Caballero authored
* [MLIR] Move MLIR compiler files to contrib/mlir/compiler We'll add contrib/mlir/tools directory in subsequent PRs for ngrpah-opt and other tools. * [MLIR] Clean up MLIR related CMake files This PR prepares the introduction of src/contrib/mlir/tools and LIT testing by refactoring and cleaning up the common part with src/contrib/mlir/compiler: - Common code for src/contrib/mlir/tools and src/contrib/mlir/compiler is moved to src/contrib/mlir/CMakeList.txt. - More generic code, common for src/contrib/mlir/* and LIT configuration files, is moved to cmake/external_mlir.cmake with pre-existing similar code. - Redundant environment var LLVM_DIR is removed in favor of LLVM_CMAKE_PATH. - Redundant cmake messages are removed. * Replacing LLVM_CMAKE_PATH with LLVM_DIR
-
- 30 Aug, 2019 2 commits
-
-
Nagy Mostafa authored
* Op decl. No verification * WIP * WIP: Add lowerer support * Code-gen works. * Added padding support. Needs MLIR fix to work * Remove Padding support for now * Fix arrayref init. Disable tests where reshape optimization don't apply * clean up and style apply * Address PR feedback
-
Diego Caballero authored
We'll add contrib/mlir/tools directory in subsequent PRs for ngrpah-opt and other tools.
-
- 29 Aug, 2019 1 commit
-
-
Nagy Mostafa authored
* WIP * Fix incorrect CK output adjustment * Bug fix and enroce sanity check * Change cycle search depth, and fix sanity check * cpu_fusion.validate_fuse_gru_inputs passes. * Fix as_single_output to be able to always create a GOE * minor fix. style-apply * Clean up debug msgs * Switch to backward cycle check * Enable failing test * PR fixes * Address feedback: Add fwd cycle checks. Make cycle checking depth configurable
-
- 28 Aug, 2019 1 commit
-
-
Diego Caballero authored
-
- 27 Aug, 2019 1 commit
-
-
Diego Caballero authored
This PR is a stepping stone towards unifying nGraph MLIRCompiler printing flags with those used in MLIR. It enables flag -print-ir-after-all implemented in MLIR pass manager and adds flag -print-ngraph-ir-after-all to MLIRCompiler so that we can use it to dump IR for those transformations that we do directly in MLIRCompiler without using a proper pass. Eventually, everything should be working as a pass and the nGraph variant of the flag shouldn't be needed. NGRAPH_MLIR_DUMP_ALL macro is no longer needed.
-
- 23 Aug, 2019 1 commit
-
-
Diego Caballero authored
* [MLIR] Bump MLIR repo 8/20/2019 MLIR_ commit 0cdb20a6add19bc96c20dad28589a1e54e4d8469 Author: Lei Zhang <antiagainst@google.com> Date: Tue Aug 20 13:33:41 2019 -0700 Add spv.specConstant and spv._reference_of LLVM: commit 3b9a27b6908040881dad394022f8c472c15c0784 Author: Simon Pilgrim <llvm-dev@redking.me.uk> Date: Tue Aug 20 17:54:37 2019 +0000 Fix typo in comment. NFCI. * Address Bob's feedback
-
- 19 Aug, 2019 1 commit
-
-
Nagy Mostafa authored
-
- 17 Aug, 2019 2 commits
-
-
Diego Caballero authored
This PR starts the modular approach that we discussed to enable clang-format on comments so that they are automatically formatted instead of having to do that manually. It only covers the src/contrib directory.
-
Nagy Mostafa authored
* Use f64 APFloat * PR feedback
-
- 16 Aug, 2019 2 commits
-
-
Diego Caballero authored
* [MLIR] Disable support for boolean type in MLIR Ops on boolean types are currently not supported by MLIR Compiler until the proper i1<->i8 type conversion mechanism is in place. * Add example. * Fix typo
-
Nagy Mostafa authored
* Copy outputs only if the use is outside the sub-graph * Use unordered_set find
-
- 15 Aug, 2019 2 commits
-
-
Nagy Mostafa authored
* Fix cycle detection during sub-graph construction * small refactor * style-apply
-
Diego Caballero authored
Python rounding is not supported yet in nGraph dialect.
-
- 14 Aug, 2019 2 commits
-
-
Diego Caballero authored
* [MLIR] Bump MLIR repo to commit c636f12, 08/09/2019 MLIR Commit: commit c636f127ee412ef7279ec0d550f42740824cd9ea Author: Alex Zinenko <zinenko@google.com> Date: Fri Aug 9 08:59:45 2019 -0700 LLVM dialect and translation: support global strings LLVM Commit: commit c636f127ee412ef7279ec0d550f42740824cd9ea Author: Alex Zinenko <zinenko@google.com> Date: Fri Aug 9 08:59:45 2019 -0700 LLVM dialect and translation: support global strings * [MLIR] Set optimization level for LLVM optimizer and codegen Now both LLVM optimizer and codegen are aligned with "NGRAPH_MLIR_OPT_LEVEL" macro. * [MLIR] Enable LLVM vectorization by initializing TTI This is the final piece to enable LLVM vectorization for MLIR compiler. The PR refactors the creation of a target machine in MLIRCompiler so that we can use it to initialize TargetTransformInfo with the proper host features and LLVM Loop Vectorizer can get the right vector register information of the target CPU.
-
Nagy Mostafa authored
-
- 13 Aug, 2019 1 commit
-
-
Diego Caballero authored
Now both LLVM optimizer and codegen are aligned with "NGRAPH_MLIR_OPT_LEVEL" macro.
-
- 10 Aug, 2019 1 commit
-
-
Diego Caballero authored
MLIR Commit: commit c636f127ee412ef7279ec0d550f42740824cd9ea Author: Alex Zinenko <zinenko@google.com> Date: Fri Aug 9 08:59:45 2019 -0700 LLVM dialect and translation: support global strings LLVM Commit: commit c636f127ee412ef7279ec0d550f42740824cd9ea Author: Alex Zinenko <zinenko@google.com> Date: Fri Aug 9 08:59:45 2019 -0700 LLVM dialect and translation: support global strings
-
- 09 Aug, 2019 2 commits
-
-
Nishant Patel authored
* Add negative op * Add test case * Address feedback * Merge master * Consolidate to one routine for unary ops * Change from Negative to Neg
-
Diego Caballero authored
* [MLIR] Enable affine loop tiling This PR enables loop tiling optimization in affine dialect. It introduces the following flags for configuration. - affine-loop-tile: enables/disables the optimization. Disabled by default. - loop-tile-cache-level: provides the cache level to which apply loop tiling to. Cache level size is obtained from LLVM's TTI. - loop-tile-cache-size: provides a cache level size that overrides cache information from TTI. The current use of TTI is a bit hacky since we have to pass a fake LLVM's function to make it work. However, this should be enough to get some basic target information until we have a target model in MLIR or find a better approach. * Address feedback * Rename flags
-
- 07 Aug, 2019 1 commit
-
-
Robert Kimball authored
-
- 01 Aug, 2019 1 commit
-
-
Diego Caballero authored
-
- 31 Jul, 2019 1 commit
-
-
Sang Ik Lee authored
-
- 30 Jul, 2019 1 commit
-
-
Diego Caballero authored
* [MLIR] Bump MLIR repo to commit 59167c2, 07/25/2019. MLIR commit: Author: River Riddle <riverriddle@google.com> Date: Wed Jul 24 16:41:11 2019 -0700 NFC: Use ValueOfRange instead of T in Diagnostic::appendRange. For iterator_range, T is often the name of another iterator type and not the the value of the range. LLVM commit: Author: Marshall Clow <mclow.lists@gmail.com> Date: Thu Jul 25 03:26:05 2019 +0000 Implement change #4 of P1466: Change weekday to accept both 0 and 7 as Sunday. Add accessors 'c_encoding' and 'iso_encoding' to provide different interpretations of the weekday. Remove 'operator unsigned' * style * Move MLIR/LLVM repos a bit more forward
-
- 29 Jul, 2019 2 commits
-
-
Diego Caballero authored
* [MLIR] Enable affine dialect loop fusion Enable affine dialect loop fusion in nGraph pipeline. It also adds an opt flag to enable/disable it when ngraph-opt is in place. Fusion seems to work for simple cases. It wasn't able to fuse dot + add, though, at least in my test case. One example that worked: Input: %6 = alloc() : memref<2500x2500xf32> affine.for %i3 = 0 to 2500 { affine.for %i4 = 0 to 2500 { %7 = load %arg0[%i3, %i4] : memref<2500x2500xf32> %8 = load %0[%i3, %i4] : memref<2500x2500xf32> %9 = addf %8, %7 : f32 store %9, %6[%i3, %i4] : memref<2500x2500xf32> } } %10 = alloc() : memref<2500x2500xf32> affine.for %i5 = 0 to 2500 { affine.for %i6 = 0 to 2500 { %11 = load %arg2[%i5, %i6] : memref<2500x2500xf32> %12 = load %0[%i5, %i6] : memref<2500x2500xf32> %13 = addf %12, %11 : f32 store %13, %10[%i5, %i6] : memref<2500x2500xf32> } } %14 = alloc() : memref<2500x2500xf32> affine.for %i7 = 0 to 2500 { affine.for %i8 = 0 to 2500 { %15 = load %10[%i7, %i8] : memref<2500x2500xf32> %16 = load %6[%i7, %i8] : memref<2500x2500xf32> %17 = addf %16, %15 : f32 store %17, %14[%i7, %i8] : memref<2500x2500xf32> } } Output: %8 = alloc() : memref<2500x2500xf32> affine.for %i3 = 0 to 2500 { affine.for %i4 = 0 to 2500 { %9 = load %arg2[%i3, %i4] : memref<2500x2500xf32> %10 = load %2[%i3, %i4] : memref<2500x2500xf32> %11 = addf %10, %9 : f32 %12 = affine.apply #map2(%i3, %i4, %i3, %i4) %13 = affine.apply #map3(%i3, %i4, %i3, %i4) store %11, %0[%12, %13] : memref<1x1xf32> %14 = load %arg0[%i3, %i4] : memref<2500x2500xf32> %15 = load %2[%i3, %i4] : memref<2500x2500xf32> %16 = addf %15, %14 : f32 %17 = affine.apply #map2(%i3, %i4, %i3, %i4) %18 = affine.apply #map3(%i3, %i4, %i3, %i4) store %16, %1[%17, %18] : memref<1x1xf32> %19 = affine.apply #map2(%i3, %i4, %i3, %i4) %20 = affine.apply #map3(%i3, %i4, %i3, %i4) %21 = load %0[%19, %20] : memref<1x1xf32> %22 = affine.apply #map2(%i3, %i4, %i3, %i4) %23 = affine.apply #map3(%i3, %i4, %i3, %i4) %24 = load %1[%22, %23] : memref<1x1xf32> %25 = addf %24, %21 : f32 store %25, %8[%i3, %i4] : memref<2500x2500xf32> } } * Rename MLIR_LLVM_OPTIONS to NGRAPH_MLIR_OPTIONS Something like this works now: NGRAPH_MLIR_OPTIONS="--enable-affine-loop-fusion=false" * Disable loop fusion by default and fix typo
-
nmostafa authored
-
- 26 Jul, 2019 4 commits
-
-
nmostafa authored
-
Diego Caballero authored
-
Nagy Mostafa authored
* Deallocate all temp tensors before return * style-apply
-
nmostafa authored
-
- 25 Jul, 2019 1 commit
-
-
Diego Caballero authored
* [MLIR] Fix naming convention in MLIR files Add naming convention note per file to state which files should use nGraph naming convention and which MLIR naming convention and align naming convention in those files with such a note. * Remove m-prefix
-
- 24 Jul, 2019 3 commits
- 23 Jul, 2019 1 commit
-
-
nmostafa authored
-