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

Enable detection of undesired stream usage #12089

Merged

Conversation

vyasr
Copy link
Contributor

@vyasr vyasr commented Nov 8, 2022

Description

This PR builds on #11875 and partially addresses #11943. This PR allows us to run all tests on a precise stream (the newly introduced cudf::test::get_default_stream()) and then verify that all CUDA APIs end up invoked on that stream. This implements the feature required in #11943, but to apply it universally across libcudf will require the API changes that will expose streams so I plan to make those changes incrementally after this PR is merged.

The preload library is now compiled twice, once to overload cudf::get_default_stream and once to overload cudf::test::get_default_stream. For now there is still some manual coordination associated with determining which one should be used with a given test, but once #12451 is merged and we start running all tests via ctest instead of direct invocation of the test executables we can start encoding this information in the CMake configuration of the tests by associating the require environment variables directly with the test executable using set_tests_properties.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@vyasr vyasr added feature request New feature or request 3 - Ready for Review Ready for review by team libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change labels Nov 8, 2022
@vyasr vyasr added this to the Enable streams milestone Nov 8, 2022
@vyasr vyasr self-assigned this Nov 8, 2022
@vyasr vyasr requested review from a team as code owners November 8, 2022 00:31
@github-actions github-actions bot added the Java Affects Java cuDF API. label Mar 1, 2023
@vyasr vyasr marked this pull request as ready for review March 1, 2023 03:13
@vyasr vyasr requested a review from a team as a code owner March 1, 2023 03:13
@github-actions github-actions bot removed the Java Affects Java cuDF API. label Mar 1, 2023
ci/test_cpp.sh Show resolved Hide resolved
@vyasr
Copy link
Contributor Author

vyasr commented Mar 14, 2023

/merge

@rapids-bot rapids-bot bot merged commit 55ed347 into rapidsai:branch-23.04 Mar 14, 2023
@vyasr vyasr deleted the feature/test_non_default_stream_usage branch March 14, 2023 15:20
@vyasr vyasr mentioned this pull request Jun 2, 2023
3 tasks
rapids-bot bot pushed a commit that referenced this pull request Jun 5, 2023
For the purpose of verifying that streams are properly forwarded through all libcudf APIs, libcudf tests will be rewritten to use `cudf::test::get_default_stream()` (introduced in #12089) instead of `cudf::get_default_stream()`. By default, these are identical, so this change is typically a no-op, but when using the preload library features added in #12089 we will be able to use a custom (non CUDA-default) stream in tests and verify that it is the only stream used. This PR contains a subset of changes needed to existing test functionality without making any changes to libcudf public APIs. These changes are extracted from #12090.

Contributes to #11943.

Authors:
  - Vyas Ramasubramani (https://github.com/vyasr)

Approvers:
  - Nghia Truong (https://github.com/ttnghia)
  - Mark Harris (https://github.com/harrism)

URL: #13506
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team CMake CMake build issue feature request New feature or request libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants