Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure DeprecationWarning is not raised to cuda.core users from cuda.bindings #282

Closed
leofang opened this issue Dec 9, 2024 · 0 comments · Fixed by #404
Closed

Ensure DeprecationWarning is not raised to cuda.core users from cuda.bindings #282

leofang opened this issue Dec 9, 2024 · 0 comments · Fixed by #404
Assignees
Labels
cuda.core Everything related to the cuda.core module enhancement Any code-related improvements P1 Medium priority - Should do

Comments

@leofang
Copy link
Member

leofang commented Dec 9, 2024

We need to have a custom logic that uses the new layout if available, and fall back to the old layout. Something like this:

try:
    from cuda.bindings import driver, runtime, nvrtc
except ImportError:
    from cuda import cuda as driver
    from cuda import cudart as runtime
    from cuda import nvrtc

It's the best to centralize this logic in, say, _utils.py and have all other modules import from there.

@leofang leofang added cuda.core Everything related to the cuda.core module enhancement Any code-related improvements P1 Medium priority - Should do labels Dec 9, 2024
@leofang leofang added this to the cuda.core beta 3 milestone Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda.core Everything related to the cuda.core module enhancement Any code-related improvements P1 Medium priority - Should do
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants