Skip to content

[12.9.x] Manual backport of #3308: lock the global callback map - #3376

Open
lijinf2 wants to merge 3 commits into
NVIDIA:12.9.xfrom
lijinf2:backport-3308-12.9
Open

lijinf2 wants to merge 3 commits into
NVIDIA:12.9.xfrom
lijinf2:backport-3308-12.9

Conversation

@lijinf2

@lijinf2 lijinf2 commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

close #3282

Manual backport of #3308 to 12.9.x.

The callback registry shared by cuLogsRegisterCallback and cuDeviceRegisterAsyncNotification was not thread-safe. This adds locking so concurrent register/unregister works correctly.

@copy-pr-bot

copy-pr-bot Bot commented Nov 5, 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.

@lijinf2 lijinf2 self-assigned this Nov 5, 2026
@lijinf2
lijinf2 requested a review from mdboom November 5, 2026 02:29
@lijinf2 lijinf2 added the bug Something isn't working label Nov 5, 2026
@lijinf2 lijinf2 added this to the cuda.bindings 13.5.0 & 12.9.10 milestone Nov 5, 2026
@lijinf2 lijinf2 added the cuda.bindings Everything related to the cuda.bindings module label Nov 5, 2026
@lijinf2

lijinf2 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 24eeaf5

@lijinf2

lijinf2 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Hi Mike, could you review this 12.9.x backport of #3308 (global callback map lock)?

@mdboom

mdboom commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Did you generate this from cybind? Generated files should always be handled that way to avoid things getting out of sync. It doesn't look like it updated the hash at the top of the file.

@lijinf2

lijinf2 commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

Did you generate this from cybind? Generated files should always be handled that way to avoid things getting out of sync. It doesn't look like it updated the hash at the top of the file.

@mdboom It's not generated, for two reasons: (1) 12.9.x uses a Tempita template (runtime.pyx.in), and I'm not sure how cybind can still produce that; (2) regenerating changes far more lines than this PR does, which would make it hard to review.

I updated the hash with grep -v 'CYTHON-BINDINGS-GENERATED' runtime.pyx.in | sha256sum and committed it. But please let me know if you'd still prefer going through cybind. If so, could you point me to how to generate the Tempita (.pyx.in) files with it?

@lijinf2

lijinf2 commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 86320d7

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants