-
Notifications
You must be signed in to change notification settings - Fork 228
test: replace cuda driver, device, and context setup with fixtures where relevant #1293
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
Conversation
|
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. |
|
/ok to test |
This comment has been minimized.
This comment has been minimized.
54dc267 to
ca10214
Compare
|
/ok to test |
|
|
||
| @pytest.fixture(scope="module") | ||
| def cuda_driver(): | ||
| (err,) = cuda.cuInit(0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW cuInit cannot be undone once it's called. Might as well make it scope='session'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, I will put up a follow-up for that in a bit.
|
|
LGTM too! Thanks, Phillip! |
|
This should help us be more confident about pytest-randomly usage inside cuda-bindings. I will look into factoring out fixtures where possible in cuda-core as well. |
Factor out repetitive cuda setup in
cuda_bindingsinto pytest fixtures.