Commit Graph

321 Commits

Author SHA1 Message Date
Ahmed S. Taei 9c6640cbb6 Only apply GeneralDotOpLoweringPatterns for static shaped inputs
PiperOrigin-RevId: 333439680
2020-09-23 21:42:01 -07:00
A. Unique TensorFlower 34c6844dcc Integrate LLVM at llvm/llvm-project@af1d3e6559
Updates LLVM usage to match
[af1d3e655991](https://github.com/llvm/llvm-project/commit/af1d3e655991)

PiperOrigin-RevId: 333385949
2020-09-23 15:31:15 -07:00
Robert Suderman 233f1a8a1a Folders for mhlo.compare
Constant evaluation of compare for the case where inputs are either the same
variable or the values are constant.

PiperOrigin-RevId: 333342328
2020-09-23 12:03:48 -07:00
A. Unique TensorFlower 0259f982bf Integrate LLVM at llvm/llvm-project@2d0de5f9a4
Updates LLVM usage to match
[2d0de5f9a4c5](https://github.com/llvm/llvm-project/commit/2d0de5f9a4c5)

PiperOrigin-RevId: 333341699
2020-09-23 12:01:39 -07:00
A. Unique TensorFlower 08e0d09463 [MLIR][KernelGen] Rename `legalize-tanh-to-approximation` to `legalize-trigonometric-to-approximation`
To add more approximation lowerings in the future, generalize the pass name.

PiperOrigin-RevId: 333340075
2020-09-23 11:53:45 -07:00
A. Unique TensorFlower e13904c92a Integrate LLVM at llvm/llvm-project@d6ac649ccd
Updates LLVM usage to match
[d6ac649ccda2](https://github.com/llvm/llvm-project/commit/d6ac649ccda2)

PiperOrigin-RevId: 333316098
2020-09-23 10:10:39 -07:00
Rahul Joshi 3ca740103d [NFC] Specify "reifyReturnTypeShapes" in DeclareOpInterfaceMethod overridenMethods
- This causes declaration of reifyReturnTypeShapes to be inserted in the TableGen
  generated code without explicitly adding it in extraClassDeclaration.

PiperOrigin-RevId: 333315601
2020-09-23 10:08:32 -07:00
Rahul Joshi 87d9e6951e [MLIR] Use MLIR provided 0DTensorOf/1DTensorOf instead of custom constraints.
- Use MLIR provided constraints for HLO_ScalarIntTensor and HLO_DimensionTensor.
- Update unit tests to expect new error messages.

PiperOrigin-RevId: 333313131
2020-09-23 09:57:12 -07:00
Rahul Joshi 7d01a60de8 [NFC] Fix typos in comments.
PiperOrigin-RevId: 333311070
2020-09-23 09:46:02 -07:00
A. Unique TensorFlower 08514eaa5f [MLIR][KernelGen] Add E2E tests for `tf.Tan` and `tf.Sinh`
PiperOrigin-RevId: 333275089
2020-09-23 05:50:54 -07:00
A. Unique TensorFlower be409a2409 Integrate LLVM at llvm/llvm-project@f212122150
Updates LLVM usage to match
[f21212215031](https://github.com/llvm/llvm-project/commit/f21212215031)

PiperOrigin-RevId: 333168406
2020-09-22 15:08:10 -07:00
A. Unique TensorFlower 3e3bc705ed Integrate LLVM at llvm/llvm-project@079757b551
Updates LLVM usage to match
[079757b551f3](https://github.com/llvm/llvm-project/commit/079757b551f3)

PiperOrigin-RevId: 333132011
2020-09-22 12:12:05 -07:00
Benjamin Kramer dd92c8ef61 Integrate LLVM at llvm/llvm-project@7e78d89052
Updates LLVM usage to match
[7e78d89052b1](https://github.com/llvm/llvm-project/commit/7e78d89052b1)

PiperOrigin-RevId: 333090785
2020-09-22 09:08:23 -07:00
Mehdi Amini 7abd557a61 Add a header for table-gen generated pass for MHLO and use it in SinkConstantsToControlFlowPass
A non globally registered pass should define `getName()` in order to generate correct crash reproducers.
This is something we get "for free" when using the TableGen generated base class.
We should also migrate the other passes to the same mechanism and remove the static
global registration.

PiperOrigin-RevId: 332976907
2020-09-21 18:01:57 -07:00
A. Unique TensorFlower 0bb017098a Integrate LLVM at llvm/llvm-project@93fd30bac3
Updates LLVM usage to match
[93fd30bac334](https://github.com/llvm/llvm-project/commit/93fd30bac334)

PiperOrigin-RevId: 332436415
2020-09-18 06:05:49 -07:00
A. Unique TensorFlower 4002077261 [MLIR][KernelGen] Lower `tf.Sinh` to MLHLO
PiperOrigin-RevId: 332425724
2020-09-18 04:27:07 -07:00
A. Unique TensorFlower cfbd7a18b2 Integrate LLVM at llvm/llvm-project@c0e7f64685
Updates LLVM usage to match
[c0e7f6468578](https://github.com/llvm/llvm-project/commit/c0e7f6468578)

PiperOrigin-RevId: 332420028
2020-09-18 03:30:34 -07:00
A. Unique TensorFlower 2fbbbe9cf1 [MLIR][KernelGen] Lower `tf.Acos` to LMHLO.
- Add ranked code generation for `mhlo.compare/select`
- Add bufferization for `tensor_cast`
- Add lowerings for `Atan2Op`

PiperOrigin-RevId: 332407734
2020-09-18 01:40:18 -07:00
A. Unique TensorFlower 794e275904 Integrate LLVM at llvm/llvm-project@fb92f863f6
Updates LLVM usage to match
[fb92f863f684](https://github.com/llvm/llvm-project/commit/fb92f863f684)

PiperOrigin-RevId: 332397518
2020-09-18 00:10:05 -07:00
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