feat(kpack): add hipkernelprovider per-arch split handler (AICK-1616)#8347
feat(kpack): add hipkernelprovider per-arch split handler (AICK-1616)#8347BrianHarrisonAMD wants to merge 4 commits into
Conversation
✅ All Policy Checks Passed
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🚫 Please fix the failed policies before requesting reviews. The following policy checks failed:
The |
hipKernelProvider engines lay out ISA-specific content with the architecture as a directory component under the provider's install tree. Today that is the rocKE engine's ahead-of-time kernel bundles -- a per-arch kpack archive + JSON bundle manifest under `.../hip_kernel_provider/rocke/<arch>/`. These are ISA-specific, not arch-neutral, so the hipkernelprovider artifact must be split per-arch (TheRock topology flips it to target-specific with `split_databases = ["hipkernelprovider"]`). Add HipKernelProviderRockeHandler, registered as "hipkernelprovider". Detection keys on the arch *directory* under `hip_kernel_provider/` (not file names or extensions), so any future per-arch content (e.g. heuristic model files) routes automatically by being dropped into an arch directory -- no handler change needed. Mirrors AotritonHandler's path-component style and reuses the shared _GFX_ARCH_PATTERN. Unit tests cover the kpack, the JSON manifest, deeply nested files, alternate (non-rocke) engine subdirs, multiple arches, xnack, and rejection of non-arch dirs, the bare arch dir, provider content with no arch dir, paths without a hip_kernel_provider parent, and out-of-prefix paths.
d4f09e4 to
1953185
Compare
There was a problem hiding this comment.
Pull request overview
Adds a new kpack “database” split handler to route hipKernelProvider (rocKE) ISA-specific files into per-architecture artifacts, aligning hipKernelProvider behavior with existing per-arch splitting conventions used for other ROCm components.
Changes:
- Introduces
HipKernelProviderRockeHandlerthat detects the firstgfx*architecture directory underhip_kernel_provider/and uses it as the split key. - Registers the new handler under the name
hipkernelproviderin the handler registry. - Adds comprehensive unit tests covering positive/negative path cases, multiple arches, and xnack variants.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| shared/kpack/python/rocm_kpack/database_handlers.py | Adds and registers HipKernelProviderRockeHandler with directory-based arch detection under hip_kernel_provider/. |
| shared/kpack/tests/test_database_handlers.py | Adds unit tests for the new handler and updates registry tests to include it. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ontainer The rocKE AOT bundles moved under a generic per-arch container engines/arch_content/<engine>/<arch>/ (rocke now, aiter/asm later) so the former engines/hip_kernel_provider/rocke/ directory no longer shadows the hip_kernel_provider plugin file from hipDNN's loader. Anchor the per-arch split detection on the arch_content directory component (not the engine name), so any engine's per-arch content routes with no handler change. The rocKE authoring SDK tree (hip_kernel_provider/rocke/) is no longer under the anchor and ships generic. JIRA ID : AICK-1616
5514a2f to
e0fff50
Compare
Summary
Adds a kpack artifact-split handler for the hipKernelProvider so its per-arch
content splits into per-arch artifacts, matching the convention used by rocBLAS,
hipBLASLt, MIOpen, and AOTriton.
The rocKE engine ships ISA-specific content with the arch as a directory under the
provider tree (
.../hip_kernel_provider/rocke/<arch>/): a kpack archive, its JSONbundle manifest, and kernel-selection heuristics.
HipKernelProviderRockeHandlerroutes any file under an arch directory below
hip_kernel_provider/to that arch,so the whole per-arch bundle travels together. Registered as
hipkernelprovider.Inert until an artifact's
split_databasesnames the handler, which only TheRockdoes once its
rocm-systemsgitlink includes this commit.Merge order
Testing
shared/kpack/tests/test_database_handlers.py: 87 pass (kpack, JSON sidecar,nested files, non-rocke subdirs, multiple arches, xnack, negative cases).
ArtifactSplitterrun: per-arch bundles route to their arch, thehost
.sostays generic, and a rocKE-disabled build yields generic-only.JIRA ID : AICK-1616