UMF currently ships native providers for CUDA and Level Zero, but not HIP/ROCm. Do you expect a HIP provider that closely mirrors the CUDA one:
• include/umf/providers/provider_hip.h: umfHIPMemoryProviderParamsCreate/Destroy, …SetContext/SetDevice/SetMemoryType/SetAllocFlags/SetName, and umfHIPMemoryProviderOps().
• src/provider/provider_hip.c: dynamically load libamdhip64 (via the existing utils_load_library helper, as the CUDA provider does for libcuda), and implement the ops vtable:
• alloc/free → hipMalloc / hipHostMalloc / hipMallocManaged / hipFree / hipHostFree, keyed on umf_usm_memory_type_t (device/host/shared).
• ext_get_ipc_handle_size / ext_get_ipc_handle / ext_put_ipc_handle / ext_open_ipc_handle / ext_close_ipc_handle →
hipIpcGetMemHandle / hipIpcOpenMemHandle / hipIpcCloseMemHandle, with the IPC data blob being a hipIpcMemHandle_t (analogous to cu_ipc_data_t = CUipcMemHandle).
• name/page-size/native-error/CTL-stats/allocation-properties to match CUDA where applicable.
• Build option UMF_BUILD_HIP_PROVIDER (default ON, like UMF_BUILD_CUDA_PROVIDER), plus #else no-op stubs returning UMF_RESULT_ERROR_NOT_SUPPORTED when disabled.
• Tests/examples mirroring the CUDA ones (test/providers/provider_cuda.cpp, test/providers/ipc_cuda_prov_{producer,consumer,common}.c, examples/cuda_shared_memory/).
UMF currently ships native providers for CUDA and Level Zero, but not HIP/ROCm. Do you expect a HIP provider that closely mirrors the CUDA one:
• include/umf/providers/provider_hip.h: umfHIPMemoryProviderParamsCreate/Destroy, …SetContext/SetDevice/SetMemoryType/SetAllocFlags/SetName, and umfHIPMemoryProviderOps().
• src/provider/provider_hip.c: dynamically load libamdhip64 (via the existing utils_load_library helper, as the CUDA provider does for libcuda), and implement the ops vtable:
• alloc/free → hipMalloc / hipHostMalloc / hipMallocManaged / hipFree / hipHostFree, keyed on umf_usm_memory_type_t (device/host/shared).
• ext_get_ipc_handle_size / ext_get_ipc_handle / ext_put_ipc_handle / ext_open_ipc_handle / ext_close_ipc_handle →
hipIpcGetMemHandle / hipIpcOpenMemHandle / hipIpcCloseMemHandle, with the IPC data blob being a hipIpcMemHandle_t (analogous to cu_ipc_data_t = CUipcMemHandle).
• name/page-size/native-error/CTL-stats/allocation-properties to match CUDA where applicable.
• Build option UMF_BUILD_HIP_PROVIDER (default ON, like UMF_BUILD_CUDA_PROVIDER), plus #else no-op stubs returning UMF_RESULT_ERROR_NOT_SUPPORTED when disabled.
• Tests/examples mirroring the CUDA ones (test/providers/provider_cuda.cpp, test/providers/ipc_cuda_prov_{producer,consumer,common}.c, examples/cuda_shared_memory/).