Repository navigation
fix(hrr): regenerate sources for hipKernelSetAttributeForDevice - #13472
danielbolsson merged 4 commits into
Conversation
#13004 appended hipKernelSetAttributeForDevice to HipDispatchTable without regenerating the HRR sources, so the checked-in capture and playback dispatch, hrr_api_args.h and the API matrix expectations no longer match the headers. Capture records it through a generated shim. Playback is a no-op: its hipKernel_t argument cannot be translated back into a live kernel, the same reason its sibling hipKernelSetAttribute is a no-op. The SDK headers the matrix workloads build against do not declare it, so the matrix lists it as unreachable with the other APIs absent from them. The new runtime slot takes the first compiler API ID and shifts the compiler IDs up by one, so HRR_VERSION goes from 8 to 9. Signed-off-by: Daniel Olsson <Daniel.Olsson@amd.com>
✅ All Policy Checks Passed
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
andraghetti
left a comment
There was a problem hiding this comment.
The regeneration and the v9 bump look right: the new slot takes ID 547 and the nine compiler IDs move up by one. On MI350 at 6327b8f the full gate shows only the known baseline failures; T0–T2, T5, ManifestWellFormed and ReplayClassMarkers pass. Approving.
…n/hrr-regen-kernel-set-attribute-for-device-d16b
|
🤖 AI-assisted pre-review (for @mangupta) Re-reviewed the updated head ( |
…ss guard Carry PR #13500's content over the #13472 tree: - tests/integration/hrr_api_matrix_expectations.h regenerated with derive_manifest.py + check_matrix.py --emit-cxx (48 corrected expectation lines; hipMallocHost/hipFreeHost expect=0 REAL since MANUAL_PLAYBACK_APIS replays them by hand) - api_classes_baseline.json re-derived with derive_manifest.py --update-baseline (observable NOOP 201->221, REAL 340->320, etc.) - tools/tests/test_generated_files_current.py from #13500: regenerates generated files into a scratch dir and fails if checked-in copies drift Verified: generators are byte-identical to both PRs' committed content; hrr_check_sources.py all --base-sha origin/develop passes.
…ss guard Carry PR #13500's content over the #13472 tree: - tests/integration/hrr_api_matrix_expectations.h regenerated with derive_manifest.py + check_matrix.py --emit-cxx (48 corrected expectation lines; hipMallocHost/hipFreeHost expect=0 REAL since MANUAL_PLAYBACK_APIS replays them by hand) - api_classes_baseline.json re-derived with derive_manifest.py --update-baseline (observable NOOP 201->221, REAL 340->320, etc.) - tools/tests/test_generated_files_current.py from #13500: regenerates generated files into a scratch dir and fails if checked-in copies drift Verified: generators are byte-identical to both PRs' committed content; hrr_check_sources.py all --base-sha origin/develop passes.
0811ab7 to
421a44b
Compare
…aleness test hipMallocHost and hipFreeHost have real playback handlers (MANUAL_PLAYBACK_APIS), so DESIGN.md and the api_matrix.yaml comment no longer call them no-ops. The README and tests/CMakeLists.txt comment now mention test_generated_files_current.py. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
🤖 AI-assisted pre-review (for @mangupta) Re-reviewed the updated head ( |
AlexXAmd
left a comment
There was a problem hiding this comment.
approve the CLR repo code change.
…ss guard Carry PR #13500's content over the #13472 tree: - tests/integration/hrr_api_matrix_expectations.h regenerated with derive_manifest.py + check_matrix.py --emit-cxx (48 corrected expectation lines; hipMallocHost/hipFreeHost expect=0 REAL since MANUAL_PLAYBACK_APIS replays them by hand) - api_classes_baseline.json re-derived with derive_manifest.py --update-baseline (observable NOOP 201->221, REAL 340->320, etc.) - tools/tests/test_generated_files_current.py from #13500: regenerates generated files into a scratch dir and fails if checked-in copies drift Verified: generators are byte-identical to both PRs' committed content; hrr_check_sources.py all --base-sha origin/develop passes.
TheRock Submodule Bump ActivityNewest first
|
JIRA ID : AIRUNTIME-2937
Motivation
#13004 re-added
hipKernelSetAttributeForDevicetoHipDispatchTableondevelopwithout regenerating the HRR sources. The checked-in capture and playback dispatch sources,hrr_api_args.hand the API matrix expectations no longer match the HIP headers, so theGenerated sourcescheck added in #13256 fails ondevelop. This PR regenerates them.While regenerating, the API matrix turned out to carry further drift: the checked-in
hrr_api_matrix_expectations.handapi_classes_baseline.jsonwere hand-maintained rather than regenerated, so a number of expectations no longer matched the derived classification. In particularhipMallocHost/hipFreeHostwere committed asNOOPwhile the generator derives themMANUAL/REAL(they are listed inMANUAL_PLAYBACK_APIS), which madeUnit_HRR_ApiMatrix_T2_Roundtripfail on a real GPU. That drift and the missing guard are folded in here from #13500, which this PR supersedes.Technical Details
gen_hrr_api_args.py --check-hrr-coverage. Nothing in them is edited by hand.hipKernel_targument is one of the opaque types playback cannot turn back into a live object (_UNTRANSLATED_PLAYBACK_TYPES), soplayback_defaults_to_noopapplies without listing it anywhere. Its siblinghipKernelSetAttributeis a no-op for the same reason.unreachable, groupabsent-from-sdk-headers. The SDK headers the matrix workloads compile against do not declare it, so no workload can call it.derive_manifest.py --update-baseline, thencheck_matrix.py --emit-cxx. The baseline gains one runtime API, one generated capture and one no-op replay, and the derived expectations and baseline counts are re-derived from source rather than hand-edited. Re-running both steps on this tree is a no-op; on unmodifieddevelopthey change the checked-in files, which is the drift this fixes.HRR_VERSIONgoes from 8 to 9. The new runtime slot takes the first compiler API ID and shifts the compiler IDs up by one, so a v8 reader would decode those events as the wrong API. The version history inDESIGN.mdand the generator's header comment record v9.projects/hrr/tools/tests/test_generated_files_current.pyregenerateshrr_api_args.h, both generated dispatch sources and the API matrix expectations into a scratch directory and fails if the checked-in copies differ. The matrix tests that caught the drift above are not part of the default suite, so this makes staleness fail loudly in CI instead.Issue Tracking
Fixes the
Generated sourcesfailure on #13256 that comes fromdevelop. Supersedes #13500.Test Plan
hrr_check_sources.py all --base-sha origin/develop(from ci(hrr): add the HRR CI workflow #13256), on this branch and on an unmodifieddevelop.pytest projects/hrr/tests/scriptsandpytest projects/hrr/tools/tests.gfx950,HIP_VISIBLE_DEVICES=4,5): the API matrix roundtrips T0-T5 and the full integration gate.Test Result
hrr_check_sources.py: generated sources, API-ID compatibility (8 to 9) and the API matrix all pass. Ondevelopthe generated-sources and API-matrix checks fail on this API alone.pytest projects/hrr/tests/scripts: 138 passed.pytest projects/hrr/tools/tests: 18 passed, including the two new staleness tests.HIP_VISIBLE_DEVICES=4,5(2x MI350X,gfx950), results attributable to this commit (drovr-synctree id matched): API matrix roundtrips T0-T4 pass (8 tests), T5 passes (1032 assertions), and the full integration gate reports 159 passed / 1 skipped / 0 failed.check_matrix.py --resultsreportsfail=0in every tier.check_matrix.py's analyzer exits 1 on two T5 coverage notes (hipArray3DCreate/hipArrayCreateneither exercised nor declared unreachable), and the hosthandler-testsreport a 384-byte ASan leak inside ROCr (hsaKmtCreateEventCtx) with all 220 assertions passing.Submission Checklist