Skip to content

feat(hipdnn): expose Graph::is_supported_ext() on the cuDNN compatibility shim - #11686

Merged
mousdahl-amd merged 1 commit into
developfrom
users/mousdahl-amd/hipdnn-cudnn-supported-api
Sep 4, 2026
Merged

mousdahl-amd merged 1 commit into
developfrom
users/mousdahl-amd/hipdnn-cudnn-supported-api

Conversation

@mousdahl-amd

@mousdahl-amd mousdahl-amd commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

JIRA ID: ALMIOPEN-2045

Exposes hipDNN's Graph::is_supported_ext() on the cuDNN-compatibility shim's
Graph, so hipified consumers can run the lightweight "can any engine execute this
graph?" probe without dropping to the native hipdnn_frontend API. This lands in
support of the PyTorch integration, which needs a cheap applicability check before
committing to plan creation and build. The method has no cuDNN frontend equivalent;
it is documented as a deliberate hipDNN extension rather than a compatibility
divergence.

Risk Assessment

Risk 2. Additive, header-only, and behind the opt-in HIPDNN_ENABLE_CUDNN_COMPATIBILITY
option (default OFF). No existing shim method changes behavior: the only edit to
existing code extracts the non-FALLBACK heuristic-mode warning out of
create_execution_plans into a shared private helper, byte-for-byte identical warning
text. Host-only; no kernel, dispatch, default-selection, or support-surface change.

ASIC Coverage

Arch-independent. The change forwards to an existing native method and adds host-only
unit tests driven by the mock backend; no device code, engine selection, or default
path is touched. Passing hipDNN PR CI is sufficient — both superbuild lanes configure
-DHIPDNN_ENABLE_CUDNN_COMPATIBILITY=ON, so the new tests run there. No multi-arch
sweep required.

Testing Summary

  • New unit coverage for the shim probe: supported verdict, GRAPH_NOT_SUPPORTED when
    no engine config is returned, non-FALLBACK heuristic modes accepted, owned-tensor
    validation before any backend call, recorded-setter-error propagation, and the
    node-less-graph case (supported, and left built).
  • Full frontend unit suite re-run to cover the create_execution_plans warning-helper
    extraction.
  • clang-tidy over the changed header and new TU.

Testing Checklist

  • New shim probe tests - hipdnn_frontend_tests.exe --gtest_filter='TestCudnnShimGraphSupportCheck.*' - Status: Passed (6/6)
  • All cuDNN shim tests - hipdnn_frontend_tests.exe --gtest_filter='TestCudnnShim*' - Status: Passed (157/157)
  • Full frontend unit suite - hipdnn_frontend_tests.exe - Status: Passed (2299/2299)
  • clang-tidy - clang-tidy -p build --header-filter='graph_wrapper\.h$' projects/hipdnn/frontend/tests/TestCudnnShimGraphSupportCheck.cpp - Status: Passed (0 diagnostics)
  • pre-commit - pre-commit run --files <changed> - Status: Passed
  • PR CI - GitHub PR checks - Status: Pending

Technical Changes

  • graph_wrapper.h: add error_t is_supported_ext(cudnnHandle_t, const std::vector<HeurMode_t>& = {FALLBACK}).
    Guard order matches the rest of the wrapper (mode warning -> recorded-error guard ->
    validateOwnedTensors() -> forward to the native graph). A node-less graph has
    nothing to probe and is reported supported, matching the existing check_support() /
    build_operation_graph() convention for that state.
  • Stage bookkeeping advances to OpGraphBuilt (the native call auto-builds) but never
    regresses a later stage: the probe creates no plans and invalidates none, so an
    unconditional assignment would have made a post-build_plans() probe force
    build_plan_at_index to re-create plans.
  • Extract the non-FALLBACK heuristic-mode warning into warnUnhonoredHeuristicModes(),
    now shared with create_execution_plans (the documented "modes accepted but not
    honored" divergence applies identically to the probe).
  • KNOWN_DIVERGENCES.md: new "hipDNN extensions" section documenting the method and
    that source which must also compile against real cuDNN cannot use it.
  • New TestCudnnShimGraphSupportCheck.cpp, registered under the existing
    HIPDNN_ENABLE_CUDNN_COMPATIBILITY generator expression in frontend/tests/CMakeLists.txt.

@therock-pr-bot

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

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?

@therock-pr-bot

therock-pr-bot Bot commented Sep 3, 2026

Copy link
Copy Markdown

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

@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #11686   +/-   ##
========================================
  Coverage    64.16%   64.16%           
========================================
  Files         2826     2826           
  Lines       469876   469876           
  Branches     69393    69393           
========================================
+ Hits        301460   301461    +1     
  Misses      147409   147409           
+ Partials     21007    21006    -1     
Flag Coverage Δ *Carryforward flag
TensileLite-CPP 38.59% <ø> (ø) Carriedforward from dc8655f
TensileLite-Unit 75.55% <ø> (ø) Carriedforward from dc8655f
hipBLAS 90.62% <ø> (ø) Carriedforward from dc8655f
hipBLASLt 35.22% <ø> (ø) Carriedforward from dc8655f
hipCUB 82.68% <ø> (ø) Carriedforward from dc8655f
hipDNN 86.96% <ø> (+<0.01%) ⬆️
hipFFT 42.66% <ø> (ø) Carriedforward from dc8655f
hipRAND 76.12% <ø> (ø) Carriedforward from dc8655f
hipSOLVER 68.92% <ø> (ø) Carriedforward from dc8655f
hipSPARSE 86.99% <ø> (ø) Carriedforward from dc8655f
rocBLAS 0.28% <ø> (ø) Carriedforward from dc8655f
rocFFT 51.95% <ø> (ø) Carriedforward from dc8655f
rocRAND 56.92% <ø> (ø) Carriedforward from dc8655f
rocSOLVER 76.83% <ø> (ø) Carriedforward from dc8655f
rocSPARSE 74.61% <ø> (ø) Carriedforward from dc8655f
rocThrust 91.60% <ø> (ø) Carriedforward from dc8655f

*This pull request uses carry forward flags. Click here to find out more.
see 1 file 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.

@mousdahl-amd
mousdahl-amd marked this pull request as ready for review September 3, 2026 21:54
@mousdahl-amd
mousdahl-amd requested a review from a team as a code owner September 3, 2026 21:54
@mousdahl-amd
mousdahl-amd merged commit f067901 into develop Sep 4, 2026
159 of 166 checks passed
@mousdahl-amd
mousdahl-amd deleted the users/mousdahl-amd/hipdnn-cudnn-supported-api branch September 4, 2026 02:31
@assistant-librarian

Copy link
Copy Markdown
Contributor

TheRock Submodule Bump Activity

Newest first

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