diff --git a/.gitignore b/.gitignore index 76c6ab0d1..fa42cb660 100644 --- a/.gitignore +++ b/.gitignore @@ -165,3 +165,4 @@ runs *.pth *zarr/* +docs/sphinx/_toc.yml diff --git a/LICENSE b/LICENSE index 261eeb9e9..d4815c311 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright [2025] [AMD CORPORATION] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/docs/conf.py b/docs/conf.py index 19beb840a..cdaf3c154 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 on ROCm" author = "Advanced Micro Devices, Inc." copyright = "Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved." version = version_number @@ -68,4 +68,4 @@ html_title = f"{project} documentation" -external_projects_current_project = "MONAI for AMD ROCm" +external_projects_current_project = "MONAI on ROCm" diff --git a/docs/index.rst b/docs/index.rst index a7aef2426..4b9d90df8 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -4,17 +4,17 @@ .. _index: -********************************* -MONAI for AMD ROCm documentation -********************************* +***************************** +MONAI on 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 on 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. +MONAI on ROCm 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. -MONAI for AMD ROCm offers open, scalable, and high-performance solutions for life science and healthcare workloads. +MONAI on ROCm offers open, scalable, and high-performance solutions for life science and healthcare workloads. -The MONAI for AMD ROCm key features include: +The MONAI on ROCm key features include: - Flexible preprocessing for multidimensional medical imaging data @@ -26,7 +26,7 @@ The MONAI for AMD ROCm key features include: .. note:: - MONAI for AMD ROCm is in an early access state. Running production workloads is not recommended. + MONAI 1.5.0 on ROCm is in an early access state. Running production workloads is not recommended. The code is open and hosted at ``_. @@ -37,7 +37,7 @@ The documentation is structured as follows: .. grid-item-card:: Install - * :ref:`Installation ` + * :ref:`installing-monai` .. grid-item-card:: Reference @@ -46,10 +46,10 @@ The documentation is structured as follows: .. grid-item-card:: Related content - * `MONAI blog `_ + * `MONAI on ROCm blog `_ -To contribute to MONAI for AMD ROCm, refer to -`Contributing to MONAI for AMD ROCm `_. +To contribute to MONAI on ROCm, refer to +`Contributing to MONAI on ROCm `_. You can find licensing information on the :doc:`Licensing ` page. diff --git a/docs/install/installation.rst b/docs/install/installation.rst index dfc3bce82..a3ddafc85 100644 --- a/docs/install/installation.rst +++ b/docs/install/installation.rst @@ -4,15 +4,15 @@ .. _installing-monai: -============================== -Installing MONAI for AMD ROCm -============================== +============================ +MONAI on ROCm installation +============================ -This topic discusses how to install MONAI for AMD ROCm using the following options: +To install MONAI on ROCm, you have the following options: -- :ref:`From source (for developers) ` +- :ref:`Use package manager ` (recommended) -- :ref:`Using package manager (for users) ` +- :ref:`Build from source ` System requirements -------------------- @@ -23,22 +23,22 @@ System requirements - Python version: 3.10 -- AMD GPU: AMD Instinct MI300X GPUs +- AMD Instinct™ GPU: MI300X - `PyTorch for AMD ROCm `_ version: 2.8.0+rocm 6.4 -- NumPy 1.24 and later and earlier than 3.0 +- NumPy version: No earlier than 1.24 and no later than 2.4 -For more information about dependencies, see the ``requirements*.txt`` file. +For the complete list of dependencies, see the `requirements.txt `_ file. -.. _source-install: +.. _package-install: -Installing from source ------------------------ +Installing using package manager +---------------------------------- -To build MONAI for AMD ROCm from source, follow the steps given in this section. This installation method should be used by MONAI for AMD ROCm developers. If you're a MONAI for AMD ROCm user, see :ref:`package-install`. +To install MONAI on ROCm using package manager, follow the steps given in this section. -1. Set up the Docker image using the ROCm Docker image from Dockerhub. +1. Set up the Docker image using the ROCm Docker image from Docker Hub. .. code-block:: shell @@ -46,7 +46,7 @@ To build MONAI for AMD ROCm from source, follow the steps given in this section. 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 \ + -v $HOME:$HOME --name ${LOGNAME}_rocm \ rocm/dev-ubuntu-22.04:6.4.1 2. Install the required system dependencies. @@ -59,54 +59,48 @@ To build MONAI for AMD ROCm from source, follow the steps given in this section. 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 + 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 -3. Download the latest version of MONAI for AMD ROCm from the git repository: +3. Create and activate the development environment. .. code-block:: shell - git clone git@github.com:ROCm-LS/monai.git - cd monai + python3 -m venv monai_dev + source monai_dev/bin/activate + pip install --upgrade pip -4. Create and activate the development environment for building MONAI for AMD ROCm. +4. Install the required Python dependencies. .. code-block:: shell - python3 -m venv monai_dev - source monai_dev/bin/activate - pip install --upgrade pip - pip install torch torchvision torchaudio \ - --index-url https://download.pytorch.org/whl/rocm6.4 + 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 - -5. Build and install MONAI for AMD ROCm on a ROCm based AMD system using the development environment. - To build and install the development version of MONAI for AMD ROCm, use: +5. Install the optional dependencies depending on the workload. .. code-block:: shell - BUILD_MONAI=1 FORCE_CUDA=1 python3 setup.py develop + pip install ITK nibabel gdown tqdm lmdb psutil pandas einops mlflow \ + pynrrd clearml transformers pydicom fire ignite \ + parameterized tensorboard pytorch-ignite onnx - To build and package an optimized wheel for installation, use: +6. Install MONAI on ROCm from the AMD PyPI repository. .. code-block:: shell - BUILD_MONAI=1 FORCE_CUDA=1 python3 setup.py develop -O1 bdist_wheel - - The preceding command builds the package in non-debug mode and the wheel file is generated under the ``dist`` directory. + pip install amd-monai --extra-index-url=https://pypi.amd.com/simple -.. _package-install: +.. _source-install: -Installing using package manager ----------------------------------- +Building from source +----------------------- -To install MONAI for AMD ROCm using package manager, follow the steps given in this section. This installation method should be used by MONAI for AMD ROCm users. If you're a MONAI for AMD ROCm developer, see :ref:`source-install` +To build MONAI on ROCm from source, follow the steps given in this section. -1. Set up the Docker image using the ROCm Docker image from Dockerhub. +1. Set up the Docker image using the ROCm Docker image from Docker Hub. .. code-block:: shell @@ -114,7 +108,7 @@ To install MONAI for AMD ROCm using package manager, follow the steps given in t 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 \ + -v $HOME:$HOME --name ${LOGNAME}_monai \ rocm/dev-ubuntu-22.04:6.4.1 2. Install the required system dependencies. @@ -127,54 +121,60 @@ To install MONAI for AMD ROCm using package manager, follow the steps given in t 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 + 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 -3. Create and activate the development environment. +3. Download the latest version of MONAI on ROCm from the GitHub repository: .. code-block:: shell - python3 -m venv monai_dev - source monai_dev/bin/activate - pip install --upgrade pip + git clone git@github.com:ROCm-LS/monai.git + cd monai -4. Install the required Python dependencies. +4. Create and activate the development environment for building MONAI on ROCm. .. code-block:: shell - pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.4 + python3 -m venv monai_dev + source monai_dev/bin/activate + pip install --upgrade pip + 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 -5. Install the optional dependencies depending on the workload. +5. Build and install MONAI on ROCm on a ROCm-based AMD system using the development environment. + + To build and install the development version of MONAI on ROCm, use: .. 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 + BUILD_MONAI=1 FORCE_CUDA=1 python3 setup.py develop -6. Install MONAI optimized for AMD Instinct GPUs from the AMD PyPi repository. + To build and package an optimized wheel for installation, use: .. code-block:: shell - pip install amd-monai --extra-index-url=https://pypi.amd.com/simple + BUILD_MONAI=1 FORCE_CUDA=1 python3 setup.py develop -O1 bdist_wheel + + The preceding command builds the package in non-debug mode and the wheel file is generated under the ``dist`` directory. Verify installation -------------------- -Use these commands to verify the MONAI for AMD ROCm installation: +Use these commands to verify the MONAI on ROCm installation: -- Print MONAI for AMD ROCm version. +- Print the MONAI on ROCm version. .. code-block:: shell $ python -c "import monai; print(monai.__version__)" - 1.0.0 + 1.5.0 -- Print MONAI for AMD ROCm package info. +- Print the MONAI on ROCm package info. .. code-block:: shell diff --git a/docs/reference/model-zoo.rst b/docs/reference/model-zoo.rst index 04df6c7f1..4212a8fe2 100644 --- a/docs/reference/model-zoo.rst +++ b/docs/reference/model-zoo.rst @@ -8,24 +8,24 @@ MONAI Model Zoo **************** -The `MONAI Model Zoo `_ is a hub for researchers and data scientists to share, discover, and deploy the latest models from across the biomedical imaging community. By utilizing the standardized `MONAI Bundle format `_, you can easily `get started `_ on building workflows or integrating new models into your projects. +The `MONAI Model Zoo `_ is a hub for researchers and data scientists to share, discover, and deploy the latest models from across the biomedical imaging community. By using the standardized `MONAI Bundle format `_, you can easily start building workflows or integrating new models into your projects with the help of `tutorials `_. -MONAI for AMD ROCm provides seamless compatibility with the vast majority of models in the Model Zoo, helping both researchers and clinicians to accelerate state-of-the-art AI pipelines directly on AMD Instinct GPUs. Segmentation, detection, and classification models, including 2D and 3D workflows, run out of the box with minimal setup. +MONAI on ROCm provides seamless compatibility with the vast majority of models in the Model Zoo, helping both researchers and clinicians to accelerate state-of-the-art AI pipelines directly on AMD Instinct™ GPUs. Segmentation, detection, and classification models, including 2D and 3D workflows, run out of the box with minimal setup. EXAONEPath model (hf_exaonepath-crc-msi-predictor) on ROCm ----------------------------------------------------------- -EXAONEPath 2.0 is a foundation model designed to deliver highly efficient, directly supervised patch-level representation learning for whole-slide images (WSIs). Except for a few other model zoo entries exclusively designed for NVIDIA, advanced models for computational pathology, such as EXAONEPath 2.0, are now supported on AMD hardware. -Unlike typical patch-based self-supervised learning (SSL), EXAONE Path 2.0 leverages end-to-end slide-level supervision for powerful biomarker and molecular characteristic prediction with improved data efficiency. +EXAONEPath 2.0 is a foundation model designed to deliver highly efficient, directly supervised patch-level representation learning for whole-slide images (WSIs). Except for a few other model zoo entries designed exclusively for specific hardware, advanced computational pathology models, such as EXAONEPath 2.0, are now supported on AMD hardware. +Unlike typical patch-based self-supervised learning (SSL), EXAONEPath 2.0 leverages end-to-end slide-level supervision for powerful biomarker and molecular characteristic prediction with improved data efficiency. .. _set-exaonepath: Setting up EXAONEPath 2.0 on ROCm ----------------------------------- -To run EXAONEPath 2.0 on AMD platforms using MONAI for AMD ROCm, follow these steps: +To run EXAONEPath 2.0 on AMD platforms using MONAI on ROCm, follow these steps: -1. Install MONAI. For installation instructions, see :ref:`installing-monai`. +1. Install MONAI on ROCm. For installation instructions, see :ref:`installing-monai`. 2. Clone the EXAONEPath 2.0 repo: @@ -69,6 +69,6 @@ Key takeaways - Most MONAI Model Zoo models run out of the box on ROCm, fully utilizing the AMD Instinct GPUs. -- EXAONEPath 2.0, which was previously exclusive to NVIDIA, is now supported on AMD platforms using MONAI for AMD ROCm. The setup instructions are provided in :ref:`set-exaonepath`. +- EXAONEPath 2.0 is now supported on AMD platforms using MONAI on ROCm. The setup instructions are provided in :ref:`set-exaonepath`. -This reinforces MONAI for AMD ROCm as a truly open, high-performance AI platform, that removes vendor lock-in and unleashes broader access to foundational pathology models. +This reinforces MONAI on ROCm as a truly open, high-performance AI platform, that removes vendor lock-in and unleashes broader access to foundational pathology models. diff --git a/docs/reference/support-limitations.rst b/docs/reference/support-limitations.rst index 61c9df213..2fb41b0e5 100644 --- a/docs/reference/support-limitations.rst +++ b/docs/reference/support-limitations.rst @@ -8,13 +8,11 @@ Supported features and limitations =================================== -This topic discusses the features and limitations for MONAI 1.0.0 for AMD ROCm. +This topic discusses the supported features and limitations of MONAI 1.5.0 on ROCm as compared to the `MONAI upstream version 1.5.0 `_. Features --------- -Here are the MONAI for AMD ROCm features: - - Deep learning inference - Accelerated inference for MONAI models using AMD ROCm and `HIP `_ backends. @@ -31,7 +29,7 @@ Here are the MONAI for AMD ROCm features: - GPU acceleration - - Leverages AMD Instinct GPUs for high-throughput inference. + - Leverages AMD Instinct™ GPUs for high-throughput inference. - Delivers optimized memory and compute performance for large-scale medical datasets. @@ -59,14 +57,14 @@ Here are the MONAI for AMD ROCm features: - Provides access to a wide collection of pretrained models from the `MONAI Model Zoo `_, ready for fine-tuning on custom datasets. - - Facilitates utilizing the `MONAI Bundle format `_ to easily `get started `_ on building workflows or integrating new models into your projects. + - Facilitates using the `MONAI Bundle format `_ to easily start building workflows or integrating new models into your projects with the help of `tutorials `_. - For more information on Model Zoo, see :ref:`model-zoo`. +For more information about the MONAI Model Zoo, see :ref:`model-zoo`. Limitations ------------ -- MONAI for AMD ROCm only supports features from amd-cupy later than 13.5.1 and hipCIM 1.0.00 and later. +- MONAI on ROCm only supports features from amd-cupy 13.5.1 and later, and hipCIM 25.10.00 and later. - There is no support for: diff --git a/docs/sphinx/_toc.yml.in b/docs/sphinx/_toc.yml.in index 60d34e7bd..729f750a6 100644 --- a/docs/sphinx/_toc.yml.in +++ b/docs/sphinx/_toc.yml.in @@ -9,13 +9,17 @@ subtrees: - caption: Install entries: - file: install/installation - title: Installation - caption: Reference entries: - file: reference/support-limitations - file: reference/model-zoo +- caption: Related content + entries: + - url: https://rocm.blogs.amd.com/artificial-intelligence/monai-rocm/README.html + title: MONAI on ROCm blog + - caption: About entries: - file: license \ No newline at end of file