Skip to content

fix(hrr): regenerate sources for hipKernelSetCacheConfig - #14278

Closed
danielbolsson wants to merge 1 commit into
developfrom
users/danielbolsson/hrr-3083
Closed

danielbolsson wants to merge 1 commit into
developfrom
users/danielbolsson/hrr-3083

Conversation

@danielbolsson

Copy link
Copy Markdown
Contributor

JIRA ID : AIRUNTIME-3083

Motivation

#12628 (AIRUNTIME-2610) added hipKernelSetCacheConfig to HipDispatchTable on develop without regenerating the HRR sources. The checked-in capture and playback dispatch sources, hrr_api_args.h and the API matrix baseline no longer match the HIP headers, so the two tests in projects/hrr/tools/tests/test_generated_files_current.py fail on develop, and with them the HRR script tests check on #13256. This PR regenerates them, as #13472 did for hipKernelSetAttributeForDevice.

Technical Details

  • Generated sources: re-run gen_hrr_api_args.py --check-hrr-coverage. Nothing in them is edited by hand. hipKernelSetCacheConfig is the only API that drifted.
  • Classification of the new API:
    • Capture records it through a generated shim.
    • Playback is a no-op. Its hipKernel_t argument is one of the opaque types playback cannot turn back into a live object (_UNTRANSLATED_PLAYBACK_TYPES), so playback_defaults_to_noop applies without listing it anywhere. Its sibling hipKernelSetAttribute is a no-op for the same reason.
    • The API matrix keeps it in T4. Unlike hipKernelSetAttributeForDevice, the HIP headers declare it, so api_matrix.yaml needs no change. The T4 matrix workload now calls it next to hipKernelSetAttribute; without that call the analyzer reports an undeclared coverage gap.
  • API matrix: derive_manifest.py --update-baseline, then check_matrix.py --emit-cxx. The baseline gains one runtime API, one generated capture and one no-op replay. Re-running both steps on this tree is a no-op.
  • HRR_VERSION goes from 10 to 11. The new runtime slot takes the first compiler API ID and shifts the compiler IDs up by one, so a v10 reader would decode those events as the wrong API. The version history in DESIGN.md and the generator's header comment record v11. The enable-recording skill's __hipRegisterFatBinary id table in inspect_archive.py gains v11 (551), which tools/tests/test_skill_api_ids.py requires.

Issue Tracking

AIRUNTIME-3083. Fixes the HRR script tests failure on #13256 that comes from develop.

Test Plan

  • pytest projects/hrr/tests/scripts projects/hrr/tools/tests, including the two staleness tests.
  • Build ROCr, CLR with HRR capture, and HRR playback, unit and integration tests, in private prefixes.
  • Host unit and handler tests.
  • On gbt350 (2x MI350X, gfx950, HIP_VISIBLE_DEVICES=4,5): the API matrix roundtrips T0-T5 and the full integration suite.

Test Result

  • pytest projects/hrr/tests/scripts projects/hrr/tools/tests: 181 passed. The two staleness tests failed on develop and pass here.
  • Build: ROCr, CLR with HRR capture (including the regenerated hip_capture_generated.cpp), HRR playback, unit and integration tests all build.
  • Host hrr-unit-tests: 1512 assertions in 81 test cases pass. hrr-handler-tests: 249 assertions in 31 test cases pass.
  • gbt350, HIP_VISIBLE_DEVICES=4,5, tree id daea968daf461dc419dfea08dad7db2ec71a7706 matched by drovr-sync: API matrix T0-T4 pass (400 assertions in 5 test cases), T5 passes (14 assertions), and check_matrix.py --results reports fail=0 in every tier. hipKernelSetCacheConfig is exercised in T4. The full integration run reports 149 passed / 1 failed / 0 skipped.
  • Pre-existing, reproduced without this change: Unit_HRR_SecureExecIgnoresCaptureOutput fails (AIRUNTIME-3074); the analyzer exits 1 on two T5 coverage notes (hipArray3DCreate, hipArrayCreate); the host handler-tests report a 512-byte ASan leak in ROCr (hsaKmtCreateEventCtx).

Submission Checklist

AIRUNTIME-3083. hipKernelSetCacheConfig was added to HipDispatchTable on
develop (AIRUNTIME-2610) without regenerating the HRR sources, so the
generated-files and API-matrix staleness tests fail on develop.

Regenerated hrr_api_args.h and both dispatch sources with
gen_hrr_api_args.py, and the API matrix baseline and expectations with
derive_manifest.py --update-baseline and check_matrix.py --emit-cxx.
Capture records it through a generated shim; playback is a no-op because
its hipKernel_t argument cannot be rebuilt into a live object.

The new runtime slot shifts the compiler API IDs up by one, so
HRR_VERSION goes from 10 to 11, and the enable-recording skill's
__hipRegisterFatBinary table gains the v11 id.

The API matrix workload now calls hipKernelSetCacheConfig, so the T4
sweep exercises it instead of reporting an undeclared coverage gap.
@danielbolsson
danielbolsson requested review from a team as code owners October 26, 2026 17:11
Copilot AI balanced review requested due to automatic review settings October 26, 2026 17:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@therock-pr-bot

Copy link
Copy Markdown

✅ All Policy Checks Passed

Check Status Details
📝 PR Description ✅ Pass —
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ✅ Pass —
🚫 Draft PR 🔜 To Be Enabled —
🚩 Feature Flag 🔜 To Be Enabled —
📊 Code Coverage 🔜 To Be Enabled —

🎉 All policy checks passed!

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

🙋 Wish to Override Policy?

@danielbolsson

Copy link
Copy Markdown
Contributor Author

Closing: #14241 already regenerates the same sources for hipKernelSetCacheConfig. Approved there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants