onnxruntime/orttraining
guyang3532 4dc63692f8
Add FlattenAndUnpad Op (#17845)
### Description
Add an op named `FlattenAndUnpad`.
This op implements functions:
1. Flatten the first two dims of input tensor.
2. Gather valid value from input tensor with index tensor,.


### Motivation and Context
The grad op of `PadAndUnflatten` was `GatherGrad` which is inefficient
in performance.
I implement this `FlattenAndUnpad` just to replace the `GatherGrad` as
grad of `PadAndUnflatten`.
With this op, we also can simplify the "Reshape + ShrunkenGather"
pattern to `PadAndUnflatten` in padding elimination optimizer, which
will also improve performance.
2023-11-09 09:52:48 +08:00
..
orttraining Add FlattenAndUnpad Op (#17845) 2023-11-09 09:52:48 +08:00
pytorch_frontend_examples [Better Engineering] Bump ruff to 0.0.278 and fix new lint errors (#16789) 2023-07-21 12:53:41 -07:00
tools [ROCm] Update ROCm and MIGraphX CI to ROCm5.7 (#17834) 2023-10-09 10:29:11 +08:00