PR #11760: [gpu] Change the implementation of GetFusionRoots to a simpler one
PR #11760: [gpu] Change the implementation of GetFusionRoots to a simpler one

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

Following the tuple -> get-tuple-element sequence for getting roots and remove allowing a duplicate root in case it is encountered twice in a row in the recursive search.
Copybara import of the project:

--
56c10695a2ff6937b67259b7d5037187e043bbcb by Shraiysh Vaishay <svaishay@nvidia.com>:

[gpu] Change the implementation of GetFusionRoots to a simpler one

There is no apparent requirement for this check. If the CI tests fail,
then I will revert this and work on a sophisticated implementation of
the function.

Merging this change closes #11760

FUTURE_COPYBARA_INTEGRATE_REVIEW=https://github.com/openxla/xla/pull/11760 from shraiysh:getfusionroots_fix 56c10695a2ff6937b67259b7d5037187e043bbcb
