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
11 changes: 4 additions & 7 deletions opal/mca/accelerator/rocm/accelerator_rocm_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,20 +90,17 @@ static int mca_accelerator_rocm_check_addr (const void *addr, int *dev_id, uint6
#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();
*dev_id = srcAttr.device;
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;
opal_accelerator_rocm_lazy_init();
*dev_id = srcAttr.device;
ret = 1;
}
}
Expand Down Expand Up @@ -551,7 +548,7 @@ static int mca_accelerator_rocm_get_buffer_id(int dev_id, const void *addr, opal
*buf_id = 0;

#if HIP_VERSION >= 50120531
hipError_t result = hipPointerGetAttribute((unsigned long long *)&buf_id, HIP_POINTER_ATTRIBUTE_BUFFER_ID,
hipError_t result = hipPointerGetAttribute((unsigned long long *)buf_id, HIP_POINTER_ATTRIBUTE_BUFFER_ID,
(hipDeviceptr_t)addr);
if (hipSuccess != result) {
opal_output_verbose(10, opal_accelerator_base_framework.framework_output,
Expand Down