Skip to content

Getting GPU IPC to work with HIP/ROCm #7779

Open

Description

@mszpindler

I am trying to run MPICH/5.0.1 on LUMI (AMD MI250X) with HIP support enabled. I cannot get GPU IPC to work whereas GPU RDMA over cxi provider for ofi works. I see the same behaviour with both rocm/6.3.4 and rocm/7.0.1 versions. This is my configure setup:

./configure CC=gcc-14 CXX=g++-14 \ 
--disable-fortran --enable-fast=O3 --with-hip=/opt/rocm \
--with-libfabric=/opt/cray/libfabric/1.22.0 --with-xpmem=/usr \
--without-cuda --without-ucx \
--with-hip-sm=gfx90a --enable-hip-p2p=yes \
--with-slurm --with-pm=none

This is my execute script:

#!/bin/bash
#SBATCH --gpus-per-node=2
#SBATCH --ntasks-per-node=2
#SBATCH --nodes=1
#SBATCH -p dev-g
#SBATCH --exclusive
#SBATCH --network=single_node_vni  

export MPIR_PARAM_CH4_OFI_ENABLE_HMEM=1
export MPIR_CVAR_ENABLE_GPU=1
export MPIR_CVAR_CH4_IPC_GPU_P2P_THRESHOLD=1
export MPIR_CVAR_CH4_IPC_GPU_ENGINE_TYPE=auto

export MPIR_CVAR_DEBUG_SUMMARY=1

srun --cpu-bind=verbose --gres-flags=allow-task-sharing --cpus-per-task=7 --mpi=pmi2 \
./select_gpu \
./libexec/osu-micro-benchmarks/mpi/pt2pt/osu_latency -c -d rocm D D

Looking at the numbers from the osu_latency (single node) and AMD_LOG_LEVEL reports clearly device pointers are not recognized and host fallback happens.

