Create public api for stats clients#236
Conversation
32d6697 to
79e93b7
Compare
There was a problem hiding this comment.
Pull request overview
This PR introduces a small public C API wrapper around the existing hipFile::StatsClient (to enable non-C++ consumers) and migrates the ais-stats tool to use that wrapper.
Changes:
- Added a new exported C header/API (
include/hipfile-stats.h) and its implementation wrapper (src/amd_detail/hipfile-stats.cpp) aroundhipFile::StatsClient. - Updated
tools/ais-statsto use the new C API instead of directly instantiatingStatsClient. - Made
StatsClient::pollProcess()andStatsClient::generateReport()constto support use via aconstcontext pointer.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/ais-stats/ais-stats.cpp | Switches the CLI tool to the new C API context/connect/poll/report flow. |
| src/amd_detail/stats.h | Marks StatsClient polling/report methods as const for wrapper usage. |
| src/amd_detail/stats.cpp | Implements the const-qualified StatsClient methods. |
| src/amd_detail/hipfile-stats.cpp | New C API wrapper implementation around StatsClient. |
| src/amd_detail/CMakeLists.txt | Adds the new wrapper source file to the AMD detail library build. |
| include/hipfile-stats.h | New public C header exposing the stats API. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c5b6eb2 to
c6c72e2
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c6c72e2 to
ccbb060
Compare
ccbb060 to
00c742b
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
00c742b to
400fe1f
Compare
400fe1f to
cfcebff
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cfcebff to
e419505
Compare
Creates a C API that wraps StatsClient and updates ais-stats to use the new API