Skip to content

Conversation

@mdboom
Copy link
Contributor

@mdboom mdboom commented Sep 23, 2025

This is applying the same trick in #894 to the cybind-generated bindings.

Essentially, by inlining the boolean check in every call, we can avoid the much more expensive call through a C function pointer on every single API call.

@copy-pr-bot
Copy link
Contributor

copy-pr-bot bot commented Sep 23, 2025

Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@mdboom
Copy link
Contributor Author

mdboom commented Sep 23, 2025

/ok to test

@github-actions

This comment has been minimized.

@mdboom mdboom enabled auto-merge (squash) September 23, 2025 17:15
@mdboom mdboom merged commit d2978aa into NVIDIA:main Sep 23, 2025
70 checks passed
@github-actions
Copy link

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

Comment on lines 98 to 99
if __py_nvjitlink_init:
return 0
Copy link
Member

Choose a reason for hiding this comment

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

btw internally we dropped these two lines

@leofang
Copy link
Member

leofang commented Oct 9, 2025

For posterity, this PR was backported as part of #1044.

@leofang leofang added enhancement Any code-related improvements cuda.bindings Everything related to the cuda.bindings module labels Oct 9, 2025
@leofang leofang added this to the cuda-python 13.0.2 & 12.9.3 milestone Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda.bindings Everything related to the cuda.bindings module enhancement Any code-related improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants