Skip to content

Commit 7dd6bfa

Browse files
committed
opal/mca/accelerator: ROCm 6.0 incompatibility fix
Signed-off-by: nileshnegi <[email protected]>
1 parent 329f558 commit 7dd6bfa

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

opal/mca/accelerator/rocm/accelerator_rocm_module.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,22 @@ static int mca_accelerator_rocm_check_addr (const void *addr, int *dev_id, uint6
8585
*flags = 0;
8686
err = hipPointerGetAttributes(&srcAttr, addr);
8787
if (hipSuccess == err) {
88+
#if HIP_VERSION >= 50731921
89+
if (hipMemoryTypeDevice == srcAttr.type) {
90+
#else
8891
if (hipMemoryTypeDevice == srcAttr.memoryType) {
92+
#endif
8993
//We might want to set additional flags in a later iteration.
9094
//*flags |= MCA_ACCELERATOR_FLAGS_HOST_LDSTR;
9195
//*flags |= MCA_ACCELERATOR_FLAGS_HOST_ATOMICS;
9296
/* First access on a device pointer triggers ROCM support lazy initialization. */
9397
opal_accelerator_rocm_lazy_init();
9498
ret = 1;
99+
#if HIP_VERSION >= 50731921
100+
} else if (hipMemoryTypeUnified == srcAttr.type) {
101+
#else
95102
} else if (hipMemoryTypeUnified == srcAttr.memoryType) {
103+
#endif
96104
*flags |= MCA_ACCELERATOR_FLAGS_UNIFIED_MEMORY;
97105
//*flags |= MCA_ACCELERATOR_FLAGS_HOST_LDSTR;
98106
//*flags |= MCA_ACCELERATOR_FLAGS_HOST_ATOMICS;

0 commit comments

Comments
 (0)