Rahul Joshi
44deae2aa1
[MLIR:HLO] Extend AllReduce to support multiple inputs and results (to model tuples).
...
- Instead of SameTypeOperands, add custom verification to check if operands and
results pairwise have the same type.
PiperOrigin-RevId: 353986341
2021-01-26 17:25:22 -08:00
A. Unique TensorFlower
ae2d46414d
[MLIR][KernelGen] Add erfc kernel for f16
...
PiperOrigin-RevId: 353209468
2021-01-22 03:38:30 -08:00
A. Unique TensorFlower
ef8ccdaebc
[MLIR] Add mhlo.logistic lowering to linalg
...
PiperOrigin-RevId: 353205440
2021-01-22 03:03:16 -08:00
A. Unique TensorFlower
c846f925d4
[MLIR][KernelGen] Add chlo.erfc lowering for f32
...
PiperOrigin-RevId: 353201886
2021-01-22 02:33:21 -08:00
Tim Shen
d1c785381d
[XLA/GPU] Add XLA HLO -> LMHLO conversion to several ops, and implement them in XLA/GPU.
...
PiperOrigin-RevId: 353158172
2021-01-21 19:57:54 -08:00
Hanhan Wang
e2d60e01ba
Fix CMakeLists.txt
...
This is the followup of `7aa64ee0b791` The dep was added in BUILD, but not CMakeLists.txt
PiperOrigin-RevId: 353078811
2021-01-21 12:42:35 -08:00
A. Unique TensorFlower
1a37078132
[MLIR][KernelGen] Add chlo.erfc lowerings for f64
...
PiperOrigin-RevId: 352993223
2021-01-21 04:42:56 -08:00
A. Unique TensorFlower
bec2e625a2
[MLIR][KernelGen] Add approximation lowering for mhlo.erf operation on f64
...
PiperOrigin-RevId: 352977456
2021-01-21 02:48:43 -08:00
Alexander Belyaev
7aa64ee0b7
[MLIR] Migrate TF from STD complex ops to ComplexDialect.
...
PiperOrigin-RevId: 352966408
2021-01-21 01:22:25 -08:00
Stephan Herhut
70a351f301
Add chlo.acosh operation and associated lowerings.
...
PiperOrigin-RevId: 352839289
2021-01-20 11:43:44 -08:00
Jacques Pienaar
a7e645f37e
Fix incorrect include
...
PiperOrigin-RevId: 352820426
2021-01-20 10:24:41 -08:00
Tres Popp
ba0346b071
Integrate LLVM at llvm/llvm-project@96ef4f307d
...
Updates LLVM usage to match
[96ef4f307df2](https://github.com/llvm/llvm-project/commit/96ef4f307df2 )
PiperOrigin-RevId: 352786460
2021-01-20 07:09:47 -08:00
A. Unique TensorFlower
ec5f5667e1
[MLIR][KernelGen] Add `tf.Asinh` kernels and complete their lowerings
...
PiperOrigin-RevId: 352773540
2021-01-20 05:31:15 -08:00
A. Unique TensorFlower
0e85b4d511
[MLIR][KernelGen] Add `tf.Asinh` kernels and complete their lowerings
...
PiperOrigin-RevId: 352604725
2021-01-19 10:51:41 -08:00
A. Unique TensorFlower
96fb617413
[MLIR][KernelGen] Add erf kernel and missing lowering for f16 type
...
PiperOrigin-RevId: 352416184
2021-01-18 08:21:15 -08:00
A. Unique TensorFlower
c11ea4ef5a
[MLIR][KernelGen] Add `tf.Atanh` kernels
...
PiperOrigin-RevId: 352393602
2021-01-18 05:14:09 -08:00
A. Unique TensorFlower
3763740910
[MLIR][KernelGen] Add erf kernel for f32 arguments and missing lowerings
...
PiperOrigin-RevId: 352381016
2021-01-18 03:35:13 -08:00
A. Unique TensorFlower
bcdb3c3548
[MLIR] Lower mhlo.clamp to linalg
...
PiperOrigin-RevId: 351998800
2021-01-15 06:45:38 -08:00
A. Unique TensorFlower
791d5afd28
[MLIR][KernelGen] Add `tf.Asinh` kernels and complete their lowerings
...
PiperOrigin-RevId: 351989552
2021-01-15 05:26:57 -08:00
A. Unique TensorFlower
316f630728
[MLIR][KernelGen] Add cosh kernels and tests
...
Allow for relative tolerance in unary kernel tests. In case of the cosh kernels,
this allows to accept an observed difference of 5.6e-8 between the kernel and
the `std::cosh` reference (32829984.568665262 vs. 32829984.568665318) in one of
the test cases.
PiperOrigin-RevId: 351983698
2021-01-15 04:31:30 -08:00
A. Unique TensorFlower
181d2cad31
[MLIR][KernelGen] Add `tf.Log1p` kernel and tests
...
PiperOrigin-RevId: 351566460
2021-01-13 05:37:25 -08:00
Hanhan Wang
300a7c11ce
Upstream mhlo.dot_general lowering to Linalg to MHLO repo
...
PiperOrigin-RevId: 351514250
2021-01-12 22:08:46 -08:00
A. Unique TensorFlower
97a618f91a
Integrate LLVM at llvm/llvm-project@6f4d460762
...
Updates LLVM usage to match
[6f4d46076200](https://github.com/llvm/llvm-project/commit/6f4d46076200 )
PiperOrigin-RevId: 351474229
2021-01-12 16:38:25 -08:00
A. Unique TensorFlower
0b85d5c510
[MLIR][KernelGen] Add asin kernels and tests
...
PiperOrigin-RevId: 351381423
2021-01-12 09:02:46 -08:00
Hanhan Wang
8f58f844e5
Upstream mhlo.dot lowering to Linalg to MHLO repo.
...
We prototyped the lowering from mhlo.dot to linalg.matmul in IREE. Since Linalg
now supports matmul in tensors world, we can move the lowering logic to tensors
world, and upstream to legalize_to_linalg.cc. The patch lowers the mhlo.dot to
the linalg.matmul/matvec/dot in tensors world.
PiperOrigin-RevId: 351184911
2021-01-11 10:35:24 -08:00
Alexander Belyaev
180f917446
[KERNEL_GEN] Add a pattern for hlo.dyn_broadcast->linalg to enable is_inf kernel.
...
PiperOrigin-RevId: 351179620
2021-01-11 10:13:31 -08:00
Alexander Belyaev
ecf1bf5132
[KERNEL_GEN] Add a canonicalization pattern to drop a redundant dynamic reshape.
...
PiperOrigin-RevId: 351141868
2021-01-11 06:38:03 -08:00
Alexander Belyaev
6c42f54298
[KERNEL_GEN] Restrict broadcast -> reshape canonicalization to identity dims.
...
This is needed to avoid the case, when the broadcast_in_dims also performs permutation.
PiperOrigin-RevId: 350650342
2021-01-07 15:30:28 -08:00
Alexander Belyaev
095dc28e5c
[KERNEL_GEN] Add canonicalizaton pattern to drop a redundant broadcast op.
...
PiperOrigin-RevId: 350105790
2021-01-05 03:01:00 -08:00
Adrian Kuegel
50fc56a208
Fix header include.
...
It should not have the third_party prefix, this doesn't work in open source.
PiperOrigin-RevId: 348905548
2020-12-24 01:40:31 -08:00
A. Unique TensorFlower
b0bf2ef45b
Integrate LLVM at llvm/llvm-project@c3acda0798
...
Updates LLVM usage to match
[c3acda0798f9](https://github.com/llvm/llvm-project/commit/c3acda0798f9 )
PiperOrigin-RevId: 348896724
2020-12-23 23:53:54 -08:00
Stephan Herhut
ccdd07f8e4
Prepare to remove tensor_load and tensor_store special handling from hlo to lhlo legalization.
...
This updates the tests to no longer rely on tensor_store. Once all users of this behavior have adopted, the tensor_store support will be removed.
PiperOrigin-RevId: 348624899
2020-12-22 06:29:12 -08:00
A. Unique TensorFlower
c4accdcc41
Integrate LLVM at llvm/llvm-project@1b97cdf885
...
Updates LLVM usage to match
[1b97cdf885d6](https://github.com/llvm/llvm-project/commit/1b97cdf885d6 )
PiperOrigin-RevId: 348587513
2020-12-21 23:49:18 -08:00
Tres Popp
a42213b870
Define lowering of [l]mhlo.pow.
...
For floating point operations, this uses std.pow.
For integer operations, this lowers to a loop.
This adds a dependency on scf.
PiperOrigin-RevId: 348537232
2020-12-21 15:27:40 -08:00
Smit Hinsu
9466cffaf3
Restrict CHLO Acos and Sinh op lowering to non complex types
...
These are failing for complex types. Complex types require special handling. We have a fallback lowering for these ops so we can disable complex element types for now.
PiperOrigin-RevId: 348205002
2020-12-18 11:32:10 -08:00
Smit Hinsu
8d051723c0
Use InferTypeOpInterface for HLO AbsOp and fix result shape inference
...
Shape inference in case of ops with complex element types need to use the element type of complex as the result element type and not the full operand type.
Before:
"mhlo.abs"(%arg0) : (tensor<4xcomplex<f32>>) -> tensor<4xtensor<4xcomplex<f32>>>
After:
"mhlo.abs"(%arg0) : (tensor<4xcomplex<f32>>) -> tensor<4xf32>
PiperOrigin-RevId: 348123967
2020-12-17 17:37:07 -08:00
Smit Hinsu
737d15ded5
Handle operands with zero elements in HLO PadOp folder
...
PiperOrigin-RevId: 348034821
2020-12-17 09:27:36 -08:00
Christian Sigg
dc7e63f74c
Use mlir::OpState::operator->() to get to methods of mlir::Operation.
...
This is a preparation step to remove those methods from OpState.
PiperOrigin-RevId: 348010582
2020-12-17 06:29:33 -08:00
Christian Sigg
099c130daf
Fix MLIR include paths.
...
PiperOrigin-RevId: 347976151
2020-12-17 00:56:04 -08:00
A. Unique TensorFlower
5da9190dd9
Integrate LLVM at llvm/llvm-project@0cf7e4b252
...
Updates LLVM usage to match
[0cf7e4b252fe](https://github.com/llvm/llvm-project/commit/0cf7e4b252fe )
PiperOrigin-RevId: 347948887
2020-12-16 20:30:17 -08:00
Adrian Kuegel
61244b136c
Try to avoid a segfault if we don't support a lowering.
...
It can happen that a lowering for a certain type is not implemented yet.
We should not segfault in such a case, but instead return a failure().
PiperOrigin-RevId: 347801106
2020-12-16 04:58:17 -08:00
Alexander Belyaev
e6e8920921
[KERNEL_GEN] Switch the pipeline to Linalg-on-Tensors.
...
PiperOrigin-RevId: 347781190
2020-12-16 01:51:15 -08:00
Tres Popp
6d7812bbc5
Correct non ConversionRewriter transformation in LegalizeToLinalg
...
PiperOrigin-RevId: 347622657
2020-12-15 08:56:58 -08:00
Alexander Belyaev
ddda2699fb
[KERNEL_GEN] Switch the pipeline to Linalg-on-Tensors.
...
PiperOrigin-RevId: 347600145
2020-12-15 06:32:25 -08:00
River Riddle
9540e51617
[mlir][NFC] Replace usages or mlir/IR/StandardTypes.h with mlir/IR/BuiltinTypes.h
...
StandardTypes.h was moved to BuiltinTypes.h and is being removed.
PiperOrigin-RevId: 347559927
2020-12-15 00:59:29 -08:00
Tres Popp
9df327d88f
Forward listeners in LhloLegalizeToParallelLoops builders
...
PiperOrigin-RevId: 347554379
2020-12-15 00:13:15 -08:00
Hanhan Wang
1a58f19664
[NFC] Make function names follow style guide.
...
Functions should start with a capital letter and have a capital letter for each
new word. See https://google.github.io/styleguide/cppguide.html#Function_Names
PiperOrigin-RevId: 347420402
2020-12-14 10:46:55 -08:00
Alexander Belyaev
8b35a75d4a
[KERNEL_GEN] Switch the pipeline to Linalg-on-Tensors.
...
PiperOrigin-RevId: 347368063
2020-12-14 05:46:47 -08:00
River Riddle
6b439f7eee
[mlir][NFC] Replace usages or mlir/IR/StandardTypes.h with mlir/IR/BuiltinTypes.h
...
StandardTypes.h was moved to BuiltinTypes.h and is being removed.
PiperOrigin-RevId: 347115952
2020-12-11 19:01:25 -08:00
River Riddle
3abdd556de
[mlir][NFC] Replace usages or mlir/IR/StandardTypes.h with mlir/IR/BuiltinTypes.h
...
StandardTypes.h was moved to BuiltinTypes.h and is being removed.
PiperOrigin-RevId: 347111863
2020-12-11 18:12:59 -08:00