Commit Graph

1055 Commits

Author SHA1 Message Date
A. Unique TensorFlower 1912b90d25 Integrate LLVM at llvm/llvm-project@921c1b7df3
Updates LLVM usage to match
[921c1b7df37d](https://github.com/llvm/llvm-project/commit/921c1b7df37d)

PiperOrigin-RevId: 327714965
2020-08-20 16:03:33 -07:00
A. Unique TensorFlower 13005afc47 Integrate LLVM at llvm/llvm-project@87bf0b0ee9
Updates LLVM usage to match
[87bf0b0ee986](https://github.com/llvm/llvm-project/commit/87bf0b0ee986)

PiperOrigin-RevId: 327680928
2020-08-20 12:54:33 -07:00
A. Unique TensorFlower 28b8180ddd Integrate LLVM at llvm/llvm-project@131b3b9ed4
Updates LLVM usage to match
[131b3b9ed4ef](https://github.com/llvm/llvm-project/commit/131b3b9ed4ef)

PiperOrigin-RevId: 327635089
2020-08-20 08:59:21 -07:00
A. Unique TensorFlower b4726e6e59 Integrate LLVM at llvm/llvm-project@f9dc2b7079
Updates LLVM usage to match
[f9dc2b707935](https://github.com/llvm/llvm-project/commit/f9dc2b707935)

PiperOrigin-RevId: 327538369
2020-08-19 17:18:36 -07:00
Marius Brehler 98a8b2c0cf PR #42473: Check libraries linked into mlir-hlo-opt
Imported from GitHub PR https://github.com/tensorflow/tensorflow/pull/42473

Adds a call to mlir_check_all_link_libraries() to check all libraries
linked into mlir-hlo-opt.
Copybara import of the project:

--
0bf620f5f2708e730689eab8a5512fb00eaf1706 by Marius Brehler <marius.brehler@iml.fraunhofer.de>:

Check libraries linked into mlir-hlo-opt

Adds a call to mlir_check_all_link_libraries() to check all libraries
linked into mlir-hlo-opt.

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/tensorflow/pull/42473 from marbre:check_link_libraries 0bf620f5f2708e730689eab8a5512fb00eaf1706
PiperOrigin-RevId: 327463012
2020-08-19 10:44:00 -07:00
A. Unique TensorFlower 75d50980f5 Integrate LLVM at llvm/llvm-project@e75bc5c791
Updates LLVM usage to match
[e75bc5c791e0](https://github.com/llvm/llvm-project/commit/e75bc5c791e0)

PiperOrigin-RevId: 327449456
2020-08-19 09:39:06 -07:00
A. Unique TensorFlower 98c7ffb55f Integrate LLVM at llvm/llvm-project@bf36e90295
Updates LLVM usage to match
[bf36e902953a](https://github.com/llvm/llvm-project/commit/bf36e902953a)

PiperOrigin-RevId: 327290466
2020-08-18 13:07:22 -07:00
A. Unique TensorFlower 1bbe2010d0 Integrate LLVM at llvm/llvm-project@011bf4fd96
Updates LLVM usage to match
[011bf4fd9679](https://github.com/llvm/llvm-project/commit/011bf4fd9679)

PiperOrigin-RevId: 327266800
2020-08-18 11:14:31 -07:00
A. Unique TensorFlower e34fbf2f23 Integrate LLVM at llvm/llvm-project@62fc44ca3c
Updates LLVM usage to match
[62fc44ca3cf6](https://github.com/llvm/llvm-project/commit/62fc44ca3cf6)

PiperOrigin-RevId: 327210773
2020-08-18 05:40:29 -07:00
A. Unique TensorFlower 1bcdcc3b3b Integrate LLVM at llvm/llvm-project@9c5e25a696
Updates LLVM usage to match
[9c5e25a696b2](https://github.com/llvm/llvm-project/commit/9c5e25a696b2)

PiperOrigin-RevId: 327140496
2020-08-17 18:22:29 -07:00
Richard Uhler 9a232c7012 Fix failing segment_reduction_ops_mlir_bridge_test
By adding support for complex types to GetScalarOfType and using appropriate
choice of limits for initial values in the unsorted segment reduction ops.

PiperOrigin-RevId: 327061577
2020-08-17 11:28:20 -07:00
A. Unique TensorFlower a434b7e4ee Integrate LLVM at llvm/llvm-project@fed9ff5117
Updates LLVM usage to match
[fed9ff511711](https://github.com/llvm/llvm-project/commit/fed9ff511711)

PiperOrigin-RevId: 327019578
2020-08-17 07:54:00 -07:00
A. Unique TensorFlower c77cc093e8 Integrate LLVM at llvm/llvm-project@4225e7fa34
Updates LLVM usage to match
[4225e7fa34fe](https://github.com/llvm/llvm-project/commit/4225e7fa34fe)

PiperOrigin-RevId: 327004488
2020-08-17 05:45:22 -07:00
A. Unique TensorFlower ec35775c67 Integrate LLVM at llvm/llvm-project@0581c0b0ee
Updates LLVM usage to match
[0581c0b0eeba](https://github.com/llvm/llvm-project/commit/0581c0b0eeba)

PiperOrigin-RevId: 326830705
2020-08-15 11:43:53 -07:00
Jacques Pienaar 8712cbae75 Add missing command line option registrations
PiperOrigin-RevId: 326773738
2020-08-14 20:08:06 -07:00
A. Unique TensorFlower c2afc5e45f Integrate LLVM at llvm/llvm-project@88bbd30736
Updates LLVM usage to match
[88bbd3073656](https://github.com/llvm/llvm-project/commit/88bbd3073656)

PiperOrigin-RevId: 326577009
2020-08-13 19:55:49 -07:00
River Riddle 7acc765ed7 Remove kindof definitions on derived mlir Attribute and Type classes
This method no longer needs to be explicitly defined by the user, so all of the existing definitions are dead and can be removed.

PiperOrigin-RevId: 326350650
2020-08-12 17:42:07 -07:00
Robert Suderman 5252aeae8f Lowering for mhlo.ceil to std.ceil
PiperOrigin-RevId: 326335301
2020-08-12 16:15:35 -07:00
A. Unique TensorFlower ec328ae43b Integrate LLVM at llvm/llvm-project@30c1633386
Updates LLVM usage to match
[30c1633386e7](https://github.com/llvm/llvm-project/commit/30c1633386e7)

PiperOrigin-RevId: 326184631
2020-08-12 00:48:35 -07:00
Mehdi Amini 961b9b1795 Add build instructions for the standalone mlir-hlo compiler in the Readme.md + a title
PiperOrigin-RevId: 326077782
2020-08-11 14:56:51 -07:00
A. Unique TensorFlower 875c6e4f26 Integrate LLVM at llvm/llvm-project@950f1bf976
Updates LLVM usage to match
[950f1bf976b3](https://github.com/llvm/llvm-project/commit/950f1bf976b3)

PiperOrigin-RevId: 326028888
2020-08-11 14:56:23 -07:00
A. Unique TensorFlower 7259d814e7 Integrate LLVM at llvm/llvm-project@b2b7dbb47a
Updates LLVM usage to match
[b2b7dbb47aa9](https://github.com/llvm/llvm-project/commit/b2b7dbb47aa9)

PiperOrigin-RevId: 326003266
2020-08-11 14:55:57 -07:00
A. Unique TensorFlower 31044ec201 Integrate LLVM at llvm/llvm-project@0de60b550b
Updates LLVM usage to match
[0de60b550b72](https://github.com/llvm/llvm-project/commit/0de60b550b72)

PiperOrigin-RevId: 325977375
2020-08-11 14:55:26 -07:00
Jacques Pienaar 5dac76f4af Add chlo.constant_like op which splats a constant to shape of operand
This allows specifying a constant whose shape is only known when operand shape is. Also use it to update tf.Acos legalization.

PiperOrigin-RevId: 325860604
2020-08-11 14:54:48 -07:00
A. Unique TensorFlower e340e41059 Integrate LLVM at llvm/llvm-project@54cb552b96
Updates LLVM usage to match
[54cb552b9620](https://github.com/llvm/llvm-project/commit/54cb552b9620)

PiperOrigin-RevId: 325829818
2020-08-10 18:06:00 -07:00
Jacques Pienaar 17ccca7f4b Add HLO RngBitGenerator
This adds the XlaBuilder RngBitGenerator to the MHLO dialect. The op is currently represented very directly using int attribute for random algorithm and direct import/export.

PiperOrigin-RevId: 325814134
2020-08-10 09:01:11 -07:00
Alexander Belyaev 843af36e05 [MLIR] Add e2e test for unranked unary TF op, lowered and run with CPU runner.
PiperOrigin-RevId: 325665428
2020-08-09 02:38:00 -07:00
Benjamin Kramer 417e9e9c34 Integrate LLVM at llvm/llvm-project@38537307e5
Updates LLVM usage to match
[38537307e502](https://github.com/llvm/llvm-project/commit/38537307e502)

PiperOrigin-RevId: 325590988
2020-08-09 02:37:34 -07:00
A. Unique TensorFlower e6fa003bf2 Integrate LLVM at llvm/llvm-project@b6d9add71b
Updates LLVM usage to match
[b6d9add71b1a](https://github.com/llvm/llvm-project/commit/b6d9add71b1a)

PiperOrigin-RevId: 325589103
2020-08-08 04:35:25 -07:00
Andy Ly 53fdda7f3e Update mhlo.constant to use a custom assembly format instead of a custom printer and parser (NFC).
PiperOrigin-RevId: 325560779
2020-08-07 22:23:06 -07:00
Geoffrey Martin-Noble 2b0a244a6b Add license header to lit.site.cfg.py.in
PiperOrigin-RevId: 325515949
2020-08-07 22:22:24 -07:00
Lucy Fox d742477c02 Verify that MHLO DynamicUpdateSlice start indices have matching element types.
HLO requires that the element types match for all start index parameters. Right now we don't catch this invalid case until export, so adding a check in the verifier so that we catch this sooner.

This also requires a small tweak to the TF InplaceUpdate op lowering.

PiperOrigin-RevId: 325463796
2020-08-07 22:21:40 -07:00
Mehdi Amini 5f8da992f2 Fix mlir-hlo CMakefiles after internal change
PiperOrigin-RevId: 325366142
2020-08-07 22:20:50 -07:00
A. Unique TensorFlower e00565b544 Integrate LLVM at llvm/llvm-project@9dbdaea9a0
Updates LLVM usage to match
[9dbdaea9a0e6](https://github.com/llvm/llvm-project/commit/9dbdaea9a0e6)

PiperOrigin-RevId: 325354353
2020-08-07 22:20:06 -07:00
Rahul Joshi a6978cf4ab [MLIR][NFC] Adopt FuncOp/Region argument API's.
- Use FuncOp::getArguments() and Region::getArguments() and friends where possible
  instead of going through the front() block.

PiperOrigin-RevId: 325352975
2020-08-07 22:19:21 -07:00
Lucy Fox cd22ecd136 Relax DynamicBroadcastInDim verifier when dimensions are dynamic.
For input and output dimensions which must match, we shouldn't fail in the case where one dim is dynamic and the other is static. This is insufficient information to conclude a dimension mismatch.

PiperOrigin-RevId: 325344738
2020-08-07 22:18:38 -07:00
A. Unique TensorFlower c78e144f82 Integrate LLVM at llvm/llvm-project@633e3dacf2
Updates LLVM usage to match
[633e3dacf27e](https://github.com/llvm/llvm-project/commit/633e3dacf27e)

PiperOrigin-RevId: 325237772
2020-08-07 22:17:02 -07:00
A. Unique TensorFlower a68a16cdc7 [MLIR][XLA] Allow for choice of safe/unsafe variant in broadcast utils
Create safe or unsafe variants of `shape.broadcast` depending on the context.
The representation by means of an extent tensor is only legal if the operands
are known to be broadcastable. Currently, there is no use in a safe context in
the codebase but it will be used for shape inference eventually.

PiperOrigin-RevId: 325228073
2020-08-07 22:16:11 -07:00
Alexander Belyaev bc3293a05f [MLIR] Remove Affine->STD and SCF->STD patterns from lhlo->llvm pass.
PiperOrigin-RevId: 325219360
2020-08-07 22:15:24 -07:00
Mehdi Amini 701312720c Add CMake files and lit configurations, enough for `ninja check-mlir-hlo` to pass on all the tests
PiperOrigin-RevId: 325172984
2020-08-07 22:14:34 -07:00
Andy Ly c340367702 Add canonicalization for unpacking and repacking the same tuple (e.g. tuple -> get_tuple_element -> tuple).
These unpacking and repacking of tuples may be generated when modifying tuple arguments or results.

PiperOrigin-RevId: 325162694
2020-08-05 21:38:02 -07:00
A. Unique TensorFlower ad12e06ceb Integrate LLVM at llvm/llvm-project@acb66b9111
Updates LLVM usage to match
[acb66b9111ba](https://github.com/llvm/llvm-project/commit/acb66b9111ba)

PiperOrigin-RevId: 325125249
2020-08-05 21:37:34 -07:00
A. Unique TensorFlower 4372124362 [MLIR][XLA] Allow for choice of safe/unsafe variant in broadcast utils
Create safe or unsafe variants of `shape.broadcast` depending on the context.
The representation by means of an extent tensor is only legal if the operands
are known to be broadcastable. Currently, there is no use in a safe context in
the codebase but it will be used for shape inference eventually.

PiperOrigin-RevId: 325079842
2020-08-05 12:43:29 -07:00
A. Unique TensorFlower 5d3cc2105e [MLIR][HLO] Remove redundant casts from unranked to ranked transformation
The transformation of unranked to ranked operations no longer generates cast
operations for shapes and sizes. Instead, we use the newly introduced support
for extent tensor and index types directly.

PiperOrigin-RevId: 325057440
2020-08-05 11:11:43 -07:00
A. Unique TensorFlower 37c36a4389 [MLIR][XLA] Allow for choice of safe/unsafe variant in broadcast utils
Create safe or unsafe variants of `shape.broadcast` depending on the context.
The representation by means of an extent tensor is only legal if the operands
are known to be broadcastable. Currently, there is no use in a safe context in
the codebase but it will be used for shape inference eventually.

PiperOrigin-RevId: 325056915
2020-08-05 11:09:23 -07:00
Benjamin Kramer d26e863865 Integrate LLVM at llvm/llvm-project@c558c22cab
Updates LLVM usage to match
[c558c22cab9a](https://github.com/llvm/llvm-project/commit/c558c22cab9a)

PiperOrigin-RevId: 324993578
2020-08-05 05:17:23 -07:00
Stephan Herhut 6584c2ab1f Remove optional static registration for hlo dialects again.
Instead, we invoke multiple test tools in a row in end to end tests now. For hlo dialects and passes, we use mlir-hlo-opt explicitly.

PiperOrigin-RevId: 324989884
2020-08-05 03:53:17 -07:00
A. Unique TensorFlower 9a97cffbb5 Integrate LLVM at llvm/llvm-project@28e322ea93
Updates LLVM usage to match
[28e322ea9393](https://github.com/llvm/llvm-project/commit/28e322ea9393)

PiperOrigin-RevId: 324957510
2020-08-04 22:31:45 -07:00
Stephan Herhut 7bff244b8b Allow index typed memrefs in reshape_memref_cast.
With the recent change to allow memref of index in MLIR core, we should also
allow this in the mhlo dialect.

PiperOrigin-RevId: 324879354
2020-08-04 13:34:11 -07:00
Mehdi Amini 66f023a057 Add build helper to mlir-hlo
PiperOrigin-RevId: 324843181
2020-08-04 10:46:48 -07:00