Repository navigation
fix(hipfile): Attribute IO stats to the GPU associated with the buffer instead of the currently configured device. - #13657
Merged
Conversation
✅ All Policy Checks Passed
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Regression tests need to verify device forwarding and counter attribution when the buffer’s GPU differs from the current device.
1 open finding
What changed in this PR
This PR attributes hipfile I/O statistics to the buffer’s GPU rather than the currently selected device.
Changes:
- Pass explicit device IDs through statistics tracking and collection.
- Update backend error reporting, mocks, and existing tests.
| File | Description |
|---|---|
| projects/hipfile/test/amd_detail/stats.cpp | Pass explicit device IDs in collection tests. |
| projects/hipfile/test/amd_detail/mstats.h | Update mock statistics signatures. |
| projects/hipfile/test/amd_detail/fastpath.cpp | Mock the buffer’s GPU ID. |
| projects/hipfile/src/amd_detail/stats.h | Store and accept device IDs. |
| projects/hipfile/src/amd_detail/stats.cpp | Record statistics using the supplied device. |
| projects/hipfile/src/amd_detail/backend/fastpath.cpp | Attribute completion and errors to the buffer’s GPU. |
| projects/hipfile/src/amd_detail/backend/fallback.cpp | Attribute errors to the buffer’s GPU. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…r instead of the currently configured device.
zbyrne
force-pushed
the
users/zbyrne/hipfile/stats-device-id-fix
branch
from
October 16, 2026 18:29
8c346c7 to
d26e4e3
Compare
jordan-turbofish
approved these changes
Oct 16, 2026
kurtmcmillan
approved these changes
Oct 16, 2026
systems-assistant Bot
pushed a commit
to ROCm/hipFile
that referenced
this pull request
Oct 16, 2026
the buffer instead of the currently configured device. [rocm-systems] ROCm/rocm-systems#13657 (commit 1aa15c3)
Contributor
TheRock Submodule Bump ActivityNewest first
|
pmoutsias-amd
added a commit
that referenced
this pull request
Nov 5, 2026
…branch to the (Unreleased) hipFile 0.7.0 section (#14918) These 4 CHANGELOG entries sit in release sections, but the code was merged to develop after the `rocm-systems` commit that TheRock `release/therock-10.2` pins (`ded49fd`), and is not in that commit. This moves them into `## (Unreleased) hipFile 0.7.0`, under the matching subsections. - #13473 (merged 2026-10-15, and its merge commit is not in `ded49fd`), moved from the `hipFile 0.6.0 for ROCm 10.2.0` section: > * MD and LVM software RAID arrays running pass-through personalities whose member devices are all local NVMe are now fastpath capable, and `ais-check` reports them as such. - #13473 (merged 2026-10-15, and its merge commit is not in `ded49fd`), moved from the `hipFile 0.6.0 for ROCm 10.2.0` section: > * `ais-check` no longer reports an LVM parity RAID logical volume (`raid4`, `raid5`, `raid6`) as fastpath capable. - #13657 (merged 2026-10-16, and its merge commit is not in `ded49fd`), moved from the `hipFile 0.6.0 for ROCm 10.2.0` section: > * Per-GPU I/O statistics are now attributed to the GPU that owns the I/O buffer instead of the caller's active HIP device. Previously, `hipFileGetStatsL3()` and `ais-stats` could report counters against the wrong GPU when the active device differed from the buffer's device. - #13862 (merged 2026-10-21, and its merge commit is not in `ded49fd`), moved from the `hipFile 0.6.0 for ROCm 10.2.0` section: > * `hipfile.h` now includes `<time.h>`, which declares the `struct timespec` used by `hipFileBatchIOGetStatus()`. Previously, C code that included `<time.h>` after `hipfile.h` got an incompatible pointer type error or warning when passing a `struct timespec *` to `hipFileBatchIOGetStatus()`. Only the CHANGELOG is changed. Version macros are left to the component owners. JIRA ID : AIROCDOC-4467
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Motivation
Stats collection for IO ops used the current hip device instead of the one associated with the buffer. This fixes that.
Technical Details
StatsIoTracker passes a device ID down to StatsCollection instead of addIo() and error() calling hipGetDevice()
Issue Tracking
JIRA ID: AIHIPFILE-301
Test Plan
Run unit tests.
Test Result
Tests all pass.
Submission Checklist