PR #10724: [NVIDIA GPU] Fix crash in thunk lowering
PR #10724: [NVIDIA GPU] Fix crash in thunk lowering

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

send and recv will have tuple as output shape, the tuple contains a token field, we only want to use the memory space of the first element in the tuple which is the actual data, not the token element.
Copybara import of the project:

--
89981b6576a22134831ddfc528fad900129d5058 by TJ <tjx@nvidia.com>:

fix crash in thunk lowering

Merging this change closes #10724

FUTURE_COPYBARA_INTEGRATE_REVIEW=https://github.com/openxla/xla/pull/10724 from Tixxx:tixxx/shape_crash 89981b6576a22134831ddfc528fad900129d5058