Activity

  1. hzhou commented on Apr 21, 2026

    @hzhou
    Collaborator

    I'll take a look.

  2. raffenet commented on Apr 21, 2026

    @raffenet
    Collaborator
    export MPIR_PARAM_CH4_OFI_ENABLE_HMEM=1
    

    MPICH uses MPIR_CVAR_CH4_OFI_ENABLE_HMEM to control HMEM support. Can you confirm that the correct environment variable is in use?

  3. mszpindler commented on Apr 22, 2026

    @mszpindler
    Author

    MPICH uses MPIR_CVAR_CH4_OFI_ENABLE_HMEM to control HMEM support. Can you confirm that the correct environment variable is in use?

    That was indeed a typo but with proper variable name GPU IPC still seems inactive.

  4. mszpindler commented on Apr 22, 2026

    @mszpindler
    Author
    ==== GPU Init (HIP) ====
    device_count: 1
    =========================
    Required minimum FI_VERSION: 10016, current version: 10016
    ==== Capability set configuration ====
    libfabric provider: sm2 - sm2
    MPIDI_OFI_ENABLE_DATA: 1
    MPIDI_OFI_ENABLE_AV_TABLE: 1
    MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS: 0
    MPIDI_OFI_ENABLE_SHARED_CONTEXTS: 0
    MPIDI_OFI_ENABLE_MR_VIRT_ADDRESS: 0
    MPIDI_OFI_ENABLE_MR_ALLOCATED: 0
    MPIDI_OFI_ENABLE_MR_REGISTER_NULL: 1
    MPIDI_OFI_ENABLE_MR_PROV_KEY: 0
    MPIDI_OFI_ENABLE_TAGGED: 1
    MPIDI_OFI_ENABLE_AM: 1
    MPIDI_OFI_ENABLE_RMA: 0
    MPIDI_OFI_ENABLE_ATOMICS: 0
    MPIDI_OFI_FETCH_ATOMIC_IOVECS: 1
    MPIDI_OFI_ENABLE_DATA_AUTO_PROGRESS: 0
    MPIDI_OFI_ENABLE_CONTROL_AUTO_PROGRESS: 0
    MPIDI_OFI_ENABLE_PT2PT_NOPACK: 1
    MPIDI_OFI_ENABLE_TRIGGERED: 0
    MPIDI_OFI_ENABLE_HMEM: 1
    MPIDI_OFI_NUM_AM_BUFFERS: 8
    MPIDI_OFI_NUM_OPTIMIZED_MEMORY_REGIONS: 0
    MPIDI_OFI_CONTEXT_BITS: 20
    MPIDI_OFI_SOURCE_BITS: 0
    MPIDI_OFI_TAG_BITS: 31
    MPIDI_OFI_VNI_USE_DOMAIN: 1
    MAXIMUM SUPPORTED RANKS: 4294967296
    MAXIMUM TAG: 2147483648
    ==== Provider global thresholds ====
    max_buffered_send: 0
    max_buffered_write: 0
    max_msg_size: 9223372036854775807
    max_order_raw: -1
    max_order_war: -1
    max_order_waw: -1
    tx_iov_limit: 4
    rx_iov_limit: 4
    rma_iov_limit: 4
    max_mr_key_size: 8
    ==== Various sizes and limits ====
    MPIDI_OFI_AM_MSG_HEADER_SIZE: 24
    MPIDI_OFI_MAX_AM_HDR_SIZE: 255
    sizeof(MPIDI_OFI_am_request_header_t): 416
    sizeof(MPIDI_OFI_per_vci_t): 52480
    MPIDI_OFI_AM_HDR_POOL_CELL_SIZE: 1024
    MPIDI_OFI_DEFAULT_SHORT_SEND_SIZE: 16384
    ======================================
    ======================================
    ==== Various sizes and limits ====
    sizeof(MPIDI_per_vci_t): 128
    ==== collective selection ====
    MPIR_CVAR_DEVICE_COLLECTIVES: percoll
    MPIR: MPII_coll_generic_json
    MPID: MPIDI_coll_generic_json
    MPID/shm: MPIDI_POSIX_coll_generic_json
    MPID (GPU): MPIDI_coll_generic_json
    MPID/shm (GPU): MPIDI_POSIX_coll_generic_json
    ==== OFI dynamic settings ====
    num_vcis: 1
    num_nics: 1
    ======================================
    MPICH 5.0.1 -  - Fri Apr 10 09:45:31 AM CDT 2026
    error checking    : enabled
    QMPI              : disabled
    debugger support  : disabled
    thread level      : MPI_THREAD_SINGLE
    thread CS         : per-vci
    threadcomm        : enabled
    ==== data structure summary ====
    sizeof(MPIR_Comm): 1832
    sizeof(MPIR_Request): 592
    sizeof(MPIR_Datatype): 280
    ================================
    
    # OSU MPI-ROCM Latency Test v7.5.2
    # Datatype: MPI_CHAR.
    # Size       Avg Latency(us)        Validation
    1                      16.32              Pass
    2                      18.50              Pass
    4                      16.81              Pass
    8                      16.63              Pass
    16                     16.60              Pass
    32                     16.57              Pass
    64                     19.02              Pass
    128                    16.81              Pass
    256                    16.93              Pass
    512                    16.77              Pass
    1024                   16.83              Pass
    2048                   16.84              Pass
    4096                   17.04              Pass
    8192                   17.24              Pass
    16384                  17.45              Pass
    32768                  16.03              Pass
    65536                  16.38              Pass
    131072                 17.49              Pass
    262144                 20.12              Pass
    524288                 26.21              Pass
    1048576                35.27              Pass
    
  5. mszpindler commented on Apr 22, 2026

    @mszpindler
    Author

    No difference with shm libfabric provider.

  6. mszpindler commented on Apr 30, 2026

    @mszpindler
    Author

    Looking at the sm provider output I can see:

    libfabric:53912:1777557649::sm2:core:ofi_check_info():1121<info> Supported: FI_MSG, FI_TAGGED, FI_ATOMIC, FI_READ, FI_WRITE, FI_RECV, FI_SEND, FI_REMOTE_READ, FI_REMOTE_WRITE, FI_MULTI_RECV, FI_LOCAL_COMM, FI_RMA_EVENT, FI_SOURCE, FI_DIRECTED_RECV
    libfabric:53912:1777557649::sm2:core:ofi_check_info():1121<info> Requested: FI_MSG, FI_TAGGED, FI_READ, FI_WRITE, FI_RECV, FI_SEND, FI_REMOTE_READ, FI_REMOTE_WRITE, FI_MULTI_RECV, FI_LOCAL_COMM, FI_RMA_EVENT, FI_SOURCE, FI_DIRECTED_RECV, FI_HMEM
    

    Could be a missing FI_HMEM on supported side a reason?

  7. mszpindler commented on May 8, 2026

    @mszpindler
    Author

    I am trying to do the same with NVIDIA+Slingshot system and at least numbers are very similar (GPU RDMA latency is much lower comparing to GPU IPC on the same node).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions