Repository navigation
Conversation
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.
🔗 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 FailuresAs of commit e42663e with merge base fffac88 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
| run: | | ||
| dpkg -l | grep -E " rocm" | ||
| amd-smi version || true | ||
| rocminfo 2>&1 | grep -m1 -E '^Runtime Version' || true |
There was a problem hiding this comment.
Print "rocminfo" with the version, so we know it's the rocminfo version
Make the runtime-version source explicit in CI logs.
|
|
…-rocminfo-version
jeffdaily
left a comment
There was a problem hiding this comment.
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
|| trueso an informational step cannot fail the job, matching what you did on line 12. - What to print:
amd-smi versionreports 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.
|
@pytorchbot merge |
Merge startedYour 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 |
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
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
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.ymlwith:amd-smi versionfor the active ROCm / AMDSMI / amdgpu versionsRuntime Versionline, prefixed withrocminfo:so the source is obvious in CI logsThe separate
dpkgamdgpu 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):That sample is from before the
rocminfo:prefix. Current heade42663eb90ehas not had Lint/pull/trunk approved; there is nociflow/trunk/192824tag on this SHA.cc @jeffdaily @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @jataylo @hongxiayang @naromero77amd @pragupta @jerrymannil @xinyazhang