Repository navigation
CI: Hip quality review easy: add Hip occupancy check and small static analysis report - #32365
Conversation
|
@IMbackK, @CISC The idea is to speed up review of Cuda/ROCm changes by generating a small static report in CI and a blocking/warning feature based on custom rules. From my small experience I only have set the following rules:
The idea is to get minimal false positive and minimal true negative. |
|
I'll try to take a look when time permits, quick note though; avoid GHA cache (this workflow is blocked from it anyway), you can use our HF Buckets cache though, see |
thanks, done ;) |
|
TIL |
|
looks ok to me generally for inclusion and i ack the rules ill approve after a test & @thelittlefireman could you rebase so that the current master code is checked? |
5a15a70 to
944b2b9
Compare
Done for the rebase |
|
@IMbackK i made test on our branch dpp you can check the report result her: I've note that i should ignore sgpr spill on fattn.
|
Backport only the CI changes for the tmp integration test. Assisted-by: ChatGPT
|
That run failed in the werror check |
|
The third one is the good one sorry ... https://github.com/ggml-org/tmp/actions/runs/45580236776?pr=37 |
IMbackK
left a comment
There was a problem hiding this comment.
hopefully not too many false positives/ noise, but lets give it a try.
|
Johannes's fattn refactor changed the symbol names, could you rebase and import the new names? |
Add scripts/hip/gcn-cdna-occupancy-check.py, which compares per-kernel occupancy between two GGML_HIP_EXPORT_METRICS build logs and fails when a kernel drops occupancy. Wire it into the HIP quality check workflow: the baseline (master) is built with the same target and flags, then compared against the PR build. Assisted-by: Hermes Agent
…heck The PR-side metrics.log is shared with the VGPR spill check, so the occupancy comparison adds no extra PR build. The master baseline metrics log is cached by master-push runs and restored on PRs; it is only rebuilt as a fallback when the master tip has no cached baseline.
Extend gcn-cdna-occupancy-check.py to also compare per-kernel VGPR and SGPR spills, and add a --report option that writes a markdown report with all regressions and improvements. The workflow uploads the report as an artifact on PRs, even when the check fails.
gcn-cdna-metrics-check.py compares per-kernel occupancy and spills and can dump all deltas as TSV; gcn-cdna-metrics-report.py generates the markdown report from that dump. The workflow runs both on PRs and uploads the report as an artifact.
Merge VGPR threshold, occupancy/spill comparison, and Markdown reporting into one script with unchanged checking rules and output formats. Parse per-kernel optimization records instead of interleaved text diagnostics. Add unit tests and update the CI baseline cache to contain YAML records.
Count only kernels with occupancy or spill remarks, as before the YAML migration. Add a regression test for VGPR-only records and fix flake8.
Cast metric entries to lists before appending and check the dynamic module spec and loader are available before executing the tests. Preserve existing checks and reports.
Preserve the VGPR limit and its exemptions, block spill increases and occupancy drops with increasing VGPRs, and warn on occupancy-only drops. Collect all findings and generate the report before failing CI. Request device optimization records explicitly and bypass ccache during metrics builds; print YAML diagnostics to investigate missing kernel resource remarks in ROCm 7.2.1.
Do not enable host remarks: Clang writes host and device optimization records to the same output path. Filter the device records to kernel resource usage and validate the compiler output before expensive builds. Invalidate old baseline caches and avoid reporting a missing TSV.
Assisted-by: ChatGPT
Assisted-by: ChatGPT
Assisted-by: ChatGPT
Assisted-by: ChatGPT
Assisted-by: ChatGPT
Assisted-by: ChatGPT
Assisted-by: ChatGPT
Co-authored-by: Sigbjørn Skjæret <[email protected]>
Assisted-by: ChatGPT
03f04c7 to
17aa0c6
Compare
Done, could we merge ? |
Overview
Help HIP PR review:
gcn-cdna-vgpr-check.pyscript to compare occupancy from a PR to master to avoid massive occupancy regression introduce by PR.Additional information
This will be useful for faster HIP PR review.
Requirements