Skip to content

Dockerfile - Add ROCm 10.1 dockerfile with MI455X (gfx1250) support - #867

Draft
Nguyen Vuong (normanvuong) wants to merge 8 commits into
microsoft:mainfrom
normanvuong:nguyenvuong/rocm_10.0
Draft

Nguyen Vuong (normanvuong) wants to merge 8 commits into
microsoft:mainfrom
normanvuong:nguyenvuong/rocm_10.0

Conversation

@normanvuong

@normanvuong Nguyen Vuong (normanvuong) commented Oct 9, 2026 •

Copy link
Copy Markdown

Description
Adds an experimental ROCm 10.1 SuperBench image targeting MI300X (gfx942), MI355X (gfx950) and MI455X (gfx1250). The image work is ported from arsdragonfly/superbenchmark@rocm10. This PR includes only the ROCm 10 image, not the ROCm 7.0/7.2 work from #854/#855.

The image was first written for ROCm 10.0. It now uses ROCm 10.1, which avoids the ResNet and BERT crashes seen on the 10.0 base.

The prebuilt RCCL in ROCm 10.1 doesn't include gfx1250 fixes merged to rocm-systems develop after therock-10.1 branched. The main one is ROCm/rocm-systems#12051: every gfx1250 GPU appears as a partition, so RCCL computed GPU→NIC paths as PHB and turned GPUDirect RDMA off. MI455X testers had to build RCCL from that PR to run all-reduce, so this image builds RCCL and RCCL-tests from source at that merge commit.

