pmodels / mpich

Official MPICH Repository
http://www.mpich.org
Other
520 stars 276 forks source link

gpu/hip: Deprecated enum hipMemoryType memoryType #6860

Open gigaio-staylor opened 6 months ago

gigaio-staylor commented 6 months ago

Looks like MPICH code needs to change from using memoryType to type.

Per ROCm 6.0 Changelog: Deprecated enum hipMemoryType memoryType; is removed from HIP struct hipPointerAttribute_t union.

Affected files appear to be: ./modules/yaksa/src/backend/hip/pup/yaksuri_hipi_get_ptr_attr.c ./src/pmi/mpl/src/gpu/mpl_gpu_hip.c ./src/mpi/romio/mpl/src/gpu/mpl_gpu_hip.c ./src/mpl/src/gpu/mpl_gpu_hip.c ./src/pm/hydra/modules/pmi/mpl/src/gpu/mpl_gpu_hip.c ./src/pm/hydra/modules/mpl/src/gpu/mpl_gpu_hip.c

arturo-ges commented 1 month ago

I have found this issue when compiling mpich 4.2.1 with ROCm 6.1.0. The suggested change has solved the compilation error.

BKitor commented 1 week ago

On further testing, it looks like the enum hipMemoryType values, and errors returned by hipPointerGetAttributes changed. hipPointerGetAttributes return success when an 'unregistered' buffer is passed in, and there's a new hipMemoryTypeUnregistered enum value.

ROCM-6 hipMemoryType: https://github.com/ROCm/HIP/blob/900a5e9828f55ae004de99314c5f992e6a0ebc9b/include/hip/hip_runtime_api.h#L245

Also, this breaks the logic of MPI_gpu_query_pointer_attr so it will need to be rewritten...