-
Notifications
You must be signed in to change notification settings - Fork 225
test: add pytest-randomly to cuda_bindings
#1267
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
base: main
Are you sure you want to change the base?
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 |
|
|
Looks like this particular CI run uncovered 3 types of errors. It seems to be — random — unsurprisingly I guess, e.g. https://github.com/NVIDIA/cuda-python/actions/runs/19505585558?pr=1268 happened to succeed, and one of the errors here was also triggered under https://github.com/NVIDIA/cuda-python/actions/runs/19505615062?pr=1269 At the initial stage introducing ? |
In practice this leads to never changing that because we'll forget about it, so we should fix the errors and then let it continue to run in a random order. The idea is to be robust to the randomness, acknowledging that this can make things seem flaky. While I don't like leaving PRs open, this one seems like it might need to be open to get to a point where it's worth merging. |
This could be exhausting, and we risk not getting this done in a reasonable timeframe. It could also be distracting in unfortunate ways, e.g. around releases.
I think we should do this in a controlled way and create a bug to track the stages, roughly:
|
|
@cpcloud there's an inherent level of statefulness in CUDA, i.e. driver initialization, context creation and setting it to be current, etc. This statefulness is also quite expensive where we absolutely can't afford to create and tear down contexts for each test for example. Is there a way we can randomize at the module or class level instead of the test level so that we can have more control over some assumptions and control some of these costs? |
Add pytest-randomly to cuda_bindings. Tests are randomized by default.
pytest-randomlydocs