Commit Graph

621 Commits

Author SHA1 Message Date
A. Unique TensorFlower fe2e5a175f [MLIR][HLO] Implement type inference for `is_finite` op
PiperOrigin-RevId: 354261420
2021-01-28 00:56:12 -08:00
A. Unique TensorFlower c653db73c5 Integrate LLVM at llvm/llvm-project@c85b6bf33c
Updates LLVM usage to match
[c85b6bf33c47](https://github.com/llvm/llvm-project/commit/c85b6bf33c47)

PiperOrigin-RevId: 354136678
2021-01-27 11:46:07 -08:00
A. Unique TensorFlower d77c9ad6fa [MLIR][CHLO] Add `is_inf`, `is_pos_inf`, and `is_neg_inf` to CHLO dialect
Also add the respective lowerings to MHLO.

PiperOrigin-RevId: 354101955
2021-01-27 09:00:56 -08:00
Adrian Kuegel f4f728f18e Add SameOperandsAndResultShape trait to ConvertOp and IsFiniteOp.
PiperOrigin-RevId: 354070005
2021-01-27 05:10:01 -08:00
Adrian Kuegel fa059259bc Add template for tf.Cast
Also generate the kernels for all types of casts between signed int and float types.
This requires some adaptations to our build macros so that we can also specify the
output type of a kernel.

PiperOrigin-RevId: 354067727
2021-01-27 04:49:55 -08:00
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 471fc63c11 Integrate LLVM at llvm/llvm-project@f3f3c9c254
Updates LLVM usage to match
[f3f3c9c2549a](https://github.com/llvm/llvm-project/commit/f3f3c9c2549a)

PiperOrigin-RevId: 353667003
2021-01-25 09:49:38 -08:00
Benjamin Kramer f6b24a6d54 [mlir][hlo] Make min/max always propagate NaNs
This is the right behavior for TF and JAX and matches what TF does on GPU. It
doesn't match TF on CPU, but that's really a TF bug.

PiperOrigin-RevId: 353657779
2021-01-25 09:04:16 -08:00
A. Unique TensorFlower b1438eebcb [mlir][hlo] Make min/max always propagate NaNs
This is the right behavior for TF and JAX and matches what TF does on GPU. It
doesn't match TF on CPU, but that's really a TF bug.

PiperOrigin-RevId: 353628258
2021-01-25 05:43:15 -08:00
Benjamin Kramer 6af4bccfde [mlir][hlo] Make min/max always propagate NaNs
This is the right behavior for TF and JAX and matches what TF does on GPU. It
doesn't match TF on CPU, but that's really a TF bug.

PiperOrigin-RevId: 353624935
2021-01-25 05:15:24 -08:00
A. Unique TensorFlower 0860e8de9b Integrate LLVM at llvm/llvm-project@0057cc5a21
Updates LLVM usage to match
[0057cc5a215e](https://github.com/llvm/llvm-project/commit/0057cc5a215e)

PiperOrigin-RevId: 353618541
2021-01-25 04:16:02 -08:00
A. Unique TensorFlower e192d2a764 Integrate LLVM at llvm/llvm-project@e27197f360
Updates LLVM usage to match
[e27197f36054](https://github.com/llvm/llvm-project/commit/e27197f36054)

PiperOrigin-RevId: 353311722
2021-01-22 13:50:07 -08:00
A. Unique TensorFlower 41c468ca52 Integrate LLVM at llvm/llvm-project@06f8a49693
Updates LLVM usage to match
[06f8a4969395](https://github.com/llvm/llvm-project/commit/06f8a4969395)

PiperOrigin-RevId: 353266312
2021-01-22 10:16:19 -08:00
Tres Popp dfafaac954 Integrate LLVM at llvm/llvm-project@85e7578c6d
Updates LLVM usage to match
[85e7578c6db8](https://github.com/llvm/llvm-project/commit/85e7578c6db8)

PiperOrigin-RevId: 353245217
2021-01-22 08:21:37 -08:00
Tres Popp b865148492 Integrate LLVM at llvm/llvm-project@def99ad68b
Updates LLVM usage to match
[def99ad68bce](https://github.com/llvm/llvm-project/commit/def99ad68bce)

PiperOrigin-RevId: 353222879
2021-01-22 05:30:48 -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
A. Unique TensorFlower 56758a9562 [MLIR][KernelGen] Lower mhlo.log_plus_one to std.log1p
PiperOrigin-RevId: 353200069
2021-01-22 02:18:32 -08:00
Tres Popp f6bf9d5780 Integrate LLVM at llvm/llvm-project@2cb130f766
Updates LLVM usage to match
[2cb130f76611](https://github.com/llvm/llvm-project/commit/2cb130f76611)

PiperOrigin-RevId: 353194242
2021-01-22 01:32:52 -08:00
Tres Popp 7644a47a69 Integrate LLVM at llvm/llvm-project@6699029b67
Updates LLVM usage to match
[6699029b67bf](https://github.com/llvm/llvm-project/commit/6699029b67bf)

PiperOrigin-RevId: 353177509
2021-01-21 23:00:31 -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
A. Unique TensorFlower ae10640d78 Integrate LLVM at llvm/llvm-project@39db5753f9
Updates LLVM usage to match
[39db5753f993](https://github.com/llvm/llvm-project/commit/39db5753f993)

PiperOrigin-RevId: 353141599
2021-01-21 17:44:26 -08:00
A. Unique TensorFlower 3c88adce7e Integrate LLVM at llvm/llvm-project@9dd5aea1e0
Updates LLVM usage to match
[9dd5aea1e039](https://github.com/llvm/llvm-project/commit/9dd5aea1e039)

PiperOrigin-RevId: 353085351
2021-01-21 13:09:36 -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 8708e2c8d8 Integrate LLVM at llvm/llvm-project@0eeb15741b
Updates LLVM usage to match
[0eeb15741bda](https://github.com/llvm/llvm-project/commit/0eeb15741bda)

PiperOrigin-RevId: 353027671
2021-01-21 08:52:24 -08:00
Tres Popp 61cfb8c690 Integrate LLVM at llvm/llvm-project@726de41e2b
Updates LLVM usage to match
[726de41e2bfb](https://github.com/llvm/llvm-project/commit/726de41e2bfb)

PiperOrigin-RevId: 353014048
2021-01-21 07:27:48 -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
Tres Popp 5bbe5d348c Integrate LLVM at llvm/llvm-project@71635ea5ff
Updates LLVM usage to match
[71635ea5ffd6](https://github.com/llvm/llvm-project/commit/71635ea5ffd6)

PiperOrigin-RevId: 352977159
2021-01-21 02:46:24 -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
Hanhan Wang 46112c95c6 Use `uitofp` when converting a boolean to floating-point.
It was lowered to `sitofp` which resulted in `-1.0`.

PiperOrigin-RevId: 352958489
2021-01-21 00:15:30 -08:00
A. Unique TensorFlower cf08128862 Integrate LLVM at llvm/llvm-project@e996f1d419
Updates LLVM usage to match
[e996f1d4194b](https://github.com/llvm/llvm-project/commit/e996f1d4194b)

PiperOrigin-RevId: 352943239
2021-01-20 21:59:37 -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
Alexander Belyaev 9e07bdf4ea [HLO] Move `SameOperandsAndResultShape` trait to Unary/BinaryElemenwiseOp classes.
PiperOrigin-RevId: 352404756
2021-01-18 06:47:36 -08:00
A. Unique TensorFlower c11ea4ef5a [MLIR][KernelGen] Add `tf.Atanh` kernels
PiperOrigin-RevId: 352393602
2021-01-18 05:14:09 -08:00
Tres Popp ba2ee556f1 Handle negative exponents for lowering of hlo.pow
PiperOrigin-RevId: 352382812
2021-01-18 03:47:28 -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 b5dc600860 [MLIR] Fix line wraps in hlo_ops.td
PiperOrigin-RevId: 352364076
2021-01-18 01:41:41 -08:00
A. Unique TensorFlower 6cb01c89b7 Integrate LLVM at llvm/llvm-project@8456c3a789
Updates LLVM usage to match
[8456c3a78928](https://github.com/llvm/llvm-project/commit/8456c3a78928)

PiperOrigin-RevId: 352152981
2021-01-16 01:26:03 -08:00
A. Unique TensorFlower 38a7c136ae Integrate LLVM at llvm/llvm-project@86e604c4d6
Updates LLVM usage to match
[86e604c4d685](https://github.com/llvm/llvm-project/commit/86e604c4d685)

PiperOrigin-RevId: 352105071
2021-01-15 16:25:15 -08:00
Stephan Herhut 92a203f4f0 Integrate LLVM at llvm/llvm-project@104a9f99cc
Updates LLVM usage to match
[104a9f99ccab](https://github.com/llvm/llvm-project/commit/104a9f99ccab)

PiperOrigin-RevId: 352006778
2021-01-15 07:43:39 -08:00
A. Unique TensorFlower bcdb3c3548 [MLIR] Lower mhlo.clamp to linalg
PiperOrigin-RevId: 351998800
2021-01-15 06:45:38 -08:00
Stephan Herhut 2af0dcd3e7 Integrate LLVM at llvm/llvm-project@7803636057
Updates LLVM usage to match
[78036360573c](https://github.com/llvm/llvm-project/commit/78036360573c)

PiperOrigin-RevId: 351994130
2021-01-15 06:06:44 -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