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

Tests: Increase robustness of context creation testing #1096

Merged
merged 1 commit into from
Jul 28, 2023

Commits on Jul 27, 2023

  1. Tests: Increase robustness of context creation testing

    To ensure that no cuda calls occur prior to device selection, an always run method in the test suite previously used timing and a cutoff threshold to make sure a new context was being established.
    This was quite flakey, as new driver updates could improve context creation times, requiring a lower threshold.
    
    Instead, getting the current context via the driver api is used, and it should return null (or a cuda error) if no context yet exists.
    This should be a much more robust testing mechanism.
    
    This is still created per run of the test suite, regardless of if the specific test is requested or not, which is wasted time if running with a filter (one more context creation than needed, so extra time).
    
    We may wish to move this test to a separate ctest orcestrated test binary, to ensure it is the first to run (Google test has no way to enforce test order as a feature)
    ptheywood committed Jul 27, 2023
    Configuration menu
    Copy the full SHA
    3fcfb7c View commit details
    Browse the repository at this point in the history