- Dec 16, 2019
-
-
Alex Zinenko authored
During the conversion from the standard dialect to the LLVM dialect, memref-typed arguments are promoted from registers to memory and passed into functions by pointer. This had been introduced into the lowering to work around the abesnce of calling convention modeling in MLIR to enable better interoperability with LLVM IR generated from C, and has been exerciced for several months. Make this promotion the default calling covention when converting to the LLVM dialect. This adds the documentation, simplifies the code and makes the conversion consistent across function operations and function types used in other places, e.g. in high-order functions or attributes, which would not follow the same rule previously. PiperOrigin-RevId: 285751280
-
Tres Popp authored
PiperOrigin-RevId: 285724678
-
- Dec 15, 2019
-
-
Uday Bondhugula authored
- bring op description comment in sync with the doc - fix misformat in doc Signed-off-by:
Uday Bondhugula <uday@polymagelabs.com> Closes tensorflow/mlir#317 COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/317 from bondhugula:quickfix 7fcd945b318c973b2488b702874c87526855c8ef PiperOrigin-RevId: 285574527
-
Smit Hinsu authored
PiperOrigin-RevId: 285574334
-
- Dec 14, 2019
-
-
Nicolas Vasilache authored
This removes a warning and fixes a potential ABI issue on Windows. PiperOrigin-RevId: 285502010
-
Nicolas Vasilache authored
Make the declarative C++ builder API simpler to use so we can start chaining these ops together. PiperOrigin-RevId: 285496266
-
River Riddle authored
This is more efficient, and allows for these to fire in more situations: e.g. createOrFold, DialectConversion, etc. PiperOrigin-RevId: 285476837
-
Jing Pu authored
This is needed for calling the generator on a .td file that contains both OpInterface definitions and op definitions with DeclareOpInterfaceMethods<...> Traits. PiperOrigin-RevId: 285465784
-
Nicolas Vasilache authored
This will be evolved into a simple programming model for custom ops and custom layers in followup CLs. This CL also deletes the obsolete tablegen's reference-impl.td that was using EDSCs. PiperOrigin-RevId: 285459545
-
River Riddle authored
This change allows for DialectConversion to attempt folding as a mechanism to legalize illegal operations. This also expands folding support in OpBuilder::createOrFold to generate new constants when folding, and also enables it to work in the context of a PatternRewriter. PiperOrigin-RevId: 285448440
-
Prakalp Srivastava authored
PiperOrigin-RevId: 285437835
-
Christian Sigg authored
The clamp value determines the returned predicate. Previously, the clamp value was fixed to 31 and the predicate was therefore always true. This is incorrect for partial warp reductions, but went unnoticed because the returned values happened to be zero (but it could be anything). PiperOrigin-RevId: 285343160
-
- Dec 13, 2019
-
-
River Riddle authored
This cleans up the implementation of the various operation print methods. This is done via a combination of code cleanup, adding new streaming methods to the printer(e.g. operand ranges), etc. PiperOrigin-RevId: 285285181
-
Jacques Pienaar authored
Got the comment right but the code wrong :/ PiperOrigin-RevId: 285270561
-
Aart Bik authored
For example, a shuffle %1 = vector.shuffle %arg0, %arg1 [0 : i32, 1 : i32] : vector<2xf32>, vector<2xf32> becomes a direct LLVM shuffle 0 = llvm.shufflevector %arg0, %arg1 [0 : i32, 1 : i32] : !llvm<"<2 x float>">, !llvm<"<2 x float>"> but %1 = vector.shuffle %a, %b[1 : i32, 0 : i32, 2: i32] : vector<1x4xf32>, vector<2x4xf32> becomes the more elaborate (note the index permutation that drives argument selection for the extract operations) %0 = llvm.mlir.undef : !llvm<"[3 x <4 x float>]"> %1 = llvm.extractvalue %arg1[0] : !llvm<"[2 x <4 x float>]"> %2 = llvm.insertvalue %1, %0[0] : !llvm<"[3 x <4 x float>]"> %3 = llvm.extractvalue %arg0[0] : !llvm<"[1 x <4 x float>]"> %4 = llvm.insertvalue %3, %2[1] : !llvm<"[3 x <4 x float>]"> %5 = llvm.extractvalue %arg1[1] : !llvm<"[2 x <4 x float>]"> %6 = llvm.insertvalue %5, %4[2] : !llvm<"[3 x <4 x float>]"> PiperOrigin-RevId: 285268164
-
Jacques Pienaar authored
Add variant that does invoke infer type op interface where defined. Also add entry function that invokes that different separate argument builders for wrapped, unwrapped and inference variant. PiperOrigin-RevId: 285220709
-
Nicolas Vasilache authored
This type is not used anymore now that Linalg view and subview have graduated to std and that alignment is supported on alloc. PiperOrigin-RevId: 285213424
-
Alexander Belyaev authored
PiperOrigin-RevId: 285211797
-
Ehsan Toosi authored
Closes tensorflow/mlir#312 COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/312 from dfki-ehna:tanh 9e89b072ff91ff390ad739501745114feb3ac856 PiperOrigin-RevId: 285205674
-
- Dec 12, 2019
-
-
Nicolas Vasilache authored
This allows reusing the implementation in various places by just including and permits more easily writing test functions without explicit template instantiations. This also modifies UnrankedMemRefType to take a template type parameter since it cannot be type agnostic atm. PiperOrigin-RevId: 285187711
-
Christian Sigg authored
PiperOrigin-RevId: 285162061
-
Christian Sigg authored
Both work for the current use case, but the latter allows implementing prefix sums and is a little easier to understand for partial warps. PiperOrigin-RevId: 285145287
-
River Riddle authored
It is sometimes useful to create operations separately from the builder before insertion as it may be easier to erase them in isolation if necessary. One example use case for this is folding, as we will only want to insert newly generated constant operations on success. This has the added benefit of fixing some silent PatternRewriter failures related to cloning, as the OpBuilder 'clone' methods don't call createOperation. PiperOrigin-RevId: 285086242
-
Nicolas Vasilache authored
PiperOrigin-RevId: 285073483
-
Mahesh Ravishankar authored
PiperOrigin-RevId: 285039153
-
Nicolas Vasilache authored
PiperOrigin-RevId: 285036782
-
Mahesh Ravishankar authored
PiperOrigin-RevId: 285036647
-
Denis Khalikov authored
Closes tensorflow/mlir#313 COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/313 from denis0x0D:sandbox/lowering_std_farith 41715070a74d13bfa9401957478978c1bb8006c0 PiperOrigin-RevId: 285023586
-
Nicolas Vasilache authored
This CL adds more common information to StructuredOpsUtils.h The n_view attribute is retired in favor of args_in + args_out but the CL is otherwise NFC. PiperOrigin-RevId: 285000621
-
Christian Sigg authored
Remove nested anonymous namespace. PiperOrigin-RevId: 284987357
-
Alexander Belyaev authored
Fix the usage of the map size when appending to the map with []. PiperOrigin-RevId: 284985916
-
- Dec 11, 2019
-
-
Alexander Belyaev authored
PiperOrigin-RevId: 284979684
-
Stephan Herhut authored
This enables combining the patterns with other patterns into larger lowerings. PiperOrigin-RevId: 284979271
-
Alexander Belyaev authored
PiperOrigin-RevId: 284949355
-
Marcel Koester authored
Closes tensorflow/mlir#255 PiperOrigin-RevId: 284935454
-
Aart Bik authored
For example, an insert %0 = vector.insert %arg0, %arg1[3 : i32] : f32 into vector<4xf32> becomes %0 = llvm.mlir.constant(3 : i32) : !llvm.i32 %1 = llvm.insertelement %arg0, %arg1[%0 : !llvm.i32] : !llvm<"<4 x float>"> A more elaborate example, inserting an element in a higher dimension vector %0 = vector.insert %arg0, %arg1[3 : i32, 7 : i32, 15 : i32] : f32 into vector<4x8x16xf32> becomes %0 = llvm.extractvalue %arg1[3 : i32, 7 : i32] : !llvm<"[4 x [8 x <16 x float>]]"> %1 = llvm.mlir.constant(15 : i32) : !llvm.i32 %2 = llvm.insertelement %arg0, %0[%1 : !llvm.i32] : !llvm<"<16 x float>"> %3 = llvm.insertvalue %2, %arg1[3 : i32, 7 : i32] : !llvm<"[4 x [8 x <16 x float>]]"> PiperOrigin-RevId: 284882443
-
Andy Davis authored
PiperOrigin-RevId: 284880592
-
Uday Bondhugula authored
Add one more simplification for floordiv and mod affine expressions. Examples: (2*d0 + 1) floordiv 2 is simplified to d0 (8*d0 + 4*d1 + d2) floordiv 4 simplified to 4*d0 + d1 + d2 floordiv 4. etc. Similarly, (4*d1 + 1) mod 2 is simplified to 1, (2*d0 + 8*d1) mod 8 simplified to 2*d0 mod 8. Change getLargestKnownDivisor to return int64_t to be consistent and to avoid casting at call sites (since the return value is used in expressions of int64_t/index type). Signed-off-by:Uday Bondhugula <uday@polymagelabs.com> Closes tensorflow/mlir#202 COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/202 from bondhugula:affine b13fcb2f1c00a39ca5434613a02408e085a80e77 PiperOrigin-RevId: 284866710
-
Alex Zinenko authored
Move the definition of gpu.launch_func operation from hand-rolled C++ implementation to the ODS framework. Also move the documentation. This only performs the move and remains a non-functional change, a follow-up will clean up the custom functions that can be auto-generated using ODS. PiperOrigin-RevId: 284842252
-
Nicolas Vasilache authored
Centralize all patterns that test Linalg transforms in a single pass. PiperOrigin-RevId: 284835938
-