From e2fcfc42d751f56ae519fd1a5ca3488b029fec1d Mon Sep 17 00:00:00 2001 From: Scott Todd Date: Mon, 26 Jan 2026 13:02:01 -0800 Subject: [PATCH 1/5] Add test_rocm_wheels.yml workflow for testing ROCm Python packages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a workflow that installs ROCm Python wheels from a pip index and runs `rocm-sdk test` to verify package integrity. This allows testing packages published to nightlies or dev releases without the overhead of the full PyTorch test suite. Changes: - Add test_rocm_wheels.yml with workflow_dispatch and workflow_call triggers - Support configurable GPU family, runner, index URL, and package version - Use existing setup_venv.py tooling for venv creation and package installation - Write workflow summary to GitHub step summary 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/test_rocm_wheels.yml | 117 +++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 .github/workflows/test_rocm_wheels.yml diff --git a/.github/workflows/test_rocm_wheels.yml b/.github/workflows/test_rocm_wheels.yml new file mode 100644 index 00000000000..c59025fc6cd --- /dev/null +++ b/.github/workflows/test_rocm_wheels.yml @@ -0,0 +1,117 @@ +name: Test ROCm Wheels + +on: + workflow_dispatch: + inputs: + amdgpu_family: + description: GPU family to test (e.g., gfx94X-dcgpu, gfx110X-all) + required: true + type: string + default: "gfx94X-dcgpu" + test_runs_on: + description: Runner label to use. The selected runner should have a GPU supported by amdgpu_family + required: true + type: string + default: "linux-mi325-1gpu-ossci-rocm-frac" + package_index_url: + description: Base Python package index URL (without GPU family subdir) + required: true + type: string + default: "https://rocm.nightlies.amd.com/v2" + package_version: + description: ROCm package version to install (e.g., "7.10.0.dev0+498.20250125.gitdbc9893f") + required: true + type: string + python_version: + required: true + type: string + default: "3.12" + + workflow_call: + inputs: + amdgpu_family: + required: true + type: string + test_runs_on: + required: true + type: string + package_index_url: + required: true + type: string + package_version: + required: true + type: string + python_version: + required: true + type: string + repository: + description: "Repository to checkout. Otherwise, defaults to `github.repository`." + type: string + ref: + description: "Branch, tag or SHA to checkout. Defaults to the reference or SHA that triggered the workflow." + type: string + +permissions: + contents: read + +run-name: Test ROCm Wheels (${{ inputs.amdgpu_family }}, ${{ inputs.package_version }}, ${{ inputs.test_runs_on }}) + +jobs: + test_wheels: + name: Test ROCm Wheels | ${{ inputs.amdgpu_family }} + runs-on: ${{ inputs.test_runs_on }} + container: + image: ${{ contains(inputs.test_runs_on, 'linux') && 'ghcr.io/rocm/no_rocm_image_ubuntu24_04@sha256:405945a40deaff9db90b9839c0f41d4cba4a383c1a7459b28627047bf6302a26' || null }} + options: --ipc host + --group-add video + --device /dev/kfd + --device /dev/dri + --group-add 110 + --env-file /etc/podinfo/gha-gpu-isolation-settings + --user 0:0 # Running as root, by recommendation of GitHub: https://docs.github.com/en/actions/reference/workflows-and-actions/dockerfile-support#user + defaults: + run: + shell: bash + env: + VENV_DIR: ${{ github.workspace }}/.venv + AMDGPU_FAMILY: ${{ inputs.amdgpu_family }} + + steps: + - name: Checkout + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + with: + repository: ${{ inputs.repository || github.repository }} + ref: ${{ inputs.ref || '' }} + + - name: Set up Python + uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 + with: + python-version: ${{ inputs.python_version }} + + - name: Summarize workflow inputs + run: | + echo "## Test ROCm Wheels" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "| Input | Value |" >> $GITHUB_STEP_SUMMARY + echo "|-------|-------|" >> $GITHUB_STEP_SUMMARY + echo "| GPU Family | \`${{ inputs.amdgpu_family }}\` |" >> $GITHUB_STEP_SUMMARY + echo "| Package Version | \`${{ inputs.package_version }}\` |" >> $GITHUB_STEP_SUMMARY + echo "| Index URL | \`${{ inputs.package_index_url }}/${{ inputs.amdgpu_family }}\` |" >> $GITHUB_STEP_SUMMARY + echo "| Python Version | \`${{ inputs.python_version }}\` |" >> $GITHUB_STEP_SUMMARY + echo "| Runner | \`${{ inputs.test_runs_on }}\` |" >> $GITHUB_STEP_SUMMARY + + - name: Set up virtual environment and install ROCm packages + run: | + python build_tools/setup_venv.py ${VENV_DIR} \ + --packages "rocm[libraries,devel]==${{ inputs.package_version }}" \ + --index-url=${{ inputs.package_index_url }} \ + --index-subdir=${{ inputs.amdgpu_family }} \ + --activate-in-future-github-actions-steps + + - name: Show installed packages + run: | + pip freeze + + - name: Run rocm-sdk sanity tests + run: | + rocm-sdk test From 6353ec3ca0af0cd43b5a9a2a8ff273b5678826d0 Mon Sep 17 00:00:00 2001 From: Scott Todd Date: Mon, 26 Jan 2026 13:05:51 -0800 Subject: [PATCH 2/5] Remove unnecessary summary step from test_rocm_wheels.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Standard GitHub Actions logs are sufficient for this simple workflow. The summarize step pattern from test_pytorch_wheels.yml was designed for more complex use cases with testable reproduction instructions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/test_rocm_wheels.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/test_rocm_wheels.yml b/.github/workflows/test_rocm_wheels.yml index c59025fc6cd..52ca7154570 100644 --- a/.github/workflows/test_rocm_wheels.yml +++ b/.github/workflows/test_rocm_wheels.yml @@ -88,18 +88,6 @@ jobs: with: python-version: ${{ inputs.python_version }} - - name: Summarize workflow inputs - run: | - echo "## Test ROCm Wheels" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "| Input | Value |" >> $GITHUB_STEP_SUMMARY - echo "|-------|-------|" >> $GITHUB_STEP_SUMMARY - echo "| GPU Family | \`${{ inputs.amdgpu_family }}\` |" >> $GITHUB_STEP_SUMMARY - echo "| Package Version | \`${{ inputs.package_version }}\` |" >> $GITHUB_STEP_SUMMARY - echo "| Index URL | \`${{ inputs.package_index_url }}/${{ inputs.amdgpu_family }}\` |" >> $GITHUB_STEP_SUMMARY - echo "| Python Version | \`${{ inputs.python_version }}\` |" >> $GITHUB_STEP_SUMMARY - echo "| Runner | \`${{ inputs.test_runs_on }}\` |" >> $GITHUB_STEP_SUMMARY - - name: Set up virtual environment and install ROCm packages run: | python build_tools/setup_venv.py ${VENV_DIR} \ From 56ff4f1061148cfcddf6b0cdd2eb8ee8cc3fb08f Mon Sep 17 00:00:00 2001 From: Scott Todd Date: Mon, 26 Jan 2026 13:09:24 -0800 Subject: [PATCH 3/5] Rename package_version to rocm_version in test_rocm_wheels.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Match the naming convention used in build_portable_linux_pytorch_wheels.yml and use a simpler nightly version example (7.10.0a20251124) instead of the more complex dev version format. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/test_rocm_wheels.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test_rocm_wheels.yml b/.github/workflows/test_rocm_wheels.yml index 52ca7154570..8d23686a8c4 100644 --- a/.github/workflows/test_rocm_wheels.yml +++ b/.github/workflows/test_rocm_wheels.yml @@ -18,8 +18,8 @@ on: required: true type: string default: "https://rocm.nightlies.amd.com/v2" - package_version: - description: ROCm package version to install (e.g., "7.10.0.dev0+498.20250125.gitdbc9893f") + rocm_version: + description: ROCm version to pip install (e.g. "7.10.0a20251124") required: true type: string python_version: @@ -38,7 +38,7 @@ on: package_index_url: required: true type: string - package_version: + rocm_version: required: true type: string python_version: @@ -54,7 +54,7 @@ on: permissions: contents: read -run-name: Test ROCm Wheels (${{ inputs.amdgpu_family }}, ${{ inputs.package_version }}, ${{ inputs.test_runs_on }}) +run-name: Test ROCm Wheels (${{ inputs.amdgpu_family }}, ${{ inputs.rocm_version }}, ${{ inputs.test_runs_on }}) jobs: test_wheels: @@ -91,7 +91,7 @@ jobs: - name: Set up virtual environment and install ROCm packages run: | python build_tools/setup_venv.py ${VENV_DIR} \ - --packages "rocm[libraries,devel]==${{ inputs.package_version }}" \ + --packages "rocm[libraries,devel]==${{ inputs.rocm_version }}" \ --index-url=${{ inputs.package_index_url }} \ --index-subdir=${{ inputs.amdgpu_family }} \ --activate-in-future-github-actions-steps From 65535318521256ab5901bbaf1db43f9752b5f27b Mon Sep 17 00:00:00 2001 From: Scott Todd Date: Mon, 26 Jan 2026 13:12:49 -0800 Subject: [PATCH 4/5] Reorder workflow inputs to match test_pytorch_wheels.yml --- .github/workflows/test_rocm_wheels.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test_rocm_wheels.yml b/.github/workflows/test_rocm_wheels.yml index 8d23686a8c4..a96f5228885 100644 --- a/.github/workflows/test_rocm_wheels.yml +++ b/.github/workflows/test_rocm_wheels.yml @@ -18,14 +18,14 @@ on: required: true type: string default: "https://rocm.nightlies.amd.com/v2" - rocm_version: - description: ROCm version to pip install (e.g. "7.10.0a20251124") - required: true - type: string python_version: required: true type: string default: "3.12" + rocm_version: + description: ROCm version to pip install (e.g. "7.10.0a20251124") + required: true + type: string workflow_call: inputs: @@ -38,10 +38,10 @@ on: package_index_url: required: true type: string - rocm_version: + python_version: required: true type: string - python_version: + rocm_version: required: true type: string repository: From 22a95cebd897fb4bd92c6a501ec5619ffb51e48c Mon Sep 17 00:00:00 2001 From: Scott Todd Date: Mon, 26 Jan 2026 13:36:37 -0800 Subject: [PATCH 5/5] Remove unused env var (caught by automated review) --- .github/workflows/test_rocm_wheels.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test_rocm_wheels.yml b/.github/workflows/test_rocm_wheels.yml index a96f5228885..cb045df296a 100644 --- a/.github/workflows/test_rocm_wheels.yml +++ b/.github/workflows/test_rocm_wheels.yml @@ -74,7 +74,6 @@ jobs: shell: bash env: VENV_DIR: ${{ github.workspace }}/.venv - AMDGPU_FAMILY: ${{ inputs.amdgpu_family }} steps: - name: Checkout