PR #12864: [ROCm] fix DeviceAllocate code
PR #12864: [ROCm] fix DeviceAllocate code

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


Copybara import of the project:

--
2e6dfa841a495c1f0babf0ff6f877bc1866bf319 by Ruturaj4 <ruturaj.vaidya@amd.com>:

[ROCm] fix DeviceAllocate code

Merging this change closes #12864

FUTURE_COPYBARA_INTEGRATE_REVIEW=https://github.com/openxla/xla/pull/12864 from ROCm:ci_deviceallocate_fix 2e6dfa841a495c1f0babf0ff6f877bc1866bf319
