Commit Graph

1071 Commits

Author SHA1 Message Date
dfki-jugr 6bc854f5d9 PR #48667: [mlir-hlo] Added RegionBranchOpInterfaces to lmhlo operations.
Imported from GitHub PR https://github.com/tensorflow/tensorflow/pull/48667

Added RegionBranchOpInterfaces to lmhlo operations that use regions.
This is needed, since the bufferization features in MLIR have to reason about the control flow within these operations.
Copybara import of the project:

--
572fd7d850a46630b812da84e9094280f89f259e by Julian Gross <julian.gross@dfki.de>:

Added RegionBranchOpInterfaces to lmhlo operations.

PiperOrigin-RevId: 372070825
2021-05-05 00:27:56 -07:00
Geoffrey Martin-Noble ac68145565 [MHLO:Linalg] Add support for lowering concat of unsigned tensors
Nothing about concat here really. Just need to plumb through the type
conversion.

PiperOrigin-RevId: 372012957
2021-05-04 15:57:54 -07:00
Geoffrey Martin-Noble 5a60793b31 [MHLO:Linalg] Add support for lowering dynamic-slice on unsigned ints
PiperOrigin-RevId: 371979004
2021-05-04 13:08:36 -07:00
Stephan Herhut fdae82aac7 Integrate LLVM at llvm/llvm-project@34593ae998
Updates LLVM usage to match
[34593ae9982a](https://github.com/llvm/llvm-project/commit/34593ae9982a)

PiperOrigin-RevId: 371968431
2021-05-04 12:18:42 -07:00
Adrian Kuegel bae9936b98 Replace !any_of with none_of
No functional change.

PiperOrigin-RevId: 371868221
2021-05-04 01:55:36 -07:00
Adrian Kuegel 384b87fad0 Lower ReluGrad via chlo::BroadcastSelect.
This allows to get rid of the constraint that it needs to have a static shape.

PiperOrigin-RevId: 371862452
2021-05-04 01:03:02 -07:00
Stephan Herhut 4bf1904c86 Integrate LLVM at llvm/llvm-project@aad3113417
Updates LLVM usage to match
[aad311341736](https://github.com/llvm/llvm-project/commit/aad311341736)

PiperOrigin-RevId: 371716638
2021-05-03 09:49:06 -07:00
Stephan Herhut e6faaea280 Integrate LLVM at llvm/llvm-project@1f8963c801
Updates LLVM usage to match
[1f8963c80195](https://github.com/llvm/llvm-project/commit/1f8963c80195)

PiperOrigin-RevId: 371688312
2021-05-03 06:58:42 -07:00
A. Unique TensorFlower 8556fab4a9 Integrate LLVM at llvm/llvm-project@ad12590fdd
Updates LLVM usage to match
[ad12590fdd14](https://github.com/llvm/llvm-project/commit/ad12590fdd14)

PiperOrigin-RevId: 371430333
2021-04-30 17:04:09 -07:00
Tres Popp 3354640c3a Integrate LLVM at llvm/llvm-project@b2780cd744
Updates LLVM usage to match
[b2780cd744ea](https://github.com/llvm/llvm-project/commit/b2780cd744ea)

PiperOrigin-RevId: 371326420
2021-04-30 07:06:04 -07:00
Tres Popp c27590da7e Integrate LLVM at llvm/llvm-project@4750a8b1bc
Updates LLVM usage to match
[4750a8b1bcde](https://github.com/llvm/llvm-project/commit/4750a8b1bcde)

PiperOrigin-RevId: 371291231
2021-04-30 02:01:25 -07:00
A. Unique TensorFlower 4d7aa12caa Integrate LLVM at llvm/llvm-project@a76df78470
Updates LLVM usage to match
[a76df78470d7](https://github.com/llvm/llvm-project/commit/a76df78470d7)

PiperOrigin-RevId: 371244064
2021-04-29 18:09:39 -07:00
Benjamin Kramer f4414fcd66 [MHLO:Linalg] Add support for lowering unsigned ops
This strips away the signedness with a type converter, using unrealized
conversion casts. The rest is mostly mechanically pushing the original op down
the pipeline so lowerings can see the original types.

Signed types stay signless for now. This can be changed in the HLO bridge later.

I did a pass over all ops and added unsigned lowerings where they were missing.
There may be more.

Currently the lowering will die at a later stage because it doesn't understand
the unrealized casts.

PiperOrigin-RevId: 371077494
2021-04-29 02:27:35 -07:00
Tres Popp 09f6141562 Integrate LLVM at llvm/llvm-project@6d8d133862
Updates LLVM usage to match
[6d8d1338629c](https://github.com/llvm/llvm-project/commit/6d8d1338629c)

PiperOrigin-RevId: 371074366
2021-04-29 02:03:52 -07:00
A. Unique TensorFlower 4d41b11f3b Integrate LLVM at llvm/llvm-project@671f0e2e18
Updates LLVM usage to match
[671f0e2e189c](https://github.com/llvm/llvm-project/commit/671f0e2e189c)

PiperOrigin-RevId: 371011125
2021-04-28 16:37:53 -07:00
A. Unique TensorFlower 9e9434a0ea Integrate LLVM at llvm/llvm-project@bf9eef92b6
Updates LLVM usage to match
[bf9eef92b6cd](https://github.com/llvm/llvm-project/commit/bf9eef92b6cd)

PiperOrigin-RevId: 370802511
2021-04-27 18:06:33 -07:00
Prakalp Srivastava 565856acd1 Min and InfinityMin of boolean should be false.
PiperOrigin-RevId: 370759584
2021-04-27 14:11:18 -07:00
Benjamin Kramer b2a23bf269 Integrate LLVM at llvm/llvm-project@4b13b7581d
Updates LLVM usage to match
[4b13b7581db5](https://github.com/llvm/llvm-project/commit/4b13b7581db5)

PiperOrigin-RevId: 370736351
2021-04-27 12:19:05 -07:00
Tres Popp a5de7719d7 Integrate LLVM at llvm/llvm-project@f8de9aaef2
Updates LLVM usage to match
[f8de9aaef2f4](https://github.com/llvm/llvm-project/commit/f8de9aaef2f4)

PiperOrigin-RevId: 370631530
2021-04-27 01:53:38 -07:00
A. Unique TensorFlower 50287ac72c Integrate LLVM at llvm/llvm-project@494e77138c
Updates LLVM usage to match
[494e77138c2e](https://github.com/llvm/llvm-project/commit/494e77138c2e)

PiperOrigin-RevId: 370574378
2021-04-26 17:13:01 -07:00
A. Unique TensorFlower e500ab37a1 Introduce constant folds for ReduceOp with single LogicalAnd or LogicalOr op.
PiperOrigin-RevId: 370551483
2021-04-26 15:11:27 -07:00
A. Unique TensorFlower 1fff544339 Integrate LLVM at llvm/llvm-project@535df472b0
Updates LLVM usage to match
[535df472b042](https://github.com/llvm/llvm-project/commit/535df472b042)

PiperOrigin-RevId: 370502124
2021-04-26 11:26:16 -07:00
Adrian Kuegel 0e2b255f01 Lower LHLO::AbsOp to complex dialect.
Also fix the traits for LHLO::AbsOp to allow different types and add a
verifier.

PiperOrigin-RevId: 370438790
2021-04-26 05:44:03 -07:00
A. Unique TensorFlower 1c11075d62 Integrate LLVM at llvm/llvm-project@caea37b37e
Updates LLVM usage to match
[caea37b37e6a](https://github.com/llvm/llvm-project/commit/caea37b37e6a)

PiperOrigin-RevId: 370202306
2021-04-23 20:07:23 -07:00
A. Unique TensorFlower 0569b7f7a4 [MLIR][MHLO] Generalize extent tensor cast elimination in bcast moving
PiperOrigin-RevId: 370112887
2021-04-23 10:52:50 -07:00
A. Unique TensorFlower ab1ccbaa6e Integrate LLVM at llvm/llvm-project@91d3f73937
Updates LLVM usage to match
[91d3f73937b6](https://github.com/llvm/llvm-project/commit/91d3f73937b6)

PiperOrigin-RevId: 370089366
2021-04-23 08:56:00 -07:00
A. Unique TensorFlower 21e9365718 [MLIR][MHLO] Generalize extent tensor cast elimination in bcast moving
PiperOrigin-RevId: 370085141
2021-04-23 08:31:11 -07:00
A. Unique TensorFlower da5d252143 [MLIR] Merge extent tensor casts into `shape_of` ops in broadcast moving
PiperOrigin-RevId: 370058002
2021-04-23 04:44:01 -07:00
A. Unique TensorFlower 890a79641e Integrate LLVM at llvm/llvm-project@37e1458128
Updates LLVM usage to match
[37e145812855](https://github.com/llvm/llvm-project/commit/37e145812855)

PiperOrigin-RevId: 370020161
2021-04-22 22:57:08 -07:00
Hanhan Wang 49df46893c Add support for lowering variadic mhlo.reduce op.
Also add more lowering for body ops. Some MinOp and MaxOp can be legalized to
SelectOp + CompareOp.

PiperOrigin-RevId: 369891551
2021-04-22 09:50:49 -07:00
A. Unique TensorFlower 2dfea55d0c Integrate LLVM at llvm/llvm-project@2f69975683
Updates LLVM usage to match
[2f69975683f5](https://github.com/llvm/llvm-project/commit/2f69975683f5)

PiperOrigin-RevId: 369861751
2021-04-22 06:55:00 -07:00
A. Unique TensorFlower ca672cc0a4 Integrate LLVM at llvm/llvm-project@1a3f88658a
Updates LLVM usage to match
[1a3f88658a02](https://github.com/llvm/llvm-project/commit/1a3f88658a02)

PiperOrigin-RevId: 369789544
2021-04-21 20:22:09 -07:00
A. Unique TensorFlower a791d9cefc Integrate LLVM at llvm/llvm-project@4bb60c285c
Updates LLVM usage to match
[4bb60c285cb3](https://github.com/llvm/llvm-project/commit/4bb60c285cb3)

PiperOrigin-RevId: 369750761
2021-04-21 15:44:37 -07:00
A. Unique TensorFlower 57d7c94a24 Integrate LLVM at llvm/llvm-project@9430efa18b
Updates LLVM usage to match
[9430efa18b02](https://github.com/llvm/llvm-project/commit/9430efa18b02)

PiperOrigin-RevId: 369706935
2021-04-21 12:15:23 -07:00
Benjamin Kramer 4d435a817e [mhlo:linalg] Add support for lowering mhlo.concatenate to Linalg ops.
This uses a indexed linalg.generic, which is rather awkward standalone but
allows fusing into the output of the concatenate and avoid to ever materialize
it in memory. I think this is the only way to get that with the current linalg
stack, fusion across a concatenate would require more infrastructure.

PiperOrigin-RevId: 369677652
2021-04-21 10:01:08 -07:00
A. Unique TensorFlower c5302511f0 Integrate LLVM at llvm/llvm-project@e0adf7e06a
Updates LLVM usage to match
[e0adf7e06a9e](https://github.com/llvm/llvm-project/commit/e0adf7e06a9e)

PiperOrigin-RevId: 369646018
2021-04-21 06:55:33 -07:00
A. Unique TensorFlower a76445839c Integrate LLVM at llvm/llvm-project@01ace074fc
Updates LLVM usage to match
[01ace074fcb6](https://github.com/llvm/llvm-project/commit/01ace074fcb6)

PiperOrigin-RevId: 369621404
2021-04-21 03:19:58 -07:00
A. Unique TensorFlower dedf76105e Integrate LLVM at llvm/llvm-project@aa80ea8a61
Updates LLVM usage to match
[aa80ea8a617b](https://github.com/llvm/llvm-project/commit/aa80ea8a617b)

PiperOrigin-RevId: 369605459
2021-04-21 01:14:39 -07:00
A. Unique TensorFlower 87e7d9f9eb Integrate LLVM at llvm/llvm-project@fb69b92c7b
Updates LLVM usage to match
[fb69b92c7b33](https://github.com/llvm/llvm-project/commit/fb69b92c7b33)

PiperOrigin-RevId: 369590351
2021-04-20 22:58:57 -07:00
A. Unique TensorFlower 200957ec54 Integrate LLVM at llvm/llvm-project@f549176ad9
Updates LLVM usage to match
[f549176ad976](https://github.com/llvm/llvm-project/commit/f549176ad976)

PiperOrigin-RevId: 369568340
2021-04-20 19:19:59 -07:00
A. Unique TensorFlower 8db96f54d3 [mhlo] Add a folder for mhlo.map which does nothing but return one of the arguments.
Add a folder for maps whose body returns only one of the arguments. When this arises the fold replaces the map output with one of the operand tensors.

PiperOrigin-RevId: 369304322
2021-04-19 14:36:08 -07:00
A. Unique TensorFlower 9374a1c0c5 [MLIR] Fix merge of assuming ops
Assuming ops can only be merged if their witnesses will dominate the merged
assuming op. This is not the case if the second op's witness is a result of the
first.

PiperOrigin-RevId: 369192868
2021-04-19 04:21:08 -07:00
A. Unique TensorFlower 0bb866a799 Integrate LLVM at llvm/llvm-project@80e166f81a
Updates LLVM usage to match
[80e166f81abd](https://github.com/llvm/llvm-project/commit/80e166f81abd)

PiperOrigin-RevId: 369176305
2021-04-19 02:08:50 -07:00
A. Unique TensorFlower 411ee907e3 Integrate LLVM at llvm/llvm-project@517c3aee4d
Updates LLVM usage to match
[517c3aee4de5](https://github.com/llvm/llvm-project/commit/517c3aee4de5)

PiperOrigin-RevId: 369017690
2021-04-17 09:50:27 -07:00
A. Unique TensorFlower d938913704 Integrate LLVM at llvm/llvm-project@bb907b26e2
Updates LLVM usage to match
[bb907b26e2bf](https://github.com/llvm/llvm-project/commit/bb907b26e2bf)

PiperOrigin-RevId: 368850216
2021-04-16 08:21:21 -07:00
A. Unique TensorFlower 216447323a Integrate LLVM at llvm/llvm-project@3bc88eb392
Updates LLVM usage to match
[3bc88eb3924f](https://github.com/llvm/llvm-project/commit/3bc88eb3924f)

PiperOrigin-RevId: 368828718
2021-04-16 05:33:26 -07:00
A. Unique TensorFlower 4f8c0e6066 Integrate LLVM at llvm/llvm-project@3f97c66b00
Updates LLVM usage to match
[3f97c66b0040](https://github.com/llvm/llvm-project/commit/3f97c66b0040)

PiperOrigin-RevId: 368763888
2021-04-15 19:22:44 -07:00
A. Unique TensorFlower b1435bff87 Integrate LLVM at llvm/llvm-project@f28cb01be0
Updates LLVM usage to match
[f28cb01be071](https://github.com/llvm/llvm-project/commit/f28cb01be071)

PiperOrigin-RevId: 368712932
2021-04-15 14:02:42 -07:00
A. Unique TensorFlower a16b4f17e0 Integrate LLVM at llvm/llvm-project@93f54fae9d
Updates LLVM usage to match
[93f54fae9dda](https://github.com/llvm/llvm-project/commit/93f54fae9dda)

PiperOrigin-RevId: 368656637
2021-04-15 09:38:07 -07:00
A. Unique TensorFlower 0dcbe56bd7 Integrate LLVM at llvm/llvm-project@49cbf4cd85
Updates LLVM usage to match
[49cbf4cd85a9](https://github.com/llvm/llvm-project/commit/49cbf4cd85a9)

PiperOrigin-RevId: 368630894
2021-04-15 06:59:31 -07:00