Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions opal/mca/accelerator/rocm/accelerator_rocm_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,22 @@ static int mca_accelerator_rocm_check_addr (const void *addr, int *dev_id, uint6
*flags = 0;
err = hipPointerGetAttributes(&srcAttr, addr);
if (hipSuccess == err) {
#if HIP_VERSION >= 50731921
if (hipMemoryTypeDevice == srcAttr.type) {
#else
if (hipMemoryTypeDevice == srcAttr.memoryType) {
#endif
//We might want to set additional flags in a later iteration.
//*flags |= MCA_ACCELERATOR_FLAGS_HOST_LDSTR;
//*flags |= MCA_ACCELERATOR_FLAGS_HOST_ATOMICS;
/* First access on a device pointer triggers ROCM support lazy initialization. */
opal_accelerator_rocm_lazy_init();
ret = 1;
#if HIP_VERSION >= 50731921
} else if (hipMemoryTypeUnified == srcAttr.type) {
#else
} else if (hipMemoryTypeUnified == srcAttr.memoryType) {
#endif
*flags |= MCA_ACCELERATOR_FLAGS_UNIFIED_MEMORY;
//*flags |= MCA_ACCELERATOR_FLAGS_HOST_LDSTR;
//*flags |= MCA_ACCELERATOR_FLAGS_HOST_ATOMICS;
Expand Down