PR #11654: [ROCm] Remove AllocateOwnedArray from rocm code.
PR #11654: [ROCm] Remove AllocateOwnedArray from rocm code.

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


Copybara import of the project:

--
30ce2b21d9e9ea7e8c474441f0b3745eef5ecd5b by Zoran Jovanovic <zjovanov@amd.com>:

[ROCm] Remove AllocateOwnedArray from rocm code.

Merging this change closes #11654

FUTURE_COPYBARA_INTEGRATE_REVIEW=https://github.com/openxla/xla/pull/11654 from ROCm:ci_rocm-fix-AllocateOwnedArray 30ce2b21d9e9ea7e8c474441f0b3745eef5ecd5b
