Skip to content

fix: GdnCuTileEngine import path in cutile conftest and _pygraph error msg - #513

Merged
vedaanta merged 1 commit into
NVIDIA:developfrom
vedaanta:vagarwalla/fix-gdncutile-import
Aug 8, 2026
Merged

fix: GdnCuTileEngine import path in cutile conftest and _pygraph error msg#513
vedaanta merged 1 commit into
NVIDIA:developfrom
vedaanta:vagarwalla/fix-gdncutile-import

Conversation

@vedaanta

@vedaanta vedaanta commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Problem

test/python/linear_attention/cutile/conftest.py imports GdnCuTileEngine and KdaCuTileEngine from cudnn.engines:

from cudnn.engines import GdnCuTileEngine, KdaCuTileEngine

However these classes are only exported from cudnn.linear_attention.cutile. The cudnn.engines.__getattr__ only resolves factory names registered in its own MANIFEST (e.g. GdnEngines), not individual engine classes that live in sub-packages.

This caused all 1730 tests in test/python/linear_attention/cutile/ to fail at setup with ImportError in every nightly CI run.

python/cudnn/_pygraph.py had the same wrong path in its user-facing error message.

Fix

  • conftest.py: from cudnn.linear_attention.cutile import GdnCuTileEngine, KdaCuTileEngine
  • _pygraph.py: update example path in error message to match

Labels

cat-bugfix, mod-linear-attention, orig-internal

Summary by CodeRabbit

  • Bug Fixes
    • Updated GDN backend error messaging to reference the correct linear-attention cuTile engine location.
    • Updated cuTile and FROST test coverage to use the current linear-attention engine locations, improving validation of GDN and KDA workflows.

@coderabbitai

coderabbitai Bot commented Aug 7, 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: 5379d9b7-0216-4f3f-8bd7-5b8ba53a5943

📥 Commits

Reviewing files that changed from the base of the PR and between cabb38a and ec907d1.

📒 Files selected for processing (3)
  • test/python/linear_attention/frost/test_gdn2_prefill_kernel.py
  • test/python/linear_attention/frost/test_gdn_bprop_kernel.py
  • test/python/linear_attention/frost/test_kda_prefill_kernel.py

📝 Walkthrough

Walkthrough

The PR updates the GDN backend error and linear attention test imports to use the current cuTile and FROST engine modules.

Changes

Linear attention engine references

Layer / File(s) Summary
Align engine module references
python/cudnn/_pygraph.py, test/python/linear_attention/cutile/conftest.py
The backend error and cuTile fixture now reference engines from cudnn.linear_attention.cutile.
Add FROST engine imports
test/python/linear_attention/frost/*
FROST tests import Gdn2FrostEngine, GdnFrostEngine, and KdaFrostEngine from cudnn.linear_attention.frost.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

Suggested labels: mod-frontend, cat-cleanup, mod-frost

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 and fix, but it omits the required checklist, affected area, related issues, API impact, and exact testing results. Complete the template sections and include exact test commands with results, or explain why testing was not run.
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. 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 identifies the corrected GdnCuTileEngine import path and the related _pygraph error-message update.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@vedaanta

vedaanta commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

@cudnn-ci-bot run frost

@cudnn-ci-bot

Copy link
Copy Markdown

🚀 Running mirror pipeline

Branch: cudnn-gh/pr-513-cabb38a
Pipeline: 61624399
Targets: frost

Two related issues both causing NameError / ImportError at test setup:

1. cutile conftest (1730 errors): imported GdnCuTileEngine and
   KdaCuTileEngine from cudnn.engines, but those classes live in
   cudnn.linear_attention.cutile. cudnn.engines.__getattr__ only
   resolves factory names from its MANIFEST (e.g. GdnEngines), not
   individual engine classes from sub-packages.

2. frost kernel tests (14 errors): GdnFrostEngine, KdaFrostEngine, and
   Gdn2FrostEngine were used in isinstance assertions without any import.
   All three are lazy-exported from cudnn.linear_attention.frost.

Also update the user-facing example path in _pygraph.py to match.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@vedaanta
vedaanta force-pushed the vagarwalla/fix-gdncutile-import branch from cabb38a to ec907d1 Compare August 7, 2026 21:56
@vedaanta

vedaanta commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

@cudnn-ci-bot run frost

@cudnn-ci-bot

Copy link
Copy Markdown

🚀 Running mirror pipeline

Branch: cudnn-gh/pr-513-ec907d1
Pipeline: 61650316
Targets: frost

@vedaanta
vedaanta merged commit d1cd89f into NVIDIA:develop Aug 8, 2026
1 check passed
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.

3 participants