From dac71aebd37d802ba235a2f71e8c3d972604dbdb Mon Sep 17 00:00:00 2001 From: srawat <120587655+SwRaw@users.noreply.github.com> Date: Fri, 13 Mar 2026 22:47:37 +0530 Subject: [PATCH] 1.5.0 doc update --- docs/conf.py | 4 +- docs/index.rst | 14 ++- docs/install/installation.rst | 164 ++++++++++++++++++------- docs/reference/support-limitations.rst | 14 +-- 4 files changed, 130 insertions(+), 66 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 19beb840a..d3b6eaee7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -35,10 +35,10 @@ all_article_info_author = "" # Dynamically extract component version -version_number = "1.0.0" +version_number = "1.5.0" # for PDF output on Read the Docs -project = "MONAI 1.0.0 for AMD ROCm" +project = "MONAI 1.5.0 for AMD ROCm" author = "Advanced Micro Devices, Inc." copyright = "Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved." version = version_number diff --git a/docs/index.rst b/docs/index.rst index a7aef2426..bc1ec92c9 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -8,7 +8,7 @@ MONAI for AMD ROCm documentation ********************************* -The Medical Open Network for AI (MONAI) is a domain-optimized, open-source framework based on PyTorch, explicitly designed for deep learning in healthcare imaging. MONAI 1.0.0 for AMD ROCm is a HIP port of `MONAI upstream version 1.5.0 `_. It is API-compatible with upstream MONAI without requiring any code changes. +The Medical Open Network for AI (MONAI) is a domain-optimized, open-source framework based on PyTorch, explicitly designed for deep learning in healthcare imaging. MONAI 1.5.0 for AMD ROCm is a HIP port of `MONAI upstream version 1.5.0 `_. It is API-compatible with upstream MONAI without requiring any code changes. MONAI for AMD ROCm, a ROCm-enabled version of `MONAI `_, is built on top of `PyTorch for AMD ROCm `_, helping healthcare and life science innovators to leverage GPU acceleration with AMD Instinct GPUs for high-performance inference and training of medical AI applications. @@ -16,17 +16,19 @@ MONAI for AMD ROCm offers open, scalable, and high-performance solutions for lif The MONAI for AMD ROCm key features include: -- Flexible preprocessing for multidimensional medical imaging data +- Flexible preprocessing for multidimensional medical imaging data. -- Compositional and portable APIs for smooth integration into existing workflows +- Compositional and portable APIs for smooth integration into existing workflows. -- Domain-specific implementations for networks, losses, evaluation metrics, and more +- Domain-specific implementations for networks, losses, evaluation metrics, and more. -- Customizable design according to user expertise +- Customizable design according to user expertise. + +- Multi-GPU multinode data parallelism support. .. note:: - MONAI for AMD ROCm is in an early access state. Running production workloads is not recommended. + MONAI 1.5.0 for AMD ROCm is in an early access state. Running production workloads is not recommended. The code is open and hosted at ``_. diff --git a/docs/install/installation.rst b/docs/install/installation.rst index dfc3bce82..20222963e 100644 --- a/docs/install/installation.rst +++ b/docs/install/installation.rst @@ -17,17 +17,17 @@ This topic discusses how to install MONAI for AMD ROCm using the following optio System requirements -------------------- -- Ubuntu version: 22.04 +- Ubuntu version: 24.04 -- ROCm version: 6.4.3 +- ROCm version: 7.0.2 -- Python version: 3.10 +- Python version: 3.12 -- AMD GPU: AMD Instinct MI300X GPUs +- AMD Instinct GPU: MI300X, MI325X, MI355X -- `PyTorch for AMD ROCm `_ version: 2.8.0+rocm 6.4 +- `PyTorch for AMD ROCm `_ version: 2.8.0 and later -- NumPy 1.24 and later and earlier than 3.0 +- NumPy version 1.24 and later and earlier than 2.4 For more information about dependencies, see the ``requirements*.txt`` file. @@ -42,27 +42,55 @@ To build MONAI for AMD ROCm from source, follow the steps given in this section. .. code-block:: shell - docker pull rocm/dev-ubuntu-22.04 docker run --cap-add=SYS_PTRACE --ipc=host --privileged=true \ - --shm-size=512GB --network=host --device=/dev/kfd \ - --device=/dev/dri --group-add video -it \ - -v $HOME:$HOME --name ${LOGNAME}_monai \ - rocm/dev-ubuntu-22.04:6.4.1 + --shm-size=512GB --network=host --device=/dev/kfd \ + --device=/dev/dri --group-add video -it \ + -v $HOME:$HOME --name ${LOGNAME}_monai \ + rocm/dev-ubuntu-24.04:7.0.2-complete 2. Install the required system dependencies. .. code-block:: shell - sudo apt update - sudo apt install -y software-properties-common lsb-release gnupg - sudo apt-key adv --fetch-keys https://apt.kitware.com/keys/kitware-archive-latest.asc - sudo add-apt-repository -y "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" - sudo apt update - sudo apt install -y git wget gcc g++ ninja-build git-lfs \ - yasm libopenslide-dev python3.10-venv \ - cmake rocjpeg rocjpeg-dev rocthrust-dev \ - hipcub hipblas hipblas-dev hipfft hipsparse \ - hiprand rocsolver rocrand-dev rocm-hip-sdk + apt-get update && \ + apt-get install -y software-properties-common lsb-release gnupg wget && \ + apt-key adv --fetch-keys \ + https://apt.kitware.com/keys/kitware-archive-latest.asc && \ + add-apt-repository -y "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" && \ + apt-get update && \ + apt-get install -y --no-install-recommends \ + build-essential git gcc g++ cmake \ + ninja-build yasm python3-venv \ + openssh-client \ + libopenslide-dev libwebp-dev \ + libzstd-dev && \ + rm -rf /var/lib/apt/lists/* + + ROCM_VERSION=$(cat /opt/rocm/.info/version) && \ + UBUNTU_CODENAME=$(lsb_release -cs) && \ + echo "Detected ROCm version: ${ROCM_VERSION}, Ubuntu codename: ${UBUNTU_CODENAME}" && \ + MAJOR=$(echo ${ROCM_VERSION} | cut -d. -f1) && \ + MINOR=$(echo ${ROCM_VERSION} | cut -d. -f2) && \ + PATCH=$(echo ${ROCM_VERSION} | cut -d. -f3) && \ + PATCH=${PATCH:-0} && \ + VERNUM=$((MAJOR * 10000 + MINOR * 100 + PATCH)) && \ + if [ "${PATCH}" = "0" ]; then SHORT_VERSION="${MAJOR}.${MINOR}"; else SHORT_VERSION="${MAJOR}.${MINOR}.${PATCH}"; fi + + if ! dpkg -s amdgpu-install >/dev/null 2>&1; then \ + rm -f /etc/apt/sources.list.d/amdgpu.list /etc/apt/sources.list.d/rocm.list && \ + AMDGPU_URL="https://repo.radeon.com/amdgpu-install/${SHORT_VERSION}/ubuntu/${UBUNTU_CODENAME}/amdgpu-install_${SHORT_VERSION}.${VERNUM}-1_all.deb" && \ + echo "Downloading: ${AMDGPU_URL}" && \ + wget "${AMDGPU_URL}" -O amdgpu-install.deb && \ + apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y ./amdgpu-install.deb && \ + rm amdgpu-install.deb; \ + else \ + echo "amdgpu-install already present, skipping install"; \ + fi && \ + apt-get update && \ + apt-get install -y --no-install-recommends amdgpu-lib && \ + apt-get install -y --no-install-recommends rocjpeg rocjpeg-dev && \ + rm -rf /var/lib/apt/lists/* 3. Download the latest version of MONAI for AMD ROCm from the git repository: @@ -78,10 +106,17 @@ To build MONAI for AMD ROCm from source, follow the steps given in this section. python3 -m venv monai_dev source monai_dev/bin/activate pip install --upgrade pip + export HIP_PATH=/opt/rocm + export PATH=$HIP_PATH/bin:$PATH + export ROCM_PATH=/opt/rocm + export LD_LIBRARY_PATH=$HIP_PATH/lib:$LD_LIBRARY_PATH + export ROCM_HOME=/opt/rocm + export AMDGPU_TARGETS=gfx942 + pip install --upgrade pip wheel setuptools pip install torch torchvision torchaudio \ - --index-url https://download.pytorch.org/whl/rocm6.4 - pip install amd-hipcim --extra-index-url=https://pypi.amd.com/simple - pip install -r requirements-dev.txt -c amd-constraints.txt + --index-url https://download.pytorch.org/whl/rocm7.1 + pip install amd_hipcim --extra-index-url=https://pypi.amd.com/rocm-7.0.2/simple + pip install -r requirements-dev.txt -c amd-constraints.txt --build-constraint amd-constraints.txt 5. Build and install MONAI for AMD ROCm on a ROCm based AMD system using the development environment. @@ -112,25 +147,54 @@ To install MONAI for AMD ROCm using package manager, follow the steps given in t docker pull rocm/dev-ubuntu-22.04 docker run --cap-add=SYS_PTRACE --ipc=host --privileged=true \ - --shm-size=512GB --network=host --device=/dev/kfd \ - --device=/dev/dri --group-add video -it \ - -v $HOME:$HOME --name ${LOGNAME}_rocm \ - rocm/dev-ubuntu-22.04:6.4.1 + --shm-size=512GB --network=host --device=/dev/kfd \ + --device=/dev/dri --group-add video -it \ + -v $HOME:$HOME --name ${LOGNAME}_rocm \ + rocm/dev-ubuntu-24.04:7.0.2-complete 2. Install the required system dependencies. .. code-block:: shell - sudo apt update - sudo apt install -y software-properties-common lsb-release gnupg - sudo apt-key adv --fetch-keys https://apt.kitware.com/keys/kitware-archive-latest.asc - sudo add-apt-repository -y "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" - sudo apt update - sudo apt install -y git wget gcc g++ ninja-build git-lfs \ - yasm libopenslide-dev python3.10-venv \ - cmake rocjpeg rocjpeg-dev rocthrust-dev \ - hipcub hipblas hipblas-dev hipfft hipsparse \ - hiprand rocsolver rocrand-dev rocm-hip-sdk + apt-get update && \ + apt-get install -y software-properties-common lsb-release gnupg wget && \ + apt-key adv --fetch-keys \ + https://apt.kitware.com/keys/kitware-archive-latest.asc && \ + add-apt-repository -y "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" && \ + apt-get update && \ + apt-get install -y --no-install-recommends \ + build-essential git gcc g++ cmake \ + ninja-build yasm python3-venv \ + openssh-client \ + libopenslide-dev libwebp-dev \ + libzstd-dev && \ + rm -rf /var/lib/apt/lists/* + + ROCM_VERSION=$(cat /opt/rocm/.info/version) && \ + UBUNTU_CODENAME=$(lsb_release -cs) && \ + echo "Detected ROCm version: ${ROCM_VERSION}, Ubuntu codename: ${UBUNTU_CODENAME}" && \ + MAJOR=$(echo ${ROCM_VERSION} | cut -d. -f1) && \ + MINOR=$(echo ${ROCM_VERSION} | cut -d. -f2) && \ + PATCH=$(echo ${ROCM_VERSION} | cut -d. -f3) && \ + PATCH=${PATCH:-0} && \ + VERNUM=$((MAJOR * 10000 + MINOR * 100 + PATCH)) && \ + if [ "${PATCH}" = "0" ]; then SHORT_VERSION="${MAJOR}.${MINOR}"; else SHORT_VERSION="${MAJOR}.${MINOR}.${PATCH}"; fi + + if ! dpkg -s amdgpu-install >/dev/null 2>&1; then \ + rm -f /etc/apt/sources.list.d/amdgpu.list /etc/apt/sources.list.d/rocm.list && \ + AMDGPU_URL="https://repo.radeon.com/amdgpu-install/${SHORT_VERSION}/ubuntu/${UBUNTU_CODENAME}/amdgpu-install_${SHORT_VERSION}.${VERNUM}-1_all.deb" && \ + echo "Downloading: ${AMDGPU_URL}" && \ + wget "${AMDGPU_URL}" -O amdgpu-install.deb && \ + apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y ./amdgpu-install.deb && \ + rm amdgpu-install.deb; \ + else \ + echo "amdgpu-install already present, skipping install"; \ + fi && \ + apt-get update && \ + apt-get install -y --no-install-recommends amdgpu-lib && \ + apt-get install -y --no-install-recommends rocjpeg rocjpeg-dev && \ + rm -rf /var/lib/apt/lists/* 3. Create and activate the development environment. @@ -139,27 +203,35 @@ To install MONAI for AMD ROCm using package manager, follow the steps given in t python3 -m venv monai_dev source monai_dev/bin/activate pip install --upgrade pip + export HIP_PATH=/opt/rocm + export PATH=$HIP_PATH/bin:$PATH + export ROCM_PATH=/opt/rocm + export LD_LIBRARY_PATH=$HIP_PATH/lib:$LD_LIBRARY_PATH + export ROCM_HOME=/opt/rocm + export AMDGPU_TARGETS=gfx942 + pip install --upgrade pip wheel setuptools 4. Install the required Python dependencies. .. code-block:: shell - pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.4 - pip install amd-hipcim --extra-index-url=https://pypi.amd.com/simple + pip install torch torchvision torchaudio \ + --index-url https://download.pytorch.org/whl/rocm7.1 + pip install amd_hipcim --extra-index-url=https://pypi.amd.com/rocm-7.0.2/simple/ 5. Install the optional dependencies depending on the workload. .. code-block:: shell pip install ITK nibabel gdown tqdm lmdb psutil pandas einops mlflow \ - pynrrd clearml transformers pydicom fire ignite \ - parameterized tensorboard pytorch-ignite onnx + pynrrd clearml transformers pydicom fire ignite \ + parameterized tensorboard pytorch-ignite onnx 6. Install MONAI optimized for AMD Instinct GPUs from the AMD PyPi repository. .. code-block:: shell - pip install amd-monai --extra-index-url=https://pypi.amd.com/simple + pip install amd_monai --extra-index-url=https://pypi.amd.com/rocm-7.0.2/simple Verify installation -------------------- @@ -172,7 +244,7 @@ Use these commands to verify the MONAI for AMD ROCm installation: $ python -c "import monai; print(monai.__version__)" - 1.0.0 + 1.5.0 - Print MONAI for AMD ROCm package info. @@ -181,7 +253,7 @@ Use these commands to verify the MONAI for AMD ROCm installation: $ pip show -v amd-monai Name: amd-monai - Version: 1.0.0 + Version: 1.5.0 Summary: AI Toolkit for Healthcare Imaging Home-page: https://rocm.docs.amd.com/projects/monai/en/latest/ Author: AMD Corporation @@ -200,7 +272,7 @@ Use these commands to verify the MONAI for AMD ROCm installation: Intended Audience :: Healthcare Industry Programming Language :: C++ Programming Language :: Python :: 3 - Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.12 Topic :: Scientific/Engineering Topic :: Scientific/Engineering :: Artificial Intelligence Topic :: Scientific/Engineering :: Medical Science Apps. diff --git a/docs/reference/support-limitations.rst b/docs/reference/support-limitations.rst index 61c9df213..516741452 100644 --- a/docs/reference/support-limitations.rst +++ b/docs/reference/support-limitations.rst @@ -8,7 +8,7 @@ Supported features and limitations =================================== -This topic discusses the features and limitations for MONAI 1.0.0 for AMD ROCm. +This topic discusses the features and limitations for MONAI 1.5.0 for AMD ROCm. Features --------- @@ -66,20 +66,10 @@ Here are the MONAI for AMD ROCm features: Limitations ------------ -- MONAI for AMD ROCm only supports features from amd-cupy later than 13.5.1 and hipCIM 1.0.00 and later. +- MONAI for AMD ROCm only supports features from amd-cupy later than 13.5.1 and hipCIM 25.10.00 and later. - There is no support for: - GPU direct storage (KvikIO, cuFile). - rocTX tracing. - -- No support for Python earlier than 3.10 and PyTorch earlier than 1.13.1. - -- Deprecated transforms such as AddChannel, AsChannelFirst, and others. - -- There might not be first-class support for some advanced or rare image file formats and non-NIfTI/DICOM derivatives. - -- No support for legacy neural network architectures such as deprecated versions of DynUnet and old TorchVision wrappers. - -- Automatic installation of optional dependencies is not available. Some features require explicit installation.