Commit Graph

502 Commits

Author SHA1 Message Date
A. Unique TensorFlower 12c581a571 Integrate LLVM at llvm/llvm-project@ea237e2c8e
Updates LLVM usage to match
[ea237e2c8e5d](https://github.com/llvm/llvm-project/commit/ea237e2c8e5d)

PiperOrigin-RevId: 332372355
2020-09-17 20:27:37 -07:00
A. Unique TensorFlower 0acb98c379 Integrate LLVM at llvm/llvm-project@deb8f8bcf3
Updates LLVM usage to match
[deb8f8bcf315](https://github.com/llvm/llvm-project/commit/deb8f8bcf315)

PiperOrigin-RevId: 332238830
2020-09-17 08:27:29 -07:00
A. Unique TensorFlower b1fd4d27cf [MLIR][KernelGen] Implement InferShapedTypeOpInterface for `mhlo.compare/select`
PiperOrigin-RevId: 332227340
2020-09-17 07:10:10 -07:00
A. Unique TensorFlower 91f16172a4 Integrate LLVM at llvm/llvm-project@c65627a1fe
Updates LLVM usage to match
[c65627a1fe3b](https://github.com/llvm/llvm-project/commit/c65627a1fe3b)

PiperOrigin-RevId: 332221492
2020-09-17 06:29:11 -07:00
A. Unique TensorFlower ef94034184 Integrate LLVM at llvm/llvm-project@a9cbe5cf30
Updates LLVM usage to match
[a9cbe5cf30e3](https://github.com/llvm/llvm-project/commit/a9cbe5cf30e3)

PiperOrigin-RevId: 332208251
2020-09-17 04:49:14 -07:00
A. Unique TensorFlower 1ba929b363 Integrate LLVM at llvm/llvm-project@b05629230e
Updates LLVM usage to match
[b05629230e9c](https://github.com/llvm/llvm-project/commit/b05629230e9c)

PiperOrigin-RevId: 332189323
2020-09-17 02:19:41 -07:00
A. Unique TensorFlower 8516c7667c Integrate LLVM at llvm/llvm-project@6a07f1edf8
Updates LLVM usage to match
[6a07f1edf8e6](https://github.com/llvm/llvm-project/commit/6a07f1edf8e6)

PiperOrigin-RevId: 332160790
2020-09-16 22:16:09 -07:00
Hanhan Wang b29dd5ef8f Fix a bug in the case check of reshape op lowering.
PiperOrigin-RevId: 332044191
2020-09-16 11:06:16 -07:00
A. Unique TensorFlower f442ea84e2 Integrate LLVM at llvm/llvm-project@85763e0758
Updates LLVM usage to match
[85763e0758fb](https://github.com/llvm/llvm-project/commit/85763e0758fb)

PiperOrigin-RevId: 332034830
2020-09-16 10:28:24 -07:00
A. Unique TensorFlower 69b80d8deb [MLIR] Extend unranked transformation to CHLO dialect
PiperOrigin-RevId: 332026604
2020-09-16 09:49:18 -07:00
Stephan Herhut 2aa07b0091 Insert explicit casts to model extra shape knowledge for unranked chlo transform
When transforming unranked binary operations from CHLO to HLO, we insert `shape.broadcast` operations. Due to context, we know that the result of the `shape.broadcast` operation has a static shape. Instead of modelling this in the type of the broadcast operation itself, which is illegal,  we now use an explicit cast.

PiperOrigin-RevId: 331989879
2020-09-16 06:14:49 -07:00
A. Unique TensorFlower 1880f87737 Integrate LLVM at llvm/llvm-project@e1669843f2
Updates LLVM usage to match
[e1669843f2aa](https://github.com/llvm/llvm-project/commit/e1669843f2aa)

PiperOrigin-RevId: 331987679
2020-09-16 05:58:08 -07:00
Hanhan Wang 1800f44a29 Add sqrt folder.
PiperOrigin-RevId: 331974344
2020-09-16 04:04:09 -07:00
A. Unique TensorFlower a6fdebdc6c [MLIR] Lower `chlo.constant_like` to MHLO
Lower `chlo.constant_like` to a constant and, if needed, a broadcast.

PiperOrigin-RevId: 331964137
2020-09-16 02:41:44 -07:00
A. Unique TensorFlower da43c8596b [MLIR] Simplify and generalize `transform-unranked-hlo`
This refactoring allows to support a wider range of n-ary operations in future
changes.

PiperOrigin-RevId: 331953362
2020-09-16 01:13:23 -07:00
A. Unique TensorFlower d1f85f32b1 Integrate LLVM at llvm/llvm-project@7841e21c98
Updates LLVM usage to match
[7841e21c9849](https://github.com/llvm/llvm-project/commit/7841e21c9849)

PiperOrigin-RevId: 331647935
2020-09-14 16:09:08 -07:00
Robert Suderman dff98f8cd5 Folder for mhlo.negate
PiperOrigin-RevId: 331592342
2020-09-14 11:38:44 -07:00
A. Unique TensorFlower 8bcca69845 Integrate LLVM at llvm/llvm-project@c799f873cb
Updates LLVM usage to match
[c799f873cb9f](https://github.com/llvm/llvm-project/commit/c799f873cb9f)

PiperOrigin-RevId: 331546187
2020-09-14 07:56:16 -07:00
A. Unique TensorFlower 5ab993c01d Integrate LLVM at llvm/llvm-project@0008fb3437
Updates LLVM usage to match
[0008fb343704](https://github.com/llvm/llvm-project/commit/0008fb343704)

PiperOrigin-RevId: 331528548
2020-09-14 05:39:19 -07:00
Hanhan Wang cf1b2b2d84 Add a test for lowering mhlo.floor to Linalg on tensors.
PiperOrigin-RevId: 331514657
2020-09-14 03:30:43 -07:00
A. Unique TensorFlower 48022987ce [XLA][MLIR] Lower `tf.Tan` and `tf.Sin` to MLHLO
Add `tan` op and lowering to CHLO dialect, move CHLO lowerings to
`chlo_legalize_to_hlo_patterns` and extend missing patterns.

PiperOrigin-RevId: 331506094
2020-09-14 02:34:52 -07:00
Ehsan Toosi ce1c8a1ebc [MLIR][LHLO] Replace lhlo-copy-removal pass with mlir-copy-removal pass
Imported from GitHub PR https://github.com/tensorflow/tensorflow/pull/43137

This PR removes lhlo-copy-removal pass entirely and replace its usages with ```mlir::createCopyRemovalPass()```.

--
7ce1a06f507c8db46c6d7b43c7870cf56002e18e by Ehsan Toosi <ehsan.nadjaran_toosi@dfki.de>:

[mlir][lhlo] Replace lhlo-copy-removal pass with mlir-copy-removal pass

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/tensorflow/pull/43137 from dfki-ehna:using_mlir_copy_removal 7ce1a06f507c8db46c6d7b43c7870cf56002e18e
PiperOrigin-RevId: 331498501
2020-09-14 01:22:19 -07:00
A. Unique TensorFlower 7cfcc2c79d Integrate LLVM at llvm/llvm-project@cb3e1dd6c3
Updates LLVM usage to match
[cb3e1dd6c31e](https://github.com/llvm/llvm-project/commit/cb3e1dd6c31e)

PiperOrigin-RevId: 331490764
2020-09-14 00:14:33 -07:00
Jacques Pienaar 8cc6cddf9f Use location instead of unknown loc
Follow up on TODO as placeholder has been added to rewriter.

PiperOrigin-RevId: 331488583
2020-09-13 23:52:40 -07:00
A. Unique TensorFlower fb321bee7d Integrate LLVM at llvm/llvm-project@c0bcd11068
Updates LLVM usage to match
[c0bcd11068fc](https://github.com/llvm/llvm-project/commit/c0bcd11068fc)

PiperOrigin-RevId: 331438229
2020-09-13 13:27:19 -07:00
A. Unique TensorFlower c4f3ff50be Integrate LLVM at llvm/llvm-project@f086e85eea
Updates LLVM usage to match
[f086e85eea94](https://github.com/llvm/llvm-project/commit/f086e85eea94)

PiperOrigin-RevId: 331422936
2020-09-13 09:35:39 -07:00
A. Unique TensorFlower bcf995f4ee Integrate LLVM at llvm/llvm-project@70daa353e2
Updates LLVM usage to match
[70daa353e2ae](https://github.com/llvm/llvm-project/commit/70daa353e2ae)

PiperOrigin-RevId: 331366764
2020-09-12 19:13:32 -07:00
A. Unique TensorFlower 2626e33178 Integrate LLVM at llvm/llvm-project@c2f8bc986f
Updates LLVM usage to match
[c2f8bc986fb3](https://github.com/llvm/llvm-project/commit/c2f8bc986fb3)

PiperOrigin-RevId: 331359884
2020-09-12 17:28:13 -07:00
A. Unique TensorFlower fc4a821df1 Integrate LLVM at llvm/llvm-project@0680a3d56d
Updates LLVM usage to match
[0680a3d56d8b](https://github.com/llvm/llvm-project/commit/0680a3d56d8b)

PiperOrigin-RevId: 331340746
2020-09-12 12:49:18 -07:00
A. Unique TensorFlower 0c95d4fc32 Integrate LLVM at llvm/llvm-project@0e0d93e2f0
Updates LLVM usage to match
[0e0d93e2f09a](https://github.com/llvm/llvm-project/commit/0e0d93e2f09a)

PiperOrigin-RevId: 331277620
2020-09-11 21:25:38 -07:00
A. Unique TensorFlower 0a21d66ee0 Integrate LLVM at llvm/llvm-project@f2bb4b8855
Updates LLVM usage to match
[f2bb4b88550a](https://github.com/llvm/llvm-project/commit/f2bb4b88550a)

PiperOrigin-RevId: 331244750
2020-09-11 16:23:37 -07:00
A. Unique TensorFlower 0b430269b8 Integrate LLVM at llvm/llvm-project@009cd4e491
Updates LLVM usage to match
[009cd4e49103](https://github.com/llvm/llvm-project/commit/009cd4e49103)

PiperOrigin-RevId: 331153647
2020-09-11 08:36:26 -07:00
A. Unique TensorFlower a7a7184eb6 [XLA][MLIR] Lower `tf.Tan` and `tf.Sin` to MLHLO
Add `tan` op and lowering to CHLO dialect, move CHLO lowerings to
`chlo_legalize_to_hlo_patterns` and extend missing patterns.

PiperOrigin-RevId: 331128170
2020-09-11 05:05:58 -07:00
A. Unique TensorFlower 90927f6b53 [XLA][MLIR] Lower `tf.Tan` and `tf.Sin` to MLHLO
Add `tan` op and lowering to CHLO dialect, move CHLO lowerings to
`chlo_legalize_to_hlo_patterns` and extend missing patterns.

PiperOrigin-RevId: 331125286
2020-09-11 04:39:28 -07:00
A. Unique TensorFlower 49aaaed762 Integrate LLVM at llvm/llvm-project@be7cef789e
Updates LLVM usage to match
[be7cef789e75](https://github.com/llvm/llvm-project/commit/be7cef789e75)

PiperOrigin-RevId: 331065004
2020-09-10 19:11:17 -07:00
Robert Suderman d0c8d17373 Update mhlo.concatenate inferred return type for dynamics
MHLO concatenate should support dynamic inputs. Its possible that the output
shape can be inferred from a dimension in one input that is not dynamic in
another.

PiperOrigin-RevId: 331054181
2020-09-10 17:46:11 -07:00
Robert Suderman 6eefb07767 Fix zero attr mistake
PiperOrigin-RevId: 331050555
2020-09-10 17:21:39 -07:00
A. Unique TensorFlower b22f2f0eea Integrate LLVM at llvm/llvm-project@52f0837778
Updates LLVM usage to match
[52f0837778b6](https://github.com/llvm/llvm-project/commit/52f0837778b6)

PiperOrigin-RevId: 330939173
2020-09-10 08:14:23 -07:00
Ehsan Toosi d599485e06 PR #43069: [hlo] Unbreak hlo-legalize-to-lhlo test
Imported from GitHub PR https://github.com/tensorflow/tensorflow/pull/43069

The legalization of mlhlo.ReturnOp to lhlo.TerminatorOp by using BufferAssignmentReturnOpConverter fails since the Memref typed results (or the Memref typed operands of Return operation) are set to stay as results after legalization but lhlo.TerminatorOp doesn't accept any operands. Therefore, BufferAssignmentReturnOpConverter must be replaced with a manual conversion that removes all operands of mlhlo.ReturnOp and inserts copy operations in their places.
Copybara import of the project:

--
8be0435b0147263c3872bedec58fd215f784b450 by Ehsan Toosi <ehsan.nadjaran_toosi@dfki.de>:

[hlo] Unbreak hlo-legalize-to-lhlo test

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/tensorflow/pull/43069 from dfki-ehna:fix_hlo_legalize_to_lhlo_test 8be0435b0147263c3872bedec58fd215f784b450
PiperOrigin-RevId: 330907602
2020-09-10 04:09:03 -07:00
A. Unique TensorFlower f46ba09653 Integrate LLVM at llvm/llvm-project@4964d75d70
Updates LLVM usage to match
[4964d75d7078](https://github.com/llvm/llvm-project/commit/4964d75d7078)

PiperOrigin-RevId: 330713009
2020-09-09 06:50:26 -07:00
Robert Suderman 81d51d810b Bitwise and/or/xor folders
Includes both and/or/xor on same inputs, constant all ones/zeros single arg
folder, and constant input folders.

PiperOrigin-RevId: 330610858
2020-09-08 16:27:13 -07:00
Mehdi Amini 9d4273b5a7 Delete mhlo static dialect registration
This is obsolete now.

PiperOrigin-RevId: 330605210
2020-09-08 15:57:36 -07:00
A. Unique TensorFlower 062a3ac4a0 Integrate LLVM at llvm/llvm-project@8d9c13f37d
Updates LLVM usage to match
[8d9c13f37d20](https://github.com/llvm/llvm-project/commit/8d9c13f37d20)

PiperOrigin-RevId: 330496008
2020-09-08 06:20:11 -07:00
Alexander Belyaev ebc7992d31 [MLIR][KERNEL_GEN] Add a library to lower kernels with the host side.
* Unified TF->Cubin and TF->Kernel_with_host side lowering in `kernel_creator.h|cc`
* Added a pass that attaches GPU binary blob to GPUModuleOp
* Refactored most of the code.
* Added tf_to_kernel binary that emits obj file

PiperOrigin-RevId: 330494488
2020-09-08 06:06:29 -07:00
A. Unique TensorFlower 64d9a465ee Integrate LLVM at llvm/llvm-project@a70f2eb3e3
Updates LLVM usage to match
[a70f2eb3e39a](https://github.com/llvm/llvm-project/commit/a70f2eb3e39a)

PiperOrigin-RevId: 330468316
2020-09-08 02:03:22 -07:00
A. Unique TensorFlower e391762513 Integrate LLVM at llvm/llvm-project@7cfc8f0c7c
Updates LLVM usage to match
[7cfc8f0c7c24](https://github.com/llvm/llvm-project/commit/7cfc8f0c7c24)

PiperOrigin-RevId: 330443088
2020-09-07 21:14:16 -07:00
A. Unique TensorFlower 8e2b874fe8 Integrate LLVM at llvm/llvm-project@7d53fecb67
Updates LLVM usage to match
[7d53fecb6792](https://github.com/llvm/llvm-project/commit/7d53fecb6792)

PiperOrigin-RevId: 330418199
2020-09-07 15:14:42 -07:00
A. Unique TensorFlower 73b4861f2c Canonicalize mhlo.gather to mhlo.slice if it has a single set of constant indices
PiperOrigin-RevId: 330380755
2020-09-07 07:28:46 -07:00
Eugene Burmako dde1ed56cc Add support for legalizing mhlo.slice to lmhlo.slice
PiperOrigin-RevId: 330153599
2020-09-04 21:43:01 -07:00
Eugene Burmako 2a9d7ac084 Add support for legalizing lmhlo.transpose to linalg.generic
PiperOrigin-RevId: 330130704
2020-09-04 15:37:42 -07:00