Skip to content

Commit 2a52280

Browse files
authored
Merge pull request #11682 from edgargabriel/topic/rocm-syncmemops-update
accelerator/rocm: add SYNC_MEMOPS support
2 parents 5ea8638 + fec8e6a commit 2a52280

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

opal/mca/accelerator/rocm/accelerator_rocm_module.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,5 +506,15 @@ static int mca_accelerator_rocm_get_buffer_id(int dev_id, const void *addr, opal
506506
}
507507
#endif
508508

509+
#if HIP_VERSION >= 50530201
510+
int enable = 1;
511+
hipError_t err = hipPointerSetAttribute(&enable, HIP_POINTER_ATTRIBUTE_SYNC_MEMOPS,
512+
(hipDeviceptr_t)addr);
513+
if (hipSuccess != err) {
514+
opal_output_verbose(10, opal_accelerator_base_framework.framework_output,
515+
"error in hipPointerSetAttribute, could not set SYNC_MEMOPS");
516+
return OPAL_ERROR;
517+
}
518+
#endif
509519
return OPAL_SUCCESS;
510520
}

0 commit comments

Comments
 (0)