Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,4 @@ runs
*.pth

*zarr/*
docs/sphinx/_toc.yml
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -68,4 +68,4 @@

html_title = f"{project} documentation"

external_projects_current_project = "MONAI for AMD ROCm"
external_projects_current_project = "MONAI on ROCm"
24 changes: 12 additions & 12 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://monai.readthedocs.io/en/stable/whatsnew_1_5.html>`_. It is API-compatible with upstream MONAI without requiring any code changes.
The `Medical Open Network for AI (MONAI) <https://project-monai.github.io/>`_ 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 <https://monai.readthedocs.io/en/stable/whatsnew_1_5.html>`_. It is API-compatible with upstream MONAI without requiring any code changes.

MONAI for AMD ROCm, a ROCm-enabled version of `MONAI <https://project-monai.github.io/>`_, is built on top of `PyTorch for AMD ROCm <https://pytorch.org/blog/pytorch-for-amd-rocm-platform-now-available-as-python-package/>`_, 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 <https://pytorch.org/blog/pytorch-for-amd-rocm-platform-now-available-as-python-package/>`_, 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

Expand All @@ -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 `<https://github.com/ROCm-LS/monai>`_.

Expand All @@ -37,7 +37,7 @@ The documentation is structured as follows:

.. grid-item-card:: Install

* :ref:`Installation <installing-monai>`
* :ref:`installing-monai`

.. grid-item-card:: Reference

Expand All @@ -46,10 +46,10 @@ The documentation is structured as follows:

.. grid-item-card:: Related content

* `MONAI blog <https://rocm.blogs.amd.com/artificial-intelligence/monai-rocm/README.html>`_
* `MONAI on ROCm blog <https://rocm.blogs.amd.com/artificial-intelligence/monai-rocm/README.html>`_

To contribute to MONAI for AMD ROCm, refer to
`Contributing to MONAI for AMD ROCm <https://github.com/ROCm-LS/monai/blob/main/CONTRIBUTING.md>`_.
To contribute to MONAI on ROCm, refer to
`Contributing to MONAI on ROCm <https://github.com/ROCm-LS/monai/blob/main/CONTRIBUTING.md>`_.

You can find licensing information on the
:doc:`Licensing <license>` page.
126 changes: 63 additions & 63 deletions docs/install/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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) <source-install>`
- :ref:`Use package manager <package-install>` (recommended)

- :ref:`Using package manager (for users) <package-install>`
- :ref:`Build from source <source-install>`

System requirements
--------------------
Expand All @@ -23,30 +23,30 @@ System requirements

- Python version: 3.10

- AMD GPU: AMD Instinct MI300X GPUs
- AMD Instinct™ GPU: MI300X

- `PyTorch for AMD ROCm <https://pytorch.org/blog/pytorch-for-amd-rocm-platform-now-available-as-python-package/>`_ 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 <https://github.com/ROCm-LS/monai/blob/main/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

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 \
-v $HOME:$HOME --name ${LOGNAME}_rocm \
rocm/dev-ubuntu-22.04:6.4.1

2. Install the required system dependencies.
Expand All @@ -59,62 +59,56 @@ 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

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 \
-v $HOME:$HOME --name ${LOGNAME}_monai \
rocm/dev-ubuntu-22.04:6.4.1

2. Install the required system dependencies.
Expand All @@ -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

Expand Down
16 changes: 8 additions & 8 deletions docs/reference/model-zoo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@
MONAI Model Zoo
****************

The `MONAI Model Zoo <https://project-monai.github.io/model-zoo.html#/>`_ 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 <https://monai.readthedocs.io/en/latest/bundle_intro.html>`_, you can easily `get started <https://github.com/Project-MONAI/tutorials/tree/main/model_zoo>`_ on building workflows or integrating new models into your projects.
The `MONAI Model Zoo <https://project-monai.github.io/model-zoo.html#/>`_ 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 <https://monai.readthedocs.io/en/latest/bundle_intro.html>`_, you can easily start building workflows or integrating new models into your projects with the help of `tutorials <https://github.com/Project-MONAI/tutorials/tree/main/model_zoo>`_.

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:

Expand Down Expand Up @@ -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.
12 changes: 5 additions & 7 deletions docs/reference/support-limitations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/Project-MONAI/MONAI/releases/tag/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 <https://rocm.docs.amd.com/projects/HIP/en/latest/>`_ backends.
Expand All @@ -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.

Expand Down Expand Up @@ -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 <https://project-monai.github.io/model-zoo.html#/>`_, ready for fine-tuning on custom datasets.

- Facilitates utilizing the `MONAI Bundle format <https://monai.readthedocs.io/en/latest/bundle_intro.html>`_ to easily `get started <https://github.com/Project-MONAI/tutorials/tree/main/model_zoo>`_ on building workflows or integrating new models into your projects.
- Facilitates using the `MONAI Bundle format <https://monai.readthedocs.io/en/latest/bundle_intro.html>`_ to easily start building workflows or integrating new models into your projects with the help of `tutorials <https://github.com/Project-MONAI/tutorials/tree/main/model_zoo>`_.

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:

Expand Down
Loading
Loading