Skip to content

fix(driver): regenerate bindings, correct cuLogs* introduced version to 12.9 - #2978

Open
lijinf2 wants to merge 3 commits into
NVIDIA:mainfrom
lijinf2:pin_culogs_to_12.9
Open

lijinf2 wants to merge 3 commits into
NVIDIA:mainfrom
lijinf2:pin_culogs_to_12.9

Conversation

@lijinf2

@lijinf2 lijinf2 commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Closes #2979

Regenerated cuda_bindings driver bindings to correct cuLogs*
functions' introduced version.

Key fix

cuLogs* functions were incorrectly loaded via cuGetProcAddress_v2
with version 12080 (CUDA 12.8). They were introduced in CUDA 12.9,
so the correct version is 12090.

Affected functions:

  • cuLogsRegisterCallback
  • cuLogsUnregisterCallback
  • cuLogsCurrent
  • cuLogsDumpToFile
  • cuLogsDumpToMemory

Additional changes

Also includes accumulated cybind generator updates since the last regeneration:

  • driver.pxd: added _owner field to Cython struct wrapper classes
  • driver.pyx: minor formatting cleanup (removed redundant pass
    statements and blank lines in __init__ methods)
  • cydriver.pxd: trailing newline fix

Files changed

All files are auto-generated by cybind — do not edit manually.

@copy-pr-bot

copy-pr-bot Bot commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

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.bindings Everything related to the cuda.bindings module label Sep 30, 2026
@leofang

leofang commented Sep 30, 2026

Copy link
Copy Markdown
Member

Happens to run into this PR before closing my browser. @rwgk can correct me if I am mistaken: We should fix/merge #2953 first, which also refreshes the bindings (but without touching the cuLog* APIs).

@leofang
leofang requested a review from rwgk September 30, 2026 20:17
@lijinf2

lijinf2 commented Sep 30, 2026

Copy link
Copy Markdown
Contributor Author

Happens to run into this PR before closing my browser. @rwgk can correct me if I am mistaken: We should fix/merge #2953 first, which also refreshes the bindings (but without touching the cuLog* APIs).

I agree. This PR only wants the changes in driver_linux.pyx an driver_windows.pyx, and the number of lines is supporsed to be small.
All changes in driver.pxd, driver.pyx, cydriver.pxd belong to refresh.

@rwgk

rwgk commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Happens to run into this PR before closing my browser. @rwgk can correct me if I am mistaken: We should fix/merge #2953 first, which also refreshes the bindings (but without touching the cuLog* APIs).

I agree. This PR only wants the changes in driver_linux.pyx an driver_windows.pyx, and the number of lines is supporsed to be small. All changes in driver.pxd, driver.pyx, cydriver.pxd belong to refresh.

#2953 was merged.

General remark: it can be really useful to have

xref: cybind !<number>

in the PR description. Otherwise it can be quite a bit of detective work later to match against the cybind state. (I've been there many times.)

@mdboom mdboom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

This will also need a backport to the 12.9.x branch.

@mdboom mdboom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a regression test -- if it's too hard to actually call these functions, at least confirm that the functions don't raise a FunctionNotFoundError.

lijinf2 added a commit to lijinf2/cuda-python that referenced this pull request Oct 2, 2026
Adds test_culogs_functions_are_resolved to confirm cuLogsRegisterCallback,
cuLogsUnregisterCallback, cuLogsCurrent, cuLogsDumpToFile, and
cuLogsDumpToMemory are resolved by cuGetProcAddress_v2 and do not raise
FunctionNotFoundError, guarding against the version mismatch fixed in
this PR.

Addresses review feedback on NVIDIA#2978, closes NVIDIA#2979.
Adds test_culogs_functions_are_resolved to confirm cuLogsRegisterCallback,
cuLogsUnregisterCallback, cuLogsCurrent, cuLogsDumpToFile, and
cuLogsDumpToMemory are resolved by cuGetProcAddress_v2 and do not raise
FunctionNotFoundError, guarding against the version mismatch fixed in
this PR.

Addresses review feedback on NVIDIA#2978, closes NVIDIA#2979.
…daVersion argument (13030) exceeds the driver version (13020)
@lijinf2
lijinf2 force-pushed the pin_culogs_to_12.9 branch from fb16db6 to cdecc5f Compare October 2, 2026 18:33
@lijinf2

lijinf2 commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test cdecc5f

@lijinf2

lijinf2 commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

Happens to run into this PR before closing my browser. @rwgk can correct me if I am mistaken: We should fix/merge #2953 first, which also refreshes the bindings (but without touching the cuLog* APIs).

I agree. This PR only wants the changes in driver_linux.pyx an driver_windows.pyx, and the number of lines is supporsed to be small. All changes in driver.pxd, driver.pyx, cydriver.pxd belong to refresh.

#2953 was merged.

General remark: it can be really useful to have

xref: cybind !

in the PR description. Otherwise it can be quite a bit of detective work later to match against the cybind state. (I've been there many times.)

I was hesitating about using internal link. Linking number is a good idea.

Rebased 2953.

@lijinf2

lijinf2 commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

Let's add a regression test -- if it's too hard to actually call these functions, at least confirm that the functions don't raise a FunctionNotFoundError.

A regression test has been added to guard the functionality of cuLogs* APIs.

@lijinf2 lijinf2 added bug Something isn't working to-be-backported Trigger the bot to raise a backport PR upon merge labels Oct 2, 2026
@lijinf2

lijinf2 commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

LGTM.

This will also need a backport to the 12.9.x branch.

Added the to-be-backported label so this will be auto-cherry-picked to 12.9.x on merge.

Backport PR may hit a conflict there. Header hash could be different.

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

This branch has not been deployed

No deployments
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.bindings Everything related to the cuda.bindings module to-be-backported Trigger the bot to raise a backport PR upon merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(driver): cuLogs* functions incorrectly loaded with CUDA 12.8 version (should be 12.9)

4 participants