Per review, the benchmark code changes are in a separate PR (#868), and SKU configs are kept in the internal repo.

Major Revision

  • Add dockerfile/rocm10.1.x.dockerfile. It is based on the digest-pinned rocm/pytorch:rocm10.1.0_ubuntu26.04_py3.14_pytorch_release_2.13.0 and includes:
    • the rocm[devel,libraries,device-all]==10.1.0 wheel SDK, with pip constraints that keep the base's PyTorch, Triton and SDK versions
    • DOCA 3.4.0 userspace / Open MPI 5.0.10 at /usr/local/mpi
    • RVS/TransferBench from AMD's signed Ubuntu 26.04 APT repos (/opt/rocm/extras-10)
    • prebuilt rocblas-bench/hipblaslt-bench and their kernel packs from TheRock's SHA-256-pinned test archive
    • local benchmark kernels built for gfx942 gfx950 gfx1250 (AMDGPU_TARGETS)
  • Build RCCL and RCCL-tests from ROCm/rocm-systems@2a0c58e (the merge commit of #12051) into /opt/rccl. /opt/rccl/lib goes ahead of the SDK library on LD_LIBRARY_PATH, and the build fails if all_reduce_perf doesn't resolve to it. --build-arg RCCL_SOURCE_COMMIT= keeps AMD's prebuilt SDK RCCL and builds only RCCL-tests from the therock-10.1 revision.
  • Build TransformerEngine (v2.15_rocm), AITER and Megatron-LM (Core v0.19.2) inside the Dockerfile:
    • Sources are pinned with TE_COMMIT/AITER_COMMIT/MEGATRON_COMMIT and built without build isolation or dependency resolution.
    • The build first checks that the base's torch/triton/SDK versions match the tested ones, and afterwards that pip changed none of the protected packages.
    • Build-only settings run in their own layer, so they don't reach /etc/environment.

Minor Revision

  • The 10.1 base runs the system /usr/bin/python3 (the 10.0 base used /opt/venv). The image adds python3-venv and liblzma-dev, which TE's AOTriton build needs, and checks both at build time.
  • The pinned TE revision still includes the legacy ROCm SMI header, which the SDK no longer ships. rocm-smi-lib is built from the therock-10.1 rocm-systems revision into /usr/local as a compatibility library, separate from the SDK's AMD SMI.
  • third_party/Makefile: build rocm_perftest against $(ROCM_PATH) instead of the hard-coded /opt/rocm; other images keep /opt/rocm as the default.
  • Add third_party/Megatron/megatron_core_0.19.2_rocm10.patch, which fixes Megatron-LM argument parsing under the base image's Python 3.14 (% in help strings, type=bool with BooleanOptionalAction).
  • Register AMD SMI's Python bindings from the SDK (a .pth entry) until python packages: No amdsmi package available ROCm/TheRock#3054 is fixed, so import amdsmi finds the bundled module.
  • The image sets SB_ROCM_MEM_BW_BACKEND=transferbench and SB_MEGATRON_PATH. Both do nothing until Benchmarks - Add ROCm TransferBench mem-bw backend and fix PyTorch DDP store init #868 merges, so neither PR depends on the other. mem-bw can't run in this image until then. PyTorch DDP model benchmarks (ResNet, BERT, ...) also need Benchmarks - Add ROCm TransferBench mem-bw backend and fix PyTorch DDP store init #868's TCPStore fix to run reliably.
  • Docs: add ROCm 10 build notes and migration considerations to installation.mdx, and add disabling NUMA auto-balancing (kernel.numa_balancing=0) to the AMD host prerequisites. As on MI200/MI300, MI455X runs hang or behave unexpectedly with it enabled, and the container can't change this host setting.
  • Tests: add tests/test_rocm10_dockerfile.py. It covers architecture routing, SDK environment generation, RCCL override ordering, AMD SMI registration, framework source pins, the base-version check, and the system-Python/ROCm SMI prerequisites, all without Docker or a GPU.

Validation

  • python3 -m unittest tests.test_rocm10_dockerfile: 23 tests passed on Linux.
  • The ROCm 10.1 image built with the default source-built RCCL and passed the current (26.10) SuperBench configuration, together with Benchmarks - Add ROCm TransferBench mem-bw backend and fix PyTorch DDP store init #868, on hosts with kernel.numa_balancing=0.
  • An earlier ROCm 10.0 build using the prebuilt SDK RCCL was checked on an 8-GPU MI300X node. It built, passed pip check, GEMM and flash-SDPA correctness, the GPU-copy wrapper with data checking, and 8-rank RCCL all-reduce with data checking.
  • Not yet done: runs on MI455X.
  • The image is not yet in the build-image.yml matrix.

Ubuntu and others added 4 commits October 9, 2026 12:04
Record TheRock packaging, RVS/TransferBench coverage, and the public MI455X gfx1250 mapping without enabling unqualified targets.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the all-device wheel SDK and legacy MPI prefix, add release-matched RCCL clients and pinned relocatable RVS/TransferBench, and preserve AMD framework versions. Canonicalize AMD SMI loading to prevent import-order-dependent zero-GPU discovery. Document scaffold boundaries, tested transfer replacements, and remaining qualification choices.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 9, 2026 19:30
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

TransferBench tests reference missing fixture files, and the documentation overstates validation of the default source-built RCCL image.

3 open findings
What changed in this PR

Adds an experimental ROCm 10 image and MI455X support, including updated RCCL, frameworks, benchmarks, and configuration.

Changes:

  • Adds ROCm 10 image and framework installer.
  • Adds MI455X configuration and TransferBench memory-bandwidth backend.
  • Extends model precision, optimizer, Megatron, documentation, and tests.
File Description
dockerfile/​rocm10.0.x.dockerfile Defines the ROCm 10 image.
dockerfile/​etc/​install-rocm10-frameworks.sh Builds pinned ROCm frameworks.
third_party/​Megatron/​megatron_core_0.19.2_rocm10.patch Applies Python compatibility fixes.
third_party/​Makefile Uses configured ROCm SDK path.
superbench/​config/​amd_mi455x.yaml Adds four-GPU MI455X workloads.
rocm_memory_bw_performance.py Adds the TransferBench backend.
pytorch_base.py Adds configurable optimizer epsilon.
pytorch_bert.py Enables BF16.
pytorch_gpt2.py Enables BF16.
pytorch_llama.py Enables BF16.
megatron_gpt3.py Updates path selection and failure handling.
test_rocm10_dockerfile.py Validates Dockerfile construction.
test_rocm10_framework_install.py Validates framework installer pins.
test_transformer_precisions.py Tests BF16 and optimizer epsilon.
test_megatron_launch.py Tests Megatron launch behavior.
test_rocm_memory_bw_performance.py Tests TransferBench behavior.
installation.mdx Documents ROCm 10 and MI455X usage.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/getting-started/installation.mdx Resolved
Comment thread docs/getting-started/installation.mdx Resolved
Comment thread superbench/config/amd_mi455x.yaml Resolved
- Build TransformerEngine, AITER and Megatron-LM directly in
  rocm10.0.x.dockerfile (pinned ARGs) and remove
  dockerfile/etc/install-rocm10-frameworks.sh. Build-only settings run in
  their own layer so they do not reach /etc/environment.
- Move the TransferBench mem-bw backend and model benchmark changes, with
  their tests, to a separate PR.
- Remove superbench/config/amd_mi455x.yaml; configs are kept internally.
- Docs: qualify the packaged-RCCL validation, drop the moved TransferBench
  and MI455X config sections.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread dockerfile/rocm10.1.x.dockerfile Resolved
Comment thread dockerfile/rocm10.1.x.dockerfile Resolved
Comment thread dockerfile/rocm10.0.x.dockerfile Resolved
Comment thread dockerfile/rocm10.1.x.dockerfile Resolved
Comment thread docs/getting-started/installation.mdx Resolved
- Derive NVTE_ROCM_ARCH from AMDGPU_TARGETS, normalized like RCCL.
- Docs: ROCM_PATH is the wheel SDK root (no /opt/rocm alias); native
  amdrocm-* packages are RVS dependencies only; AMD SMI bindings use .pth.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 9, 2026 21:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The default source-built RCCL path and MI455X runtime remain unvalidated, and the MPI version documentation needs correction.

0 open findings

5 resolved since last review
Previously missed (1)

In code that hasn't changed since last review

Low severity Document that the image uses an Open MPI 5.0.10 release candidate

docs/​getting-started/​installation.mdx:150

This identifies the MPI runtime as the final Open MPI 5.0.10 release, but the pinned package is 5.0.10rc2.2605121430-1.b99be7132e (line 61), i.e. a 5.0.10 release-candidate build. Please document the actual version so users do not mistake this experimental image for one qualified against the final release.

🧠 Review effort: Balanced

Replace rocm10.0.x.dockerfile with rocm10.1.x.dockerfile on AMD's rocm10.1.0 Ubuntu 26.04 PyTorch 2.13 base, which avoids the ResNet and BERT crashes seen on 10.0. Bump the SDK, therock-10.1 rocm-systems revision, APT dependencies and test archive checksum; keep the RCCL source override because therock-10.1 branched before ROCm/rocm-systems#12051.

The 10.1 base uses the system /usr/bin/python3 instead of /opt/venv, so install python3-venv and liblzma-dev for TE's AOTriton build. Build legacy rocm-smi-lib into /usr/local for TE's ROCm SMI header, and drop stale build output from the context before installing SuperBench. Update tests and docs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 2, 2026 21:38
@normanvuong Nguyen Vuong (normanvuong) changed the title Dockerfile - Add ROCm 10.0 dockerfile with MI455X (gfx1250) support Dockerfile - Add ROCm 10.1 dockerfile with MI455X (gfx1250) support Nov 2, 2026
As on MI200/MI300 hosts, MI455X runs with the ROCm 10 image hang or behave unexpectedly unless kernel.numa_balancing is 0. Document the host setting, how to check it and how to disable it persistently, since the container cannot change it.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human assessment is needed because critical RCCL selection issues span build-time linking and Python preloading, alongside a gfx1250-only framework build failure.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 2, 2026 21:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human assessment is needed to evaluate the benchmark impact of discarded caller library paths and test failures in the Python 3.7 CI job.

No open issues 🎉

Review effort: Balanced

This branch has not been deployed

No deployments
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.

3 participants