Skip to content

Fix missing binding version checks alongside driver version checks#2054

Merged
leofang merged 1 commit intoNVIDIA:mainfrom
leofang:fix-missing-binding-version-checks
May 8, 2026
Merged

Fix missing binding version checks alongside driver version checks#2054
leofang merged 1 commit intoNVIDIA:mainfrom
leofang:fix-missing-binding-version-checks

Conversation

@leofang
Copy link
Copy Markdown
Member

@leofang leofang commented May 8, 2026

Summary

Fixes #2052. Audited all version checks introduced by #1825 and found two additional source-level instances (plus one test helper) where only the driver version was checked but the binding version was not.

When cuda-bindings is older than the CUDA driver, the driver version gate passes but the corresponding binding attribute/symbol is absent, causing AttributeError (Python-level) or similar failures (Cython-level).

  • graph/_subclasses.pyx: _check_node_get_params() now also checks binding_version() >= (13, 2, 0) (the bug reported in [BUG]: _has_cuGraphNodeGetParams check missed the binding version check #2052)
  • _module.pyx: _get_arguments_info() now also checks cy_binding_version() >= (12, 4, 0) (gates cuKernelGetParamInfo, exposed via Kernel.num_arguments / Kernel.arguments_info)
  • tests/graph/test_graph_definition.py: _driver_has_node_get_params() renamed to _has_node_get_params() and checks both versions

Test plan

  • Verify existing tests pass (no functional change when driver and bindings are at the same version)
  • With bindings 13.1 + driver 13.2: conditional node reconstruction should gracefully fall back to ConditionalNode instead of crashing
  • With bindings < 12.4 + driver >= 12.4: Kernel.num_arguments should raise NotImplementedError instead of crashing

Two source locations and one test helper only checked the driver version
when gating features that also require the corresponding cuda-bindings
version.  When bindings are older than the driver, the driver check passes
but the binding attribute/symbol is missing, causing AttributeError or
similar runtime failures.

- graph/_subclasses.pyx: _check_node_get_params() now also checks
  binding_version() >= (13, 2, 0)
- _module.pyx: _get_arguments_info() now also checks
  cy_binding_version() >= (12, 4, 0)
- tests/graph/test_graph_definition.py: _driver_has_node_get_params()
  renamed to _has_node_get_params() and checks both versions

Closes NVIDIA#2052
@copy-pr-bot
Copy link
Copy Markdown
Contributor

copy-pr-bot Bot commented May 8, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions Bot added the cuda.core Everything related to the cuda.core module label May 8, 2026
@leofang
Copy link
Copy Markdown
Member Author

leofang commented May 8, 2026

/ok to test 8e7bbac

@leofang leofang added bug Something isn't working P0 High priority - Must do! labels May 8, 2026
@leofang leofang added this to the cuda.core v1.0.0 milestone May 8, 2026
@github-actions

This comment has been minimized.

@leofang leofang requested review from Andy-Jost, mdboom and rparolin May 8, 2026 14:56
@leofang leofang self-assigned this May 8, 2026
@Andy-Jost
Copy link
Copy Markdown
Contributor

Andy-Jost commented May 8, 2026

We should add rules such as "always check both the driver and bindings version for feature gates" to a place where agents can find them. I don't know whether AGENTS.md is the right place, but we should collect these somewhere.

@leofang leofang enabled auto-merge (squash) May 8, 2026 21:45
@leofang leofang merged commit 41555d7 into NVIDIA:main May 8, 2026
443 of 541 checks passed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

Doc Preview CI
Preview removed because the pull request was closed or merged.

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

Labels

bug Something isn't working cuda.core Everything related to the cuda.core module P0 High priority - Must do!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: _has_cuGraphNodeGetParams check missed the binding version check

2 participants