Skip to content

feat(hip-kernel-provider): dispatch packaged gfx950 rocKE convolutions through hipDNN - #12476

Closed
aledudek wants to merge 2 commits into
developfrom
users/aledudek/gfx950-conv-ingestor
Closed

aledudek wants to merge 2 commits into
developfrom
users/aledudek/gfx950-conv-ingestor

Conversation

@aledudek

@aledudek aledudek commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

ISSUE ID: AICK-2048

Motivation

Adds hipkernel:Gfx950ConvFwd, a kernel-ingestor engine that serves rocKE's implicit-GEMM forward convolution from a build-time kpack archive. hipDNN matches a graph against the compiled catalog and launches the chosen kernel; the installed runtime loads the archive without Python.

Technical Details

Contract: plain 2D forward cross-correlation, groups=1, dense channels-last FP16/BF16 storage, FP32 accumulation, symmetric padding. Grouped, 3D, fused and channels-first convolutions are rejected, not silently mishandled.

The catalog ships 122 compiled variants for 61 requests: every request carries both tile_k arms, so the engine's benchmarked selection has a real choice on all of them rather than only on the verification shapes. Descriptors are generated from configs/gfx950_conv_fwd_wide.yaml; the narrow single-arm config is retained alongside it.

benchmark_conv_integration.py gains the ability to run a packaged request in auto and reuse modes, so a first run can rank every candidate and record a winner, and a second process can serve that winner without re-searching. Previously only its built-in smoke graph could do this.

Test Plan and results

Verified on (gfx950): 11/11 installed integration cases, 61/61 requests completing the tune-then-reuse cycle with the recorded winner preserved across processes, and independent PyTorch correctness on both the hipDNN and direct rocKE paths for every case.

Building Note

Build note, not fixed here: on a host with a distro hip-dev package installed,
hipcc searches /usr/include before ROCm's include directory, so /usr/include/hip
shadows /opt/rocm/include/hip and every HIP kernel hkp_pack compiles fails with
"use of undeclared identifier '__AMDGCN_WAVEFRONT_SIZE'". This affects the
provider's own test descriptors, not this integration's rocKE kernels, which are
compiled through comgr. Adding -I/opt/rocm/include does NOT help: it resolves to
the same realpath as an entry already in the search list, so clang deduplicates
it and keeps the later position. Point HKP_HIPCC at a wrapper that passes -I to
a directory containing only a 'hip' symlink, which is a distinct path clang will
not fold away.

Submission Checklist

…s through hipDNN

Adds hipkernel:Gfx950ConvFwd, a kernel-ingestor engine that serves rocKE's
implicit-GEMM forward convolution from a build-time kpack archive. hipDNN
matches a graph against the compiled catalog and launches the chosen kernel;
the installed runtime loads the archive without Python.

Contract: plain 2D forward cross-correlation, groups=1, dense channels-last
FP16/BF16 storage, FP32 accumulation, symmetric padding. Grouped, 3D, fused
and channels-first convolutions are rejected, not silently mishandled.

The catalog ships 122 compiled variants for 61 requests: every request carries
both tile_k arms, so the engine's benchmarked selection has a real choice on
all of them rather than only on the verification shapes. Descriptors are
generated from configs/gfx950_conv_fwd_wide.yaml; the narrow single-arm config
is retained alongside it.

benchmark_conv_integration.py gains the ability to run a packaged request in
auto and reuse modes, so a first run can rank every candidate and record a
winner, and a second process can serve that winner without re-searching.
Previously only its built-in smoke graph could do this.

Verified on (gfx950): 11/11 installed integration cases, 61/61 requests
completing the tune-then-reuse cycle with the recorded winner preserved across
processes, and independent PyTorch correctness on both the hipDNN and direct
rocKE paths for every case.
…ent develop

The integration was authored against an ancestor of the ingestor tooling and
did not build once that tooling landed. Four changes, no behaviour change:

- Drop the retired 'delegates_to_existing_plan' key and declare the
  'specialization' block the packer now requires. The builder's spec consumes
  all 27 metadata fields, so every one is bound and none are matcher-only.
  Regenerating adds provenance.specialization_contract; all 122 descriptor
  identities are retained.
- Port the native pack to the current IngestorKernelCode: a module belongs to
  the device it loaded on, so resolve the kernel per launch stream, set launch
  geometry on the code itself, and declare the kernel ABI the loader verifies.
- Follow rocKE's move of conv_implicit_gemm from rocke.instances.common to
  kernels.common, in the builder and in the benchmark probe.

Verified on MI350X (gfx950): 11/11 engine-pinned integration cases, 61/61
requests completing the tune-then-reuse cycle, and independent PyTorch
correctness on both the hipDNN and direct rocKE paths for all 122 processes.

Build note, not fixed here: on a host with a distro hip-dev package installed,
hipcc searches /usr/include before ROCm's include directory, so /usr/include/hip
shadows /opt/rocm/include/hip and every HIP kernel hkp_pack compiles fails with
"use of undeclared identifier '__AMDGCN_WAVEFRONT_SIZE'". This affects the
provider's own test descriptors, not this integration's rocKE kernels, which are
compiled through comgr. Adding -I/opt/rocm/include does NOT help: it resolves to
the same realpath as an entry already in the search list, so clang deduplicates
it and keeps the later position. Point HKP_HIPCC at a wrapper that passes -I to
a directory containing only a 'hip' symlink, which is a distinct path clang will
not fold away.
@therock-pr-bot

therock-pr-bot Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

✅ All Checks Passed — Ready for Review

Check Status Details
📝 PR Description ✅ Pass —
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ✅ Pass —
🔎 pre-commit ✅ Pass —
🚫 Draft PR 🔜 To Be Enabled —
🚩 Feature Flag 🔜 To Be Enabled —
📊 Code Coverage 🔜 To Be Enabled —
🤖 therock-pr-bot ✅ Pass —

🎉 All checks passed! This PR is ready for review.

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

🙋 Wish to Override Policy?

@therock-pr-bot

Copy link
Copy Markdown

🎉 All checks passed! This PR is ready for review.

@codecov

codecov Bot commented Sep 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #12476   +/-   ##
========================================
  Coverage    70.24%   70.24%           
========================================
  Files         2933     2933           
  Lines       482116   482116           
  Branches     69508    69508           
========================================
  Hits        338628   338628           
  Misses      119199   119199           
  Partials     24289    24289           
Flag Coverage Δ *Carryforward flag
TensileLite-CPP 48.80% <ø> (ø) Carriedforward from 5911365
TensileLite-Unit 77.49% <ø> (ø) Carriedforward from 5911365
hipBLAS 90.62% <ø> (ø) Carriedforward from 5911365
hipBLASLt 35.28% <ø> (ø) Carriedforward from 5911365
hipCUB 82.68% <ø> (ø) Carriedforward from 5911365
hipDNN 86.94% <ø> (ø)
hipFFT 54.32% <ø> (ø) Carriedforward from 5911365
hipRAND 76.12% <ø> (ø) Carriedforward from 5911365
hipSOLVER 68.96% <ø> (ø) Carriedforward from 5911365
hipSPARSE 86.99% <ø> (ø) Carriedforward from 5911365
rocBLAS 48.31% <ø> (ø) Carriedforward from 5911365
rocFFT 52.36% <ø> (ø) Carriedforward from 5911365
rocRAND 57.42% <ø> (ø) Carriedforward from 5911365
rocSOLVER 76.83% <ø> (ø) Carriedforward from 5911365
rocSPARSE 74.76% <ø> (ø) Carriedforward from 5911365
rocThrust 78.34% <ø> (ø) Carriedforward from 5911365

*This pull request uses carry forward flags. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aledudek

Copy link
Copy Markdown
Contributor Author

Closing - moved to #12780

@aledudek
aledudek deleted the users/aledudek/gfx950-conv-ingestor branch October 1, 2026 15:41
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.

1 participant