Skip to content

[ROCm][CI] Report ROCm version via amd-smi and rocminfo - #192824

Closed
ethanwee1 wants to merge 3 commits into
pytorch:mainfrom
ethanwee1:ew/setup-rocm-amd-smi-rocminfo-version
Closed

ethanwee1 wants to merge 3 commits into
pytorch:mainfrom
ethanwee1:ew/setup-rocm-amd-smi-rocminfo-version

Conversation

@ethanwee1

@ethanwee1 ethanwee1 commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

JIRA ID: AIPYTORCH-1075

Problem

The setup-rocm Runner ROCm version step dumps dpkg -l | grep rocm. On runners that use TheRock wheels next to leftover deb packages, that list does not match the stack that actually runs tests.

Changes

Replace that dump in .github/actions/setup-rocm/action.yml with:

  • amd-smi version for the active ROCm / AMDSMI / amdgpu versions
  • the first rocminfo Runtime Version line, prefixed with rocminfo: so the source is obvious in CI logs

The separate dpkg amdgpu health-check step is unchanged.

Validation

Trunk 31517829339 was 14/14 MI350 green on the original commit (b28317c). Sample Runner ROCm version output from linux-jammy-rocm-py3.10-mi350 / test (default, 1/8):

AMDSMI Tool: 25.4.2+aca1101 | AMDSMI Library version: 25.4.0 | ROCm version: 6.4.1 | amdgpu version: 6.16.13 | amd_hsmp version: N/A
Runtime Version:         1.15

That sample is from before the rocminfo: prefix. Current head e42663eb90e has not had Lint/pull/trunk approved; there is no ciflow/trunk/192824 tag on this SHA.

cc @jeffdaily @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @jataylo @hongxiayang @naromero77amd @pragupta @jerrymannil @xinyazhang

Replace the broad dpkg rocm package listing in setup-rocm with
amd-smi version and the rocminfo runtime version line. The dpkg query
is misleading on runners that use TheRock wheels alongside leftover
deb packages.
@pytorch-bot

pytorch-bot Bot commented Aug 10, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/192824

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit e42663e with merge base fffac88 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot Bot added module: rocm AMD GPU support for Pytorch topic: not user facing topic category labels Aug 10, 2026
@jithunnair-amd jithunnair-amd added ciflow/trunk Trigger trunk jobs on your pull request keep-going Don't stop on first failure, keep running tests until the end labels Aug 11, 2026
@ethanwee1
ethanwee1 marked this pull request as ready for review August 13, 2026 19:04
@ethanwee1
ethanwee1 requested a review from a team as a code owner August 13, 2026 19:04
@soulitzer
soulitzer requested a review from jeffdaily August 13, 2026 19:09
@soulitzer soulitzer added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Aug 13, 2026
Comment thread .github/actions/setup-rocm/action.yml Outdated
run: |
dpkg -l | grep -E " rocm"
amd-smi version || true
rocminfo 2>&1 | grep -m1 -E '^Runtime Version' || true

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Print "rocminfo" with the version, so we know it's the rocminfo version

Make the runtime-version source explicit in CI logs.
@pytorch-bot

pytorch-bot Bot commented Aug 17, 2026 •

Copy link
Copy Markdown

Workflows were awaiting approval. CI has now been triggered for the ciflow labels on this PR.

@jeffdaily jeffdaily left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. Approving. The following is a suggestion for a follow-up, not a blocker for this PR.

There is a second dpkg -l | grep -E in the same file that this PR leaves behind. .github/actions/setup-rocm/action.yml:37 runs dpkg -l | grep -E " amdgpu", and composite-action shell: bash runs as bash --noprofile --norc -eo pipefail, so a host that is not Debian-based, or that simply has no matching amdgpu package entry, fails the step and takes the job down with it. That is the same fragility this PR removes from line 12.

Two things to settle if you pick it up:

  • Failure semantics: at minimum append || true so an informational step cannot fail the job, matching what you did on line 12.
  • What to print: amd-smi version reports the loaded kernel driver version, not the userspace package versions, so it is not a drop-in replacement. Your PR description calls out wanting the userspace amdgpu version, so if that is the goal, keep a guarded dpkg listing rather than swapping in amd-smi. If the kernel driver version is sufficient, line 12 already prints it and the step can be dropped.

