-
Notifications
You must be signed in to change notification settings - Fork 915
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
Refactor stream mode setup for gtests #15337
Refactor stream mode setup for gtests #15337
Conversation
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.
One small nit.
* @param cmd_opts Command line options returned by parse_cudf_test_opts | ||
* @return Memory resource adaptor | ||
*/ | ||
inline auto make_stream_mode_adaptor(cxxopts::ParseResult const& cmd_opts) |
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.
I have a mild preference for actually declaring the return type here instead of using auto. Gives the caller a little more context with what's going on.
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.
Normally I prefer the return types as well. The type here is something created through templated RMM classes only to be passed back to an RMM function. This means RMM could change the type/name on us and would then require this code to be updated even though we don't actually rely on the type for anything--we don't make calls to it, we just pass it to set_current_device_resource
. The returned object then just needs to stay alive for the life of the tests. Leaving it as auto
here helps future proofs this code a bit.
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.
Nice.
/merge |
Description
Setting up the stream mode logic was duplicated in
testing_main.hpp
anderror_handing_test.cu
.Refactoring the logic will help setup for a large strings test fixture in a follow-on PR.
Checklist