Skip to content

Map CUDNN_KNOB_TYPE_TILE_CGA so knob queries and explicit plans round-trip - #729

Open
brandonfzhang wants to merge 1 commit into
NVIDIA:developfrom
brandonfzhang:tile-cga-knob-mapping
Open

Map CUDNN_KNOB_TYPE_TILE_CGA so knob queries and explicit plans round-trip#729
brandonfzhang wants to merge 1 commit into
NVIDIA:developfrom
brandonfzhang:tile-cga-knob-mapping

Conversation

@brandonfzhang

@brandonfzhang brandonfzhang commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

get_knobs_for_engine() converts backend knob types into KnobType_t; a knob the mapping does not carry arrives as NOT_SET, and passing that knob back through create_execution_plan() fails convert_to_backend_knob_type with CUDNN_STATUS_INVALID_VALUE for every knob combination on that engine — so an engine reporting one unmapped knob becomes impossible to drive through the explicit-plan API at all.

CUDNN_KNOB_TYPE_TILE_CGA (id 26) is marked deprecated in the public backend enum but is still reported by some engines' knob queries. This PR:

  • adds KnobType_t::TILE_CGA and maps it in both conversion directions (knobs.h)
  • exposes the enum value to the Python bindings (properties.cpp)

The backend-side conversion uses the numeric value to avoid the deprecated-enum warning. No behavior change for graphs that never see this knob; round-tripping get_knobs_for_enginecreate_execution_plan now works on engines that report it.

Summary by CodeRabbit

  • New Features
    • Added the TILE_CGA knob type to the C++ and Python interfaces.
    • Enabled conversion of this knob type between frontend and backend representations.

…-trip

get_knobs_for_engine() converts backend knob types into KnobType_t; a knob the
mapping does not carry arrives as NOT_SET, and passing that knob back through
create_execution_plan() fails convert_to_backend_knob_type with
CUDNN_STATUS_INVALID_VALUE for every knob combination on that engine.

CUDNN_KNOB_TYPE_TILE_CGA (id 26) is deprecated in the backend enum but some
engines still report it, so any caller enumerating knobs and replaying explicit
(engine, knobs) plans loses those engines entirely. Add the mapping in both
directions and expose the enum value to the Python bindings. The numeric value
is used on the backend side to avoid the deprecated-enum warning.
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 1179bd41-9278-4a9f-828f-74a83f17ba85

📥 Commits

Reviewing files that changed from the base of the PR and between dd0df64 and 2f446b6.

📒 Files selected for processing (2)
  • include/cudnn_frontend/knobs.h
  • python/properties.cpp

Included review availability: Your plan provides up to 12 included reviews per hour; 10 remain after this review.


📝 Walkthrough

Walkthrough

The change adds TILE_CGA to the C++ and Python knob type APIs. C++ conversions map the value to backend enum value 26 in both directions.

Changes

TILE_CGA knob exposure

Layer / File(s) Summary
C++ knob contract and conversions
include/cudnn_frontend/knobs.h
The public KnobType_t enum includes TILE_CGA. Conversion functions map it to and from backend value 26.
Python knob binding
python/properties.cpp
The Python knob_type enum exposes TILE_CGA.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 2f446

This localized change enables TILE_CGA knob queries and explicit execution plans to round-trip without affecting graphs that do not use the knob. No actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: yangxu1990uiuc

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the problem, implementation, compatibility impact, and expected behavior. It omits the required checklist, affected area, related issues, and testing sections with exact comma… Complete the repository template. Add the Before submitting checklist, select an affected area, state related issues or "None", and list exact testing commands with results or explain why testing was not performed.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary change: mapping TILE_CGA so knob queries and explicit plans can round-trip.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the problem, implementation, compatibility impact, and expected behavior. It omits the required checklist, affected area, related issues, and testing sections with exact commands and results.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant