Commit Graph

969 Commits

Author SHA1 Message Date
Benjamin Kramer 6434448813 Integrate LLVM at llvm/llvm-project@bad7d6b373
Updates LLVM usage to match
[bad7d6b3735d](https://github.com/llvm/llvm-project/commit/bad7d6b3735d)

PiperOrigin-RevId: 328142991
2020-08-24 08:20:25 -07:00
Mehdi Amini 12b4bc75b3 Integrate LLVM at llvm/llvm-project@b999400a4f
Updates LLVM usage to match
[b999400a4fb6](https://github.com/llvm/llvm-project/commit/b999400a4fb6)

PiperOrigin-RevId: 328096769
2020-08-24 01:20:00 -07:00
Mehdi Amini a229bc977d Integrate LLVM at llvm/llvm-project@f6decfa36d
Updates LLVM usage to match
[f6decfa36d89](https://github.com/llvm/llvm-project/commit/f6decfa36d89)

PiperOrigin-RevId: 328073633
2020-08-23 20:40:59 -07:00
Mehdi Amini ab84a780d0 Integrate LLVM at llvm/llvm-project@f164534ca8
Updates LLVM usage to match
[f164534ca8e0](https://github.com/llvm/llvm-project/commit/f164534ca8e0)

PiperOrigin-RevId: 328046788
2020-08-23 13:39:12 -07:00
Uday Bondhugula 282dba6d38 PR #42508: [MLIR] Erase dead lmhlo.constant ops
Imported from GitHub PR https://github.com/tensorflow/tensorflow/pull/42508

An lmhlo.constant op on an memref that is locally allocated and with
no users other than dealloc's can be deleted. Add a canonicalization
pattern for this.
Copybara import of the project:

--
8758c409a15f567e7cb8e1077faa020f5705c85a by Uday Bondhugula <uday@polymagelabs.com>:

[MLIR] Erase dead lmhlo.constant ops

An lmhlo.constant op on an memref that is locally allocated and with
no other users (other than dealloc's) can be deleted. Add a
canonicalization patter for this.

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/tensorflow/pull/42508 from polymage-labs:lhlo_constant_erase 8758c409a15f567e7cb8e1077faa020f5705c85a
PiperOrigin-RevId: 328042416
2020-08-23 12:28:54 -07:00
Hanhan Wang bfd629ecb0 Enhance lowering reshape op to Linalg.
Handle non-expansion and non-collapsion cases by rewriting it to two reshape
ops.

PiperOrigin-RevId: 327926863
2020-08-21 23:27:34 -07:00
A. Unique TensorFlower d2c9d03f31 Integrate LLVM at llvm/llvm-project@02bf5632a9
Updates LLVM usage to match
[02bf5632a94d](https://github.com/llvm/llvm-project/commit/02bf5632a94d)

PiperOrigin-RevId: 327894378
2020-08-21 16:34:38 -07:00
A. Unique TensorFlower 0a8096d91d Integrate LLVM at llvm/llvm-project@5e3fd471ac
Updates LLVM usage to match
[5e3fd471acb7](https://github.com/llvm/llvm-project/commit/5e3fd471acb7)

PiperOrigin-RevId: 327878947
2020-08-21 14:51:58 -07:00
A. Unique TensorFlower 72eb42a908 Integrate LLVM at llvm/llvm-project@50aae46331
Updates LLVM usage to match
[50aae463315d](https://github.com/llvm/llvm-project/commit/50aae463315d)

PiperOrigin-RevId: 327849475
2020-08-21 12:02:23 -07:00
A. Unique TensorFlower a4092162cd Integrate LLVM at llvm/llvm-project@c1dd5df425
Updates LLVM usage to match
[c1dd5df4255c](https://github.com/llvm/llvm-project/commit/c1dd5df4255c)

PiperOrigin-RevId: 327818600
2020-08-21 09:04:28 -07:00
A. Unique TensorFlower 61584e2116 Integrate LLVM at llvm/llvm-project@3f7985e6ec
Updates LLVM usage to match
[3f7985e6ec21](https://github.com/llvm/llvm-project/commit/3f7985e6ec21)

PiperOrigin-RevId: 327805023
2020-08-21 07:14:34 -07:00
A. Unique TensorFlower 320c16d782 Integrate LLVM at llvm/llvm-project@e1cd7cac8a
Updates LLVM usage to match
[e1cd7cac8a36](https://github.com/llvm/llvm-project/commit/e1cd7cac8a36)

PiperOrigin-RevId: 327792209
2020-08-21 05:00:27 -07:00
A. Unique TensorFlower 3cbff97673 Integrate LLVM at llvm/llvm-project@a54eb9b7c5
Updates LLVM usage to match
[a54eb9b7c509](https://github.com/llvm/llvm-project/commit/a54eb9b7c509)

PiperOrigin-RevId: 327772531
2020-08-21 01:09:29 -07:00
Mehdi Amini f39466cc2d Add explicit dialect registration for mlir-hlo-opt
This is fixing the build after upstream changes.

PiperOrigin-RevId: 327738263
2020-08-20 18:51:06 -07:00
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