PR #12297: Fix side output index computation for transpose fusion
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this [failed invocation](https://github.com/tensorflow/tensorflow/pull/68579/checks?check_run_id=25365728326) of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.
PR #12297: Fix side output index computation for transpose fusion

Imported from GitHub PR https://github.com/openxla/xla/pull/12297

There exist bug in ComputeThreadIdToOutputIndexing func. Currently, this func can not calculate indexing map correctly for sided output. Fix it and add corresponding test.
Copybara import of the project:

--
807c3cc82b1cb58ded59e8900135c29ee949c605 by Zhou, Lingzhi <lingzhi.zhou@intel.com>:

fix sided ouput index computation for transpose fusion

--
0ca08e78c1da3c43dee32460e1244a8d7e6e2aea by Zhou, Lingzhi <lingzhi.zhou@intel.com>:

restore

--
2f187c842eeddaf941416b321b9fe7c032721a59 by Zhou, Lingzhi <lingzhi.zhou@intel.com>:

format

--
fdb4d065da077e70a9b3544b4df78ce0b555012a by Zhou, Lingzhi <lingzhi.zhou@intel.com>:

remove change to input indexing due to equivalence

--
5484f950e16b6c97b65ca9d56bf6fa3dd65b909f by Zhou, Lingzhi <lingzhi.zhou@intel.com>:

use transpose hero index

--
5f08e19051e235419c8ac7f7dbdfb8c2ba5934f2 by Zhou, Lingzhi <lingzhi.zhou@intel.com>:

typo

--
4804d1cfa6f22a09a29760753cbda3030485a0fa by Zhou, Lingzhi <lingzhi.zhou@intel.com>:

fix build error

--
468cc85886ae15b60dcc8e5edc17530e3d62efa8 by Zhou, Lingzhi <lingzhi.zhou@intel.com>:

fix condition when side ouput inputs shape is not equal to output shape

--
5f33d319c0be6cb8d840d35c8a54210a9a4aeec0 by Zhou, Lingzhi <lingzhi.zhou@intel.com>:

fix transpose test

--
d362fb2dffca7a6172d2386db3d105ac91a96ee0 by Zhou, Lingzhi <lingzhi.zhou@intel.com>:

fix error caused by func signature change

--
c5fb450cf36a4e07b2e2de0e71e4c01cb1d1e866 by Zhou, Lingzhi <lingzhi.zhou@intel.com>:

fix test

--
cf78f46a2961a58ee31636022055e9f04b594fd0 by Zhou, Lingzhi <lingzhi.zhou@intel.com>:

add comment to illustrate what input indexing mean for side ouput

--
54789eb05ecc751881ea34c02346d19a1660bf9d by Zhou, Lingzhi <lingzhi.zhou@intel.com>:

add test to check if root0 and root1 has same input indexing when share input

--
f7db8e3e3f928311f210b3dd4111937a129b839c by Zhou, Lingzhi <lingzhi.zhou@intel.com>:

fix hlo verifier error

--
8567c4e9dd516120e0fe14a1bcc1ee573eb7da4c by Zhou, Lingzhi <lingzhi.zhou@intel.com>:

missing conflict

--
f0c1a66df84b2af1f8673b9ab7b2a4fb7c2144f3 by Zhou, Lingzhi <lingzhi.zhou@intel.com>:

format

--
7763742ff0138f6e297487414858be42ac671697 by Zhou, Lingzhi <lingzhi.zhou@intel.com>:

fix bugs caused by vectorization support of transpose mlir emitter

--
bc1d3854e90f66b2874d54bbcdd48a45d8dccf1c by Zhou, Lingzhi <lingzhi.zhou@intel.com>:

set correuse ranpose hero index

Merging this change closes #12297

FUTURE_COPYBARA_INTEGRATE_REVIEW=https://github.com/openxla/xla/pull/12297 from lingzhi98:lingzhi/fix_transpose_index_computation bc1d3854e90f66b2874d54bbcdd48a45d8dccf1c