Line 29 cats /etc/apt/sources.list.d/rocm.list, Debian-specific as well, though already || true so it is only log noise elsewhere.

Nothing else in the tree needs it: the only other dpkg -l is in torch/utils/collect_env.py, which already dispatches across dpkg/dnf/yum/zypper and returns "N/A" when none is present.

Analysis assisted by AI.

@jeffdaily

Copy link
Copy Markdown
Collaborator

@pytorchbot merge

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

orrangetabby17 pushed a commit to orrangetabby17/pytorch that referenced this pull request Sep 2, 2026
JIRA ID: AIPYTORCH-1075

## Problem
The setup-rocm **Runner ROCm version** step dumps `dpkg -l | grep rocm`. On runners that use TheRock wheels next to leftover deb packages, that list does not match the stack that actually runs tests.

## Changes
Replace that dump in `.github/actions/setup-rocm/action.yml` with:
- `amd-smi version` for the active ROCm / AMDSMI / amdgpu versions
- the first rocminfo `Runtime Version` line, prefixed with `rocminfo:` so the source is obvious in CI logs

The separate `dpkg` amdgpu health-check step is unchanged.

## Validation
Trunk [31517829339](https://github.com/pytorch/pytorch/actions/runs/31517829339) was 14/14 MI350 green on the original commit (`b28317c`). Sample **Runner ROCm version** output from [linux-jammy-rocm-py3.10-mi350 / test (default, 1/8)](https://github.com/pytorch/pytorch/actions/runs/31517829339/job/93872886715):

```
AMDSMI Tool: 25.4.2+aca1101 | AMDSMI Library version: 25.4.0 | ROCm version: 6.4.1 | amdgpu version: 6.16.13 | amd_hsmp version: N/A
Runtime Version:         1.15
```

That sample is from before the `rocminfo:` prefix. Current head `e42663eb90e` has not had Lint/pull/trunk approved; there is no `ciflow/trunk/192824` tag on this SHA.

Pull Request resolved: pytorch#192824
Approved by: https://github.com/jithunnair-amd, https://github.com/jeffdaily
Sanskaaar1 pushed a commit to Sanskaaar1/pytorch that referenced this pull request Sep 8, 2026
JIRA ID: AIPYTORCH-1075

## Problem
The setup-rocm **Runner ROCm version** step dumps `dpkg -l | grep rocm`. On runners that use TheRock wheels next to leftover deb packages, that list does not match the stack that actually runs tests.

## Changes
Replace that dump in `.github/actions/setup-rocm/action.yml` with:
- `amd-smi version` for the active ROCm / AMDSMI / amdgpu versions
- the first rocminfo `Runtime Version` line, prefixed with `rocminfo:` so the source is obvious in CI logs

The separate `dpkg` amdgpu health-check step is unchanged.

## Validation
Trunk [31517829339](https://github.com/pytorch/pytorch/actions/runs/31517829339) was 14/14 MI350 green on the original commit (`b28317c`). Sample **Runner ROCm version** output from [linux-jammy-rocm-py3.10-mi350 / test (default, 1/8)](https://github.com/pytorch/pytorch/actions/runs/31517829339/job/93872886715):

```
AMDSMI Tool: 25.4.2+aca1101 | AMDSMI Library version: 25.4.0 | ROCm version: 6.4.1 | amdgpu version: 6.16.13 | amd_hsmp version: N/A
Runtime Version:         1.15
```

That sample is from before the `rocminfo:` prefix. Current head `e42663eb90e` has not had Lint/pull/trunk approved; there is no `ciflow/trunk/192824` tag on this SHA.

Pull Request resolved: pytorch#192824
Approved by: https://github.com/jithunnair-amd, https://github.com/jeffdaily
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request keep-going Don't stop on first failure, keep running tests until the end Merged module: rocm AMD GPU support for Pytorch open source topic: not user facing topic category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants