Skip to content

fix(hipdnn): handle default streams in kpack launches (ALMIOPEN-2506) - #12015

Merged
BrianHarrisonAMD merged 3 commits into
users/ggilbert/ALMIOPEN-2506/kpack-runtime-followupfrom
users/bharriso/pr11392-device-details-cache
Sep 13, 2026
Merged

fix(hipdnn): handle default streams in kpack launches (ALMIOPEN-2506)#12015
BrianHarrisonAMD merged 3 commits into
users/ggilbert/ALMIOPEN-2506/kpack-runtime-followupfrom
users/bharriso/pr11392-device-details-cache

Conversation

@BrianHarrisonAMD

@BrianHarrisonAMD BrianHarrisonAMD commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes default-stream handling along the public hipDNN backend -> kernel-ingestor -> packed-kernel execution path found during review of #11392. This draft targets that PR's branch so the fix can be incorporated before it merges.

JIRA ID: ALMIOPEN-2506 (ticket)

Risk Assessment

2 / 5 - narrow stream-classification changes. Null, legacy, and per-thread defaults resolve through the live current device during preparation and bypass concrete-stream ownership queries at launch. Concrete-stream validation, module-device binding/restoration, and the existing per-device properties cache remain intact. No compute kernels, public APIs, or CMake behavior change.

ASIC Coverage

Verified on gfx942 (two MI300X GPUs, then one visible GPU) and gfx950 (one MI355X). This is focused packed-pointwise coverage, not every engine, graph shape, or Windows configuration.

Testing Summary

Built the real backend/provider and packed fixtures with the ingestor and its existing rocKE dependency enabled.

Configuration Passed Expected cross-device skips
gfx942, two GPUs 87 0
gfx942, one visible GPU 82 5
gfx950, one GPU 82 5

All three public default-stream cases selected the packed engine and matched the CPU reference. Ordinary-stream and broken-archive controls passed. SLURM jobs: 67931487 and 67931512.

Testing Checklist

  • Scoped pre-commit checks on all eight PR files.
  • Backend device/logging tests (hipdnn_backend_tests, scoped filters).
  • Resolver and launch suites (hip_kernel_provider_tests; *TestHandleDeviceResolver* and *TestProgram*:*TestKernel*).
  • Public packed-graph suite (hip_kernel_provider_integration_tests --gtest_filter='*IntegrationGpuKernelIngestorKpack*').
  • PR CI for the updated head.

Technical Changes

  • Recognize default tokens before device-ownership queries in backend logging, backend heuristics, the ingestor resolver, and packed launches.
  • Add live-device resolver and public packed-graph regressions; retain launch output/restoration and rejection coverage.

Allocation bounds inside archive extraction and path-replacement races remain outside this fix; post-extraction checks and observed-link rejection do not eliminate those limitations.

@codecov

codecov Bot commented Sep 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ugin_sdk/include/hipdnn_plugin_sdk/DeviceQuery.hpp 91.67% 1 Missing ⚠️
Additional details and impacted files
@@                                   Coverage Diff                                   @@
##           users/ggilbert/ALMIOPEN-2506/kpack-runtime-followup   #12015      +/-   ##
=======================================================================================
- Coverage                                                87.02%   87.01%   -0.02%     
=======================================================================================
  Files                                                      456      457       +1     
  Lines                                                    61683    61711      +28     
  Branches                                                  9084     9088       +4     
=======================================================================================
+ Hits                                                     53678    53693      +15     
- Misses                                                    5072     5082      +10     
- Partials                                                  2933     2936       +3     
Flag Coverage Δ
hipDNN 87.01% <93.33%> (-0.02%) ⬇️
Files with missing lines Coverage Δ
...hipdnn/backend/src/heuristics/DeviceProperties.cpp 84.21% <100.00%> (+0.43%) ⬆️
...hipdnn/backend/src/heuristics/DeviceProperties.hpp 100.00% <ø> (ø)
projects/hipdnn/backend/src/logging/Logging.cpp 92.19% <100.00%> (ø)
...ugin_sdk/include/hipdnn_plugin_sdk/DeviceQuery.hpp 62.96% <91.67%> (ø)

... and 2 files with indirect coverage changes

🚀 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.

Centralize default-token classification and raw HIP device lookup in the plugin SDK while preserving caller-specific error, cache, and module-binding policies.

Add live-current-device and concrete-owner regressions, and fix StreamKind enum naming for clang-tidy.

Verified focused gfx942 and gfx950 cases, SDPA compilation, provider header consumers, scoped hooks, and clang-tidy.
@BrianHarrisonAMD
BrianHarrisonAMD marked this pull request as ready for review September 13, 2026 22:17
@BrianHarrisonAMD
BrianHarrisonAMD requested review from a team as code owners September 13, 2026 22:17
@BrianHarrisonAMD
BrianHarrisonAMD merged commit 5f8788e into users/ggilbert/ALMIOPEN-2506/kpack-runtime-followup Sep 13, 2026
61 checks passed
@BrianHarrisonAMD
BrianHarrisonAMD deleted the users/bharriso/pr11392-device-details-cache branch September 13, 2026 22:38
BrianHarrisonAMD added a commit that referenced this pull request Sep 13, 2026
…#12015)

## Summary
Fixes default-stream handling along the public hipDNN backend ->
kernel-ingestor -> packed-kernel execution path found during review of
#11392. This draft targets that PR's branch so the fix can be
incorporated before it merges.

JIRA ID: ALMIOPEN-2506
([ticket](https://amd-hub.atlassian.net/browse/ALMIOPEN-2506))

## Risk Assessment
**2 / 5** - narrow stream-classification changes. Null, legacy, and
per-thread defaults resolve through the live current device during
preparation and bypass concrete-stream ownership queries at launch.
Concrete-stream validation, module-device binding/restoration, and the
existing per-device properties cache remain intact. No compute kernels,
public APIs, or CMake behavior change.

## ASIC Coverage
Verified on gfx942 (two MI300X GPUs, then one visible GPU) and gfx950
(one MI355X). This is focused packed-pointwise coverage, not every
engine, graph shape, or Windows configuration.

## Testing Summary
Built the real backend/provider and packed fixtures with the ingestor
and its existing rocKE dependency enabled.

| Configuration | Passed | Expected cross-device skips |
|---|---:|---:|
| gfx942, two GPUs | 87 | 0 |
| gfx942, one visible GPU | 82 | 5 |
| gfx950, one GPU | 82 | 5 |

All three public default-stream cases selected the packed engine and
matched the CPU reference. Ordinary-stream and broken-archive controls
passed. SLURM jobs: 67931487 and 67931512.

## Testing Checklist
- [x] Scoped pre-commit checks on all eight PR files.
- [x] Backend device/logging tests (`hipdnn_backend_tests`, scoped
filters).
- [x] Resolver and launch suites (`hip_kernel_provider_tests`;
`*TestHandleDeviceResolver*` and `*TestProgram*:*TestKernel*`).
- [x] Public packed-graph suite (`hip_kernel_provider_integration_tests
--gtest_filter='*IntegrationGpuKernelIngestorKpack*'`).
- [ ] PR CI for the updated head.

## Technical Changes
- Recognize default tokens before device-ownership queries in backend
logging, backend heuristics, the ingestor resolver, and packed launches.
- Add live-device resolver and public packed-graph regressions; retain
launch output/restoration and rejection coverage.

Allocation bounds inside archive extraction and path-replacement races
remain outside this fix; post-extraction checks and observed-link
rejection do not eliminate those limitations.
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