A. Unique TensorFlower
c62fd89663
[MLIR][HLO] Add equal shapes case to rank specialization
...
Also restructure lowering implementation to facilitate the addition or removal
of special cases.
PiperOrigin-RevId: 374626365
2021-05-19 05:38:42 -07:00
Stella Laurenzo
71394fb301
Properly handle if DynamicBroadcastInDimOp shape is not of index type.
...
* The op defines this to be index, any integer, or pred (i1).
* Many TensorFlow legalizations produce integers for the shape.
PiperOrigin-RevId: 374566113
2021-05-18 21:12:11 -07:00
Stella Laurenzo
0fe07e3814
Separate CHLO transforms for expanding compositions and lowering broadcasts.
...
* The former is typically invariant regardless of backend.
* The latter may need to be done differently depending on capabilities of the lowering target.
PiperOrigin-RevId: 374492924
2021-05-18 13:33:59 -07:00
A. Unique TensorFlower
e0d9e9bffd
Integrate LLVM at llvm/llvm-project@6381664580
...
Updates LLVM usage to match
[638166458008](https://github.com/llvm/llvm-project/commit/638166458008 )
PiperOrigin-RevId: 374437050
2021-05-18 09:30:58 -07:00
A. Unique TensorFlower
1aa6eb24b0
Integrate LLVM at llvm/llvm-project@560b709abe
...
Updates LLVM usage to match
[560b709abedc](https://github.com/llvm/llvm-project/commit/560b709abedc )
PiperOrigin-RevId: 374420543
2021-05-18 08:12:11 -07:00
A. Unique TensorFlower
dedc129c8c
Integrate LLVM at llvm/llvm-project@f8dbd61074
...
Updates LLVM usage to match
[f8dbd6107417](https://github.com/llvm/llvm-project/commit/f8dbd6107417 )
PiperOrigin-RevId: 374391426
2021-05-18 04:58:00 -07:00
A. Unique TensorFlower
623b630fee
Integrate LLVM at llvm/llvm-project@3bc2b97b34
...
Updates LLVM usage to match
[3bc2b97b34ff](https://github.com/llvm/llvm-project/commit/3bc2b97b34ff )
PiperOrigin-RevId: 374379055
2021-05-18 03:18:33 -07:00
A. Unique TensorFlower
6af3d2df91
[MLIR][HLO] Add rank specialization with multiple non-scalar operands
...
Add lowering pattern for rank specialization clusters with more than one
non-scalar operand. The lowering resembles that of the `TransformUnrankedHlo`
pass and switches cases for maximal ranks from 1 through 8.
PiperOrigin-RevId: 374377002
2021-05-18 03:02:45 -07:00
A. Unique TensorFlower
0168484eed
Integrate LLVM at llvm/llvm-project@e2e1a78abc
...
Updates LLVM usage to match
[e2e1a78abcef](https://github.com/llvm/llvm-project/commit/e2e1a78abcef )
PiperOrigin-RevId: 374360199
2021-05-18 00:39:33 -07:00
A. Unique TensorFlower
577ab8bb81
Integrate LLVM at llvm/llvm-project@ab5ff154ab
...
Updates LLVM usage to match
[ab5ff154abe5](https://github.com/llvm/llvm-project/commit/ab5ff154abe5 )
PiperOrigin-RevId: 374247895
2021-05-17 12:04:15 -07:00
A. Unique TensorFlower
3f4e8bc658
Integrate LLVM at llvm/llvm-project@8854b27b19
...
Updates LLVM usage to match
[8854b27b198c](https://github.com/llvm/llvm-project/commit/8854b27b198c )
PiperOrigin-RevId: 374219034
2021-05-17 09:56:21 -07:00
A. Unique TensorFlower
474e419729
[MLIR][HLO] Generalize rank specialization with single operand
...
The pattern can be generalized to also rank specialize operations with a single
non-scalar operand. Also extract helper functions that can be reused in
following specializations.
PiperOrigin-RevId: 374198381
2021-05-17 08:12:55 -07:00
A. Unique TensorFlower
b86b18489c
Integrate LLVM at llvm/llvm-project@50511df32e
...
Updates LLVM usage to match
[50511df32edf](https://github.com/llvm/llvm-project/commit/50511df32edf )
PiperOrigin-RevId: 374197586
2021-05-17 08:08:48 -07:00
A. Unique TensorFlower
c514c73390
[MLIR][HLO] Extend rank specialization clustering pass
...
Also cluster operations that operate on same shape operands. These implicitly
satisfy the broadcasting semantics requirement. Also, add test cases for some
cases that appear in the current MLIR-generated kernels.
PiperOrigin-RevId: 374191950
2021-05-17 07:31:36 -07:00
A. Unique TensorFlower
b82bbf4dd1
Integrate LLVM at llvm/llvm-project@7c16f93c44
...
Updates LLVM usage to match
[7c16f93c44ca](https://github.com/llvm/llvm-project/commit/7c16f93c44ca )
PiperOrigin-RevId: 374179613
2021-05-17 06:06:00 -07:00
A. Unique TensorFlower
ccd70d5717
[MLIR][HLO] Add `rank-specialization-to-scf` pass
...
Currently the lowering is only implemented for the unary case. The n-ary case
will follow.
PiperOrigin-RevId: 374162772
2021-05-17 03:56:23 -07:00
A. Unique TensorFlower
295ef229d6
Integrate LLVM at llvm/llvm-project@a11117a7c0
...
Updates LLVM usage to match
[a11117a7c0a2](https://github.com/llvm/llvm-project/commit/a11117a7c0a2 )
PiperOrigin-RevId: 374152829
2021-05-17 02:33:42 -07:00
A. Unique TensorFlower
804d1b50d6
Integrate LLVM at llvm/llvm-project@88a8965a7d
...
Updates LLVM usage to match
[88a8965a7d93](https://github.com/llvm/llvm-project/commit/88a8965a7d93 )
PiperOrigin-RevId: 374099490
2021-05-16 17:25:22 -07:00
Ben Vanik
b06baae910
Fixing nondeterminism in pattern application.
...
The ReduceRegion* patterns are matching on the same ops as the PointwiseToLinalg*
patterns and on certain toolchains (MSVC) the order can be wrong. If the pointwise
runs first then it converts the op *within* the reduction before the reduction one
runs, leading to nested linalg op weirdness.
PiperOrigin-RevId: 373848269
2021-05-14 12:57:39 -07:00
Rahul Joshi
a361253e4f
[HLO] Add custom print/parse for window attributes of convolutions (in LMHLO)
...
PiperOrigin-RevId: 373807616
2021-05-14 09:47:25 -07:00
Adrian Kuegel
e4caaaf921
Integrate LLVM at llvm/llvm-project@e51ef7f070
...
Updates LLVM usage to match
[e51ef7f0706a](https://github.com/llvm/llvm-project/commit/e51ef7f0706a )
PiperOrigin-RevId: 373772350
2021-05-14 06:12:47 -07:00
A. Unique TensorFlower
76341f3720
[MLIR][HLO] Add mixed test for `rank-specialization-cluster` pass
...
PiperOrigin-RevId: 373762814
2021-05-14 04:40:40 -07:00
Adrian Kuegel
9248f0a182
Integrate LLVM at llvm/llvm-project@c82a0ae70e
...
Updates LLVM usage to match
[c82a0ae70e28](https://github.com/llvm/llvm-project/commit/c82a0ae70e28 )
PiperOrigin-RevId: 373750063
2021-05-14 02:35:37 -07:00
A. Unique TensorFlower
b1b6e81913
Integrate LLVM at llvm/llvm-project@7c57a9bd7d
...
Updates LLVM usage to match
[7c57a9bd7d4c](https://github.com/llvm/llvm-project/commit/7c57a9bd7d4c )
PiperOrigin-RevId: 373739370
2021-05-14 00:56:40 -07:00
A. Unique TensorFlower
d2cc74317c
Implement constant folding for mhlo.Sign.
...
PiperOrigin-RevId: 373550014
2021-05-13 03:54:04 -07:00
Hanhan Wang
d764806c1e
[MHLO:Linalg] Add support for lowering reshape of unsigned tensors
...
PiperOrigin-RevId: 373461627
2021-05-12 15:14:29 -07:00
Alex Zinenko
a2c9b3c9d7
[mlir] update gentbl() Bazel macro
...
Rename `gentbl` to `gentbl_cc_library` to make it clearer which kind of rule is
ultimately used.
Update `gentbl_*` macros to take `tbl_outs` options as a list rather a
whitespace-separated string and remove the related string handling.
PiperOrigin-RevId: 373406352
2021-05-12 10:58:58 -07:00
A. Unique TensorFlower
420c42a0a1
[MLIR][HLO] Support CHLO unary operations in rank specialization clustering
...
PiperOrigin-RevId: 373397321
2021-05-12 10:20:43 -07:00
A. Unique TensorFlower
596918a6f1
[MLIR][HLO] Allow rank specialization clustering with `chlo.broadcast_select` op
...
PiperOrigin-RevId: 373379990
2021-05-12 08:56:49 -07:00
Rahul Joshi
e260aa771c
[HLO] Add custom print/parse for convolution dimension numbers (in LMHLO)
...
PiperOrigin-RevId: 373379227
2021-05-12 08:52:46 -07:00
Itai Zukerman
30779f0c2f
Added build rules for HLO and LHLO ops MD.
...
PiperOrigin-RevId: 373373920
2021-05-12 08:23:40 -07:00
Adrian Kuegel
8895262330
Integrate LLVM at llvm/llvm-project@b7a11274f9
...
Updates LLVM usage to match
[b7a11274f90f](https://github.com/llvm/llvm-project/commit/b7a11274f90f )
PiperOrigin-RevId: 373353006
2021-05-12 06:04:40 -07:00
A. Unique TensorFlower
875803e5e1
[MLIR][HLO] Add more tests for `rank-specialization-cluster` pass
...
PiperOrigin-RevId: 373343750
2021-05-12 04:46:30 -07:00
Adrian Kuegel
b95162f182
Integrate LLVM at llvm/llvm-project@34c098b780
...
Updates LLVM usage to match
[34c098b780a2](https://github.com/llvm/llvm-project/commit/34c098b780a2 )
PiperOrigin-RevId: 373336846
2021-05-12 03:48:06 -07:00
A. Unique TensorFlower
313d24bc8f
[MLIR][HLO] Add `rank-specialization-cluster` pass
...
Add a pass to cluster unranked C/HLO operations in one
`chlo.rank_specialization_cluster` op. The C/HLO operations are moved to the
body of the operation. Later passes can use this to rank-specialize all these
operations together.
PiperOrigin-RevId: 373336725
2021-05-12 03:46:01 -07:00
Adrian Kuegel
7f84779868
Integrate LLVM at llvm/llvm-project@6351993da7
...
Updates LLVM usage to match
[6351993da72e](https://github.com/llvm/llvm-project/commit/6351993da72e )
PiperOrigin-RevId: 373327134
2021-05-12 02:34:59 -07:00
A. Unique TensorFlower
5ec03ba8a5
Integrate LLVM at llvm/llvm-project@23596fece0
...
Updates LLVM usage to match
[23596fece043](https://github.com/llvm/llvm-project/commit/23596fece043 )
PiperOrigin-RevId: 373315484
2021-05-12 00:56:04 -07:00
A. Unique TensorFlower
b783b3272e
Integrate LLVM at llvm/llvm-project@3f8be15f29
...
Updates LLVM usage to match
[3f8be15f2911](https://github.com/llvm/llvm-project/commit/3f8be15f2911 )
PiperOrigin-RevId: 373302768
2021-05-11 22:56:46 -07:00
A. Unique TensorFlower
3ccf3938fa
Integrate LLVM at llvm/llvm-project@fec2945998
...
Updates LLVM usage to match
[fec294599894](https://github.com/llvm/llvm-project/commit/fec294599894 )
PiperOrigin-RevId: 373275250
2021-05-11 18:37:01 -07:00
Jacques Pienaar
2ea9470515
Remove BASE_HLO_ConvOp to remove coupling between MHLO and LMHLO conv ops
...
PiperOrigin-RevId: 373201247
2021-05-11 11:54:44 -07:00
Itai Zukerman
a4db6c57aa
Removed all (most) BASE_HLO_* ops.
...
Moved the corresponding `summary` and `description` fields into the subclasses.
Kept BASE_HLO_ConvOp for `hasWindowReversal()'.
PiperOrigin-RevId: 373173025
2021-05-11 09:48:31 -07:00
A. Unique TensorFlower
7f7a86ad0d
[MLIR][HLO] Implement `RegionBranchOpInterface` for rank specialization cluster
...
PiperOrigin-RevId: 373163196
2021-05-11 09:03:05 -07:00
Adrian Kuegel
1432db02e7
Integrate LLVM at llvm/llvm-project@df47368d40
...
Updates LLVM usage to match
[df47368d406a](https://github.com/llvm/llvm-project/commit/df47368d406a )
PiperOrigin-RevId: 373136440
2021-05-11 06:24:17 -07:00
A. Unique TensorFlower
96a47345cc
[MLIR][HLO] Add `rank_specialization_cluster` op to CHLO
...
The operation will be used to cluster compatible operations that can be rank-
specialized collectively.
PiperOrigin-RevId: 373128557
2021-05-11 05:17:42 -07:00
Benjamin Kramer
86b7eb434c
[MHLO] Don't crash trying to constant fold mhlo.convert on complex
...
MLIR still doesn't have a complex attribute so this can't be implemented, so
just bail out instead of trying to fold.
PiperOrigin-RevId: 373128307
2021-05-11 05:15:57 -07:00
Adrian Kuegel
3cce7017fc
Integrate LLVM at llvm/llvm-project@88a48999d2
...
Updates LLVM usage to match
[88a48999d249](https://github.com/llvm/llvm-project/commit/88a48999d249 )
PiperOrigin-RevId: 373119140
2021-05-11 03:58:30 -07:00
A. Unique TensorFlower
6191b3e528
[MLIR][HLO] Use `#` operator for list concatenation in C/HLO definitions
...
PiperOrigin-RevId: 373110780
2021-05-11 02:53:34 -07:00
Adrian Kuegel
920f261262
Integrate LLVM at llvm/llvm-project@888307ee62
...
Updates LLVM usage to match
[888307ee625b](https://github.com/llvm/llvm-project/commit/888307ee625b )
PiperOrigin-RevId: 373100219
2021-05-11 01:18:26 -07:00
A. Unique TensorFlower
1de55d2620
Integrate LLVM at llvm/llvm-project@1e11616a07
...
Updates LLVM usage to match
[1e11616a071d](https://github.com/llvm/llvm-project/commit/1e11616a071d )
PiperOrigin-RevId: 373087867
2021-05-10 23:34:27 -07:00
A. Unique TensorFlower
7f86dd9f7e
Constant fold compare EQ if one of the operands is true and compare NE if one of the operands is false.
...
PiperOrigin-RevId: 373058030
2021-05-10 18:53:49 -07:00