Commit Graph

569 Commits

Author SHA1 Message Date
A. Unique TensorFlower e866aac3ac Integrate LLVM at llvm/llvm-project@72ddd559b8
Updates LLVM usage to match
[72ddd559b8aa](https://github.com/llvm/llvm-project/commit/72ddd559b8aa)

PiperOrigin-RevId: 340292055
2020-11-02 12:29:52 -08:00
Tres Popp 81e8d778c4 Fix bug using std.rank instead of shape.rank
PiperOrigin-RevId: 339890070
2020-10-30 09:59:24 -07:00
Tres Popp 76b30fd426 Move unranked chlo lowering to transform_unranked_hlo.
Additionally:
- Forward listeners through new if/else op builders.
This corrects an error that led to incomplete legalization of broadcasted op
lowering.
- Use OpConversionPattern to ensure up to date operand values are used.
PiperOrigin-RevId: 339838833
2020-10-30 02:56:44 -07:00
A. Unique TensorFlower e188ef10f2 Integrate LLVM at llvm/llvm-project@9bb9b737c5
Updates LLVM usage to match
[9bb9b737c557](https://github.com/llvm/llvm-project/commit/9bb9b737c557)

PiperOrigin-RevId: 339799862
2020-10-29 20:28:56 -07:00
Thomas Joerg e888b04a5c Integrate LLVM at llvm/llvm-project@6648414b2b
Updates LLVM usage to match
[6648414b2b7d](https://github.com/llvm/llvm-project/commit/6648414b2b7d)

PiperOrigin-RevId: 339727680
2020-10-29 12:53:05 -07:00
Nicolas Vasilache 880f603239 Drop OperationFolder usage with Linalg fusion.
PiperOrigin-RevId: 339653466
2020-10-29 06:10:14 -07:00
Thomas Joerg 3a6580bf75 Integrate LLVM at llvm/llvm-project@4d11daa659
Updates LLVM usage to match
[4d11daa659a1](https://github.com/llvm/llvm-project/commit/4d11daa659a1)

PiperOrigin-RevId: 339631220
2020-10-29 03:02:38 -07:00
A. Unique TensorFlower fcb6b5d395 Integrate LLVM at llvm/llvm-project@23ed570af1
Updates LLVM usage to match
[23ed570af1cc](https://github.com/llvm/llvm-project/commit/23ed570af1cc)

PiperOrigin-RevId: 339608894
2020-10-28 23:25:33 -07:00
Benjamin Kramer 3bf4277ea4 [MLIR] Add a lmhlo.reduce -> linalg.generic converter
Doesn't support tensors right now, as it's somewhat hairy to support both at
the same time. Since we use a generic lowering the result is messy
and needs a mem2reg pass to eliminate extra load/store/allocas.

PiperOrigin-RevId: 339562971
2020-10-28 16:38:19 -07:00
A. Unique TensorFlower e58bfd48e6 Integrate LLVM at llvm/llvm-project@87f03e13ce
Updates LLVM usage to match
[87f03e13ce0e](https://github.com/llvm/llvm-project/commit/87f03e13ce0e)

PiperOrigin-RevId: 339528247
2020-10-28 13:38:56 -07:00
Alex Zinenko e77b5ae534 Update MLIR ODS syntax to use OpBuidlerDAG instead of OpBuilder
The latter has been deprecated in favor of the former and will be removed.

PiperOrigin-RevId: 339523966
2020-10-28 13:16:46 -07:00
Adrian Kuegel 0052913775 Integrate LLVM at llvm/llvm-project@c56bbb3961
Updates LLVM usage to match
[c56bbb3961e4](https://github.com/llvm/llvm-project/commit/c56bbb3961e4)

PiperOrigin-RevId: 339442735
2020-10-28 05:47:50 -07:00
A. Unique TensorFlower 91b8e58cc1 Integrate LLVM at llvm/llvm-project@2e1a737f46
Updates LLVM usage to match
[2e1a737f4646](https://github.com/llvm/llvm-project/commit/2e1a737f4646)

PiperOrigin-RevId: 339375372
2020-10-27 18:54:52 -07:00
Kazuaki Ishizaki 5f2b7a74be PR #44277: NFC - minor spelling tweaks of documents under compiler directory
Imported from GitHub PR https://github.com/tensorflow/tensorflow/pull/44277

This PR addresses minor spelling tweaks of md/td files under compiler directory
Copybara import of the project:

--
4fedebde8f7d48ce2917642ebaab966c9ce49f3e by Kazuaki Ishizaki <ishizaki@jp.ibm.com>:

minor spelling tweaks

PiperOrigin-RevId: 339260830
2020-10-27 09:08:22 -07:00
Thomas Joerg 7363748bae Integrate LLVM at llvm/llvm-project@0fc1aa22ee
Updates LLVM usage to match
[0fc1aa22ee6a](https://github.com/llvm/llvm-project/commit/0fc1aa22ee6a)

PiperOrigin-RevId: 339239851
2020-10-27 06:56:16 -07:00
Benjamin Kramer b7aa01dbe0 Integrate LLVM at llvm/llvm-project@26750a1264
Updates LLVM usage to match
[26750a1264b3](https://github.com/llvm/llvm-project/commit/26750a1264b3)

PiperOrigin-RevId: 339127601
2020-10-26 15:11:52 -07:00
Smit Hinsu 6eda9ed273 Add compare_type optional attribute to CompareOp in HLO dialects
If unspecified, `compare_type` is FLOAT for float element types, SIGNED for signed element types and UNSIGNED for unsigned element types. compare_type can be TOTALORDER for float element types.

- Added import and export support the attribute.
- Restricted legalization from HLO to TF to the default compare types.
- Updated existing usage of the CompareOp

PiperOrigin-RevId: 339099219
2020-10-26 12:58:29 -07:00
Richard Uhler f9843fabe1 Use InferTypeOpInterface for HLO_SliceOp.
Instead of having a custom builder to construct a slice op without an explicit
return type.

PiperOrigin-RevId: 339058864
2020-10-26 09:54:13 -07:00
Hanhan Wang 444fae9bac [NFC] Make naming style consistent.
Use lowercase with underscores between words instead of camelStyle.

PiperOrigin-RevId: 338722328
2020-10-23 12:23:25 -07:00
Benjamin Kramer 31c1c3aa1f Integrate LLVM at llvm/llvm-project@c89447b659
Updates LLVM usage to match
[c89447b65984](https://github.com/llvm/llvm-project/commit/c89447b65984)

PiperOrigin-RevId: 338560059
2020-10-22 15:23:24 -07:00
A. Unique TensorFlower 639324cf99 Internal change
PiperOrigin-RevId: 338486689
2020-10-22 09:22:38 -07:00
Sean Silva c3f4ab06d3 Use OpConversionPattern instead of BufferizeOpConversionPattern
As described in mlir/Transforms/Bufferize.h, patterns that don't need the special methods on a BufferizeTypeConverter should use a regular OpConversionPattern.

PiperOrigin-RevId: 338424819
2020-10-22 01:20:43 -07:00
A. Unique TensorFlower 51684a3833 Internal change
PiperOrigin-RevId: 338280259
2020-10-21 09:39:51 -07:00
A. Unique TensorFlower 7c45388930 Integrate LLVM at llvm/llvm-project@6154c4115c
Updates LLVM usage to match
[6154c4115cd4](https://github.com/llvm/llvm-project/commit/6154c4115cd4)

PiperOrigin-RevId: 338262655
2020-10-21 07:56:48 -07:00
Roman Dzhabarov ae00ae487c [mlir] Simplify DDR matching patterns with equal operands for operators.
This https://reviews.llvm.org/D89254 diff introduced implicit matching between same name arguments. Modify usages accordingly.

PiperOrigin-RevId: 338090110
2020-10-20 10:47:09 -07:00
A. Unique TensorFlower 33c450e4cb Fix the MHLO to LMHLO lowering of 'gather'
The lowering assumes that the 'gather' op attributes are identical in both MHLO and LMHLO. But that's not true; some time ago the MHLO version was changed to pack 4 of its attributes into a struct. By doing the same for the LMHLO version we both fix the lowering for this op and resolve a longstanding TODO.

PiperOrigin-RevId: 337943946
2020-10-19 15:14:05 -07:00
A. Unique TensorFlower 204cf7d544 Integrate LLVM at llvm/llvm-project@f402e682d0
Updates LLVM usage to match
[f402e682d0ef](https://github.com/llvm/llvm-project/commit/f402e682d0ef)

PiperOrigin-RevId: 337872985
2020-10-19 09:34:40 -07:00
A. Unique TensorFlower 7a983ea389 Add folder for mhlo::pad
PiperOrigin-RevId: 337827560
2020-10-19 04:21:44 -07:00
A. Unique TensorFlower 4a18aa41ee Add folder to mhlo::round_nearest_afz
PiperOrigin-RevId: 337823786
2020-10-19 03:45:15 -07:00
A. Unique TensorFlower 92c531cf36 Integrate LLVM at llvm/llvm-project@b740899c50
Updates LLVM usage to match
[b740899c500b](https://github.com/llvm/llvm-project/commit/b740899c500b)

PiperOrigin-RevId: 337679767
2020-10-17 13:03:55 -07:00
Jacques Pienaar 27968619b7 Verify non-scalar inputs for HLO concat
XLA HLO concat does not accept scalars, so fail verification if this occurs. Avoids segfault when accessing an empty output shape.

PiperOrigin-RevId: 337618167
2020-10-16 19:39:31 -07:00
A. Unique TensorFlower 706718b4fb Permit vector types in lmhlo to std lowering.
PiperOrigin-RevId: 337523303
2020-10-16 09:47:02 -07:00
Stephan Herhut 2e30b59ddc Extend hlo-fuse-linalg slightly to support aliased returns.
The fusion heuristic identifies the root of a fusion by checking whether an
output of a linalg operation is a function result. It did not consider outputs
flowing through aliasing operations (like casts).

PiperOrigin-RevId: 337479910
2020-10-16 04:04:23 -07:00
Adrian Kuegel 6a91ac6d8f Integrate LLVM at llvm/llvm-project@51ff04567b
Updates LLVM usage to match
[51ff04567b2f](https://github.com/llvm/llvm-project/commit/51ff04567b2f)

PiperOrigin-RevId: 337477820
2020-10-16 03:40:23 -07:00
Adrian Kuegel 7ec0408776 Integrate LLVM at llvm/llvm-project@cfa7094e49
Updates LLVM usage to match
[cfa7094e49cf](https://github.com/llvm/llvm-project/commit/cfa7094e49cf)

PiperOrigin-RevId: 337464568
2020-10-16 01:31:55 -07:00
A. Unique TensorFlower b56793297a Integrate LLVM at llvm/llvm-project@f6bf2823c4
Updates LLVM usage to match
[f6bf2823c44e](https://github.com/llvm/llvm-project/commit/f6bf2823c44e)

PiperOrigin-RevId: 337425628
2020-10-15 18:44:35 -07:00
A. Unique TensorFlower 51cd4200b6 Make LMHLO's Dot have the same power as MHLO's DotGeneral.
PiperOrigin-RevId: 337391565
2020-10-15 15:09:06 -07:00
Adrian Kuegel 8fe5bc89bb Integrate LLVM at llvm/llvm-project@50df5f24dc
Updates LLVM usage to match
[50df5f24dc33](https://github.com/llvm/llvm-project/commit/50df5f24dc33)

PiperOrigin-RevId: 337292894
2020-10-15 06:08:13 -07:00
Adrian Kuegel eb5a41da32 Integrate LLVM at llvm/llvm-project@196bee9648
Updates LLVM usage to match
[196bee9648a9](https://github.com/llvm/llvm-project/commit/196bee9648a9)

PiperOrigin-RevId: 337280377
2020-10-15 04:12:11 -07:00
A. Unique TensorFlower 05ee41baf8 Add folder for mhlo::scatter
PiperOrigin-RevId: 337274351
2020-10-15 03:26:05 -07:00
Adrian Kuegel 0f36979e2c Integrate LLVM at llvm/llvm-project@220de1f32a
Updates LLVM usage to match
[220de1f32add](https://github.com/llvm/llvm-project/commit/220de1f32add)

PiperOrigin-RevId: 337270545
2020-10-15 02:54:24 -07:00
A. Unique TensorFlower e8eb3f80d1 Integrate LLVM at llvm/llvm-project@89657b3a3b
Updates LLVM usage to match
[89657b3a3b57](https://github.com/llvm/llvm-project/commit/89657b3a3b57)

PiperOrigin-RevId: 337151511
2020-10-14 12:51:44 -07:00
Rahul Joshi f6b4e6758a Add GPU specific LMHLO level ops
- Introduce operations in a new lmhlo_gpu dialect that map to GPU library function calls
  in the XLA:GPU backend.
- Add basic unit tests as well.

PiperOrigin-RevId: 337132166
2020-10-14 11:23:55 -07:00
Adrian Kuegel 8506f1f26a Integrate LLVM at llvm/llvm-project@9b3c2a72e4
Updates LLVM usage to match
[9b3c2a72e4cb](https://github.com/llvm/llvm-project/commit/9b3c2a72e4cb)

PiperOrigin-RevId: 337077072
2020-10-14 06:24:25 -07:00
Adrian Kuegel 8d69f52179 Integrate LLVM at llvm/llvm-project@d0c95808e5
Updates LLVM usage to match
[d0c95808e50c](https://github.com/llvm/llvm-project/commit/d0c95808e50c)

PiperOrigin-RevId: 337061504
2020-10-14 04:21:36 -07:00
Adrian Kuegel 3a4d99a3b4 Integrate LLVM at llvm/llvm-project@3b33b41604
Updates LLVM usage to match
[3b33b4160478](https://github.com/llvm/llvm-project/commit/3b33b4160478)

PiperOrigin-RevId: 337052227
2020-10-14 02:58:14 -07:00
A. Unique TensorFlower 15fe5ca737 Integrate LLVM at llvm/llvm-project@6713332fdd
Updates LLVM usage to match
[6713332fddb7](https://github.com/llvm/llvm-project/commit/6713332fddb7)

PiperOrigin-RevId: 336988895
2020-10-13 17:21:14 -07:00
Adrian Kuegel 53d16d9f8e Integrate LLVM at llvm/llvm-project@93377888ae
Updates LLVM usage to match
[93377888ae89](https://github.com/llvm/llvm-project/commit/93377888ae89)

PiperOrigin-RevId: 336669842
2020-10-12 08:42:31 -07:00
Adrian Kuegel 5039c00c4c Integrate LLVM at llvm/llvm-project@473b364a19
Updates LLVM usage to match
[473b364a19ff](https://github.com/llvm/llvm-project/commit/473b364a19ff)

PiperOrigin-RevId: 336647877
2020-10-12 05:59:06 -07:00
A. Unique TensorFlower 2a1626bdfb Integrate LLVM at llvm/llvm-project@a2291a58bf
Updates LLVM usage to match
[a2291a58bf1c](https://github.com/llvm/llvm-project/commit/a2291a58bf1c)

PiperOrigin-RevId: 336423546
2020-10-09 23:19:33 -07:00