Skip to content

Add [rocm] extra, ROCm install docs, and HIP version diagnostics - #4

Draft
nilapate wants to merge 1 commit into
devfrom
rocm-extra-and-docs
Draft

nilapate wants to merge 1 commit into
devfrom
rocm-extra-and-docs

Conversation

@nilapate

@nilapate nilapate commented Oct 7, 2026 •

Copy link
Copy Markdown

Adds support for the AMD ROCm imaging stack as a dedicated pip extra:

  • pyproject.toml: new rocm = ["amd-hipcim>=26.6.0; platform_system == 'Linux'"] extra. amd-hipcim ships the cucim Python namespace so all existing optional_import("cucim…") call sites work on ROCm without code changes. Omitted from all (requires AMD's package index, not PyPI). The >=26.6.0 floor skips the public PyPI placeholder stub (0.0.2).

  • docs/source/installation.md: new rocm section documenting the extra, the AMD index requirement, the cp312/x86_64-only wheel availability, and the [all] incompatibility on ROCm. Fixes the developer-setup recipe (print_dependencies.py all testing instead of \*, which now also includes the index-restricted rocm extra).

  • monai/config/deviceconfig.py, monai/config/check_env.py: report HIP version instead of CUDA version: None on ROCm PyTorch builds, where torch.version.cuda is None and the toolkit version is torch.version.hip. No existing consumer of the get_gpu_info() dict keys is affected.

  • Dockerfile.rocm: align amd-hipcim>=26.6.0 floor with pyproject.toml.

  • tests/config/test_print_info.py: two mock-based tests covering the HIP/CUDA version branch in get_gpu_info() under both ROCm and CUDA builds.

Adds support for the AMD ROCm imaging stack as a dedicated pip extra:

- **pyproject.toml**: new `rocm = ["amd-hipcim>=26.6.0; platform_system == 'Linux'"]`
  extra. `amd-hipcim` ships the `cucim` Python namespace so all existing
  `optional_import("cucim…")` call sites work on ROCm without code changes.
  Omitted from `all` (requires AMD's package index, not PyPI). The `>=26.6.0`
  floor skips the public PyPI placeholder stub (0.0.2).

- **docs/source/installation.md**: new `rocm` section documenting the extra,
  the AMD index requirement, the cp312/x86_64-only wheel availability, and
  the `[all]` incompatibility on ROCm. Fixes the developer-setup recipe
  (`print_dependencies.py all testing` instead of `\*`, which now also
  includes the index-restricted `rocm` extra).

- **monai/config/deviceconfig.py**, **monai/config/check_env.py**: report
  `HIP version` instead of `CUDA version: None` on ROCm PyTorch builds, where
  `torch.version.cuda` is `None` and the toolkit version is `torch.version.hip`.
  No existing consumer of the `get_gpu_info()` dict keys is affected.

- **Dockerfile.rocm**: align `amd-hipcim>=26.6.0` floor with pyproject.toml.

- **tests/config/test_print_info.py**: two mock-based tests covering the
  HIP/CUDA version branch in `get_gpu_info()` under both ROCm and CUDA builds.

Signed-off-by: Patel, Nilaykumar K <NilaykumarKantibhai.Patel@amd.com>
@prateek9623 prateek9623 changed the title Add [rocm] extra, ROCm install docs, and HIP version diagnostics ROCm support: dependency variants, install docs, and HIP version diagnostics Oct 7, 2026
@prateek9623 prateek9623 changed the title ROCm support: dependency variants, install docs, and HIP version diagnostics Add [rocm] extra, ROCm install docs, and HIP version diagnostics Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant