mlir-hlo/tests
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
..
end2end Integrate LLVM at llvm/llvm-project@8396aeb07c 2021-03-31 08:01:34 -07:00
CMakeLists.txt Add CMake files and lit configurations, enough for `ninja check-mlir-hlo` to pass on all the tests 2020-08-07 22:14:34 -07:00
canonicalize.mlir Integrate LLVM at llvm/llvm-project@cb65419b1a 2021-05-26 04:47:24 -07:00
chlo_infer_shape_type_methods.mlir Integrate LLVM at llvm/llvm-project@671f0e2e18 2021-04-28 16:37:53 -07:00
chlo_legalize_to_hlo_broadcasts.mlir Integrate LLVM at llvm/llvm-project@cb65419b1a 2021-05-26 04:47:24 -07:00
chlo_legalize_to_mhlo.mlir [MLIR][KernelGen] Fix zeta lowering at poles 2021-03-10 01:09:10 -08:00
chlo_ops.mlir [MLIR][HLO] Implement `RegionBranchOpInterface` for rank specialization cluster 2021-05-11 09:03:05 -07:00
concatenate.mlir Rename `xla_hlo` dialect to `mhlo` 2020-07-30 22:32:50 +00:00
convert.mlir [MHLO] Don't crash trying to constant fold mhlo.convert on complex 2021-05-11 05:15:57 -07:00
hlo-legalize-gather-to-torch-index-select.mlir Add a transform for Gathers to torch_index_select. 2020-07-30 22:34:32 +00:00
hlo-legalize-to-lhlo-only-dynamic.mlir PR #49970: [MLIR][DISC] bufferize DynamicReshape and DynamicBroadcastInDim 2021-06-04 15:36:03 -07:00
hlo-legalize-to-lhlo-unranked.mlir PR #49454: [MLIR][DISC] Upgrade to use the new `reifyReturnTypeShapes` interface. 2021-05-24 10:11:55 -07:00
hlo-legalize-to-lhlo.mlir PR #49454: [MLIR][DISC] Upgrade to use the new `reifyReturnTypeShapes` interface. 2021-05-24 10:11:55 -07:00
hlo-legalize-to-linalg.mlir Integrate LLVM at llvm/llvm-project@da3ed58b97 2021-06-03 20:45:18 -07:00
hlo-transform-unranked.mlir Lower ReluGrad via chlo::BroadcastSelect. 2021-05-04 01:03:02 -07:00
inlining.mlir Rename `xla_hlo` dialect to `mhlo` 2020-07-30 22:32:50 +00:00
legalize-control-flow.mlir Restrict MHLO control flow ops to single-block regions 2021-03-30 17:51:03 -07:00
legalize-to-std.mlir Integrate LLVM at llvm/llvm-project@b24436ac96 2021-03-23 12:20:17 -07:00
legalize-trigonometric-to-approximation.mlir Fix tanh lowering for NaN input. 2021-03-24 06:34:36 -07:00
legalize_to_scf.mlir Integrate LLVM at llvm/llvm-project@0cf7e4b252 2020-12-16 20:30:17 -08:00
lhlo-fuse-linalg.mlir Integrate LLVM at llvm/llvm-project@b24436ac96 2021-03-23 12:20:17 -07:00
lhlo-legalize-select-and-scatter.mlir Integrate LLVM at llvm/llvm-project@4b13b7581d 2021-04-27 12:19:05 -07:00
lhlo-legalize-tensor-load-op.mlir PR #49598: [MLIR][DISC] legalize tensor_load inserted during hlo-to-lhlo conversion 2021-06-01 16:27:56 -07:00
lhlo-legalize-to-affine.mlir PR #47315: [MLIR] Add concatenateOp lowering from lmhlo to Affine. 2021-04-14 11:06:38 -07:00
lhlo-legalize-to-gpu.mlir Integrate LLVM at llvm/llvm-project@678241795c 2021-03-16 13:33:00 -07:00
lhlo-legalize-to-linalg.mlir Integrate LLVM at llvm/llvm-project@da3ed58b97 2021-06-03 20:45:18 -07:00
lhlo-legalize-to-parallel-loops.mlir Integrate LLVM at llvm/llvm-project@678241795c 2021-03-16 13:33:00 -07:00
lhlo_gpu_ops.mlir [HLO] Adopt custom syntax for convolution dims and window attributes for LMHLO_GPU 2021-05-20 09:41:48 -07:00
lhlo_ops.mlir [HLO] Add custom print/parse for window attributes of convolutions (in LMHLO) 2021-05-14 09:47:25 -07:00
lit.cfg.py Add CMake files and lit configurations, enough for `ninja check-mlir-hlo` to pass on all the tests 2020-08-07 22:14:34 -07:00
lit.site.cfg.py.in Add license header to lit.site.cfg.py.in 2020-08-07 22:22:24 -07:00
lower-complex.mlir Generate Equal and NotEqual kernels for complex types. 2021-04-15 00:35:52 -07:00
lower-general-dot.mlir Cleanup build rule names in compiler/mlir/hlo to remove the redundant/obsolete xla_ prefix 2020-07-30 22:33:29 +00:00
materialize-broadcasts.mlir Cleanup build rule names in compiler/mlir/hlo to remove the redundant/obsolete xla_ prefix 2020-07-30 22:33:29 +00:00
mhlo-fusion.mlir Cleanup build rule names in compiler/mlir/hlo to remove the redundant/obsolete xla_ prefix 2020-07-30 22:33:29 +00:00
mhlo_infer_shape_type_methods.mlir [HLO:MLIR] Make binary op type reification emit shape_of instead of tensor ops 2021-03-11 02:01:35 -08:00
move_up_dynamic_broadcasts_for_fusion.mlir [MLIR][HLO] Eliminate duplicate broadcastable constraints 2021-05-31 13:50:23 -07:00
ops.mlir Add `mhlo.all_gather` op to MHLO dialect. 2021-06-03 10:45:29 -07:00
optimize-hlo.mlir Add an optimization that converts some Gathers to Slices. 2020-07-30 22:34:10 +00:00
rank-specialization.mlir [MLIR][KernelGen] Simplify rank specialization tests with smaller target rank 2021-06-02 03:48:07 -07:00
reduce.mlir Integrate LLVM at llvm/llvm-project@cb65419b1a 2021-05-26 04:47:24 -07:00
reshape.mlir Rename `xla_hlo` dialect to `mhlo` 2020-07-30 22:32:50 +00:00
reverse.mlir Rename `xla_hlo` dialect to `mhlo` 2020-07-30 22:32:50 +00:00
sink-constants-to-control-flow.mlir Sink standard dialect constants in sink_constants_to_control_flow pass 2020-08-03 19:30:29 -07:00
transpose.mlir Rename `xla_hlo` dialect to `mhlo` 2020-07-30 22:32:50 +00:00
tuple.mlir Rename `xla_hlo` dialect to `mhlo` 2020-07-30 22:32:50 +00:00
unfuse_batch_norm.mlir Integrate LLVM at llvm/llvm-project@678241795c 2021-03-16 13:33:00 -07:00