mlir-hlo/lib/Dialect/mhlo/IR
Wenyi Zhao ade873a5e0 PR #49970: [MLIR][DISC] bufferize DynamicReshape and DynamicBroadcastInDim
Imported from GitHub PR https://github.com/tensorflow/tensorflow/pull/49970

1, add hlo-to-lhlo support for DynamicReshape and DynamicBroadcastInDim

2, add a flag `convert-to-lmhlo-only` to seperate following two case:
   - hlo-to-lhlo only. Simply lowers all mhlo ops to their lmhlo
     counterparts, do not apply any optimization (e.g. elide any
     buffer copy). Buffer optimization is not easy in dynamic
     shape world especially when involving control flow, thus we
     leave this to another dedicated pass.

   - hlo-to-lhlo-or-memref-directly. Lowers some metadata-only mhlo
     ops (e.g. reshape) to memref dialect directly and Lowers others
     to their lmhlo counterparts.
Copybara import of the project:

--
562bd65a368f6194405c4ae6900e3b4388a5ec03 by Wenyi Zhao <reyizero@gmail.com>:

[MLIR][DISC] bufferize DynamicReshape and DynamicBroadcastInDim

1, add hlo-to-lhlo support for DynamicReshape and DynamicBroadcastInDim

2, add a flag `convert-to-lmhlo-only` to seperate following two case:
   - hlo-to-lhlo only. Simply lowers all mhlo ops to their lmhlo
     counterparts, do not apply any optimization (e.g. elide any
     buffer copy). Buffer optimization is not easy in dynamic
     shape world especially when involving control flow, thus we
     leave this to another dedicated pass.

   - hlo-to-lhlo-or-memref-directly. Lowers some metadata-only mhlo
     ops (e.g. reshape) to memref dialect directly and Lowers others
     to their lmhlo counterparts.

PiperOrigin-RevId: 377603395
2021-06-04 15:36:03 -07:00
..
CMakeLists.txt [HLO] Adopt custom syntax for convolution dims and window attributes for LMHLO_GPU 2021-05-20 09:41:48 -07:00
chlo_canonicalize.td Add chlo.constant_like op which splats a constant to shape of operand 2020-08-11 14:54:48 -07:00
chlo_ops.cc PR #49454: [MLIR][DISC] Upgrade to use the new `reifyReturnTypeShapes` interface. 2021-05-24 10:11:55 -07:00
hlo_ops.cc PR #49970: [MLIR][DISC] bufferize DynamicReshape and DynamicBroadcastInDim 2021-06-04 15:36:03 -07:00
hlo_ops_base_enums.cc [MLIR:HLO] Generate enum decls for HLO and LHLO GPU dialects. 2020-12-02 11:39:23 -08:00
hlo_ops_base_structs.cc [HLO] Add custom print/parse for convolution dimension numbers (in LMHLO) 2021-05-12 08:52:46 -07:00
hlo_ops_common.cc [HLO] Add custom print/parse for window attributes of convolutions (in LMHLO) 2021-05-14 09:47:25 -07:00
hlo_patterns.td Restrict canonicalization to avoid changing type 2021-03-16 16:54:05 -07:00
infer_fusibility_op_interface.cc More cleanup in mlir-hlo to prepare for the standalone build 2020-08-03 19:28:00 -07:00
init.cc Add GPU specific LMHLO level ops 2020-10-14 11:23:55 -07:00
lhlo_gpu_ops.cc [HLO] Adopt custom syntax for convolution dims and window attributes for LMHLO_GPU 2021-05-20 09:41:48 -07:00
lhlo_gpu_ops_enums.cc [MLIR:HLO] Generate enum decls for HLO and LHLO GPU dialects. 2020-12-02 11:39:23 -08:00
lhlo_gpu_ops_structs.cc Make LMHLO's Dot have the same power as MHLO's DotGeneral. 2020-10-15 15:09:06 -07:00
lhlo_ops.cc [HLO] Add custom print/parse for window attributes of convolutions (in LMHLO) 2021-05-14 09:47:25 -07:00
lhlo_ops_structs.cc [MLIR:LHLO] Add optional call target arg mapping to LMHLO CustomCall operations. 2021-02-22 08:43:00 -08:00
mhlo_canonicalize.td PR #49228: [MLIR][DISC] porting dynamic shape related OPs to mhlo and lmhlo dialect 2021-05-20 23:16:47 -07:00