-
Notifications
You must be signed in to change notification settings - Fork 948
Enable reporting peak memory usage for gtests #18599
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 reporting peak memory usage for gtests #18599
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.
Really nice. Can you copy the output of the script here for posterity?
@@ -122,5 +123,8 @@ TEST_F(BinaryopPTXTest, ColumnColumnPTX) | |||
|
|||
cudf::binary_operation( | |||
lhs, rhs, ptx, cudf::data_type(cudf::type_to_id<int32_t>()), cudf::test::get_default_stream()); | |||
cudf::binary_operation(lhs, rhs, ptx, cudf::data_type(cudf::type_to_id<int64_t>())); | |||
cudf::binary_operation( | |||
lhs, rhs, ptx, cudf::data_type(cudf::type_to_id<int64_t>()), cudf::test::get_default_stream()); |
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.
Thank you for this fix! Not sure how the stream tests were passing earlier though 😕
Here is the output as of this PR
Perhaps there is a data-frame-ish library we could use to figure out how to group these appropriately for parallel processing by ctest. |
I would solve this a little differently -- perhaps more simply than the "optimal" strategy but easier to enforce. Currently we run our tests in CI with I filed PR #18603 with a proposal to run
|
Updated
This is 14GB |
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.
Re-approving C++ tests.
/merge |
Description
Enables libcudf gtests to report peak memory usage after the tests complete.
The memory peak uses the
rmm::mr::statistics_resource_adaptor
and is triggered with the environment variableGTEST_CUDF_MEMORY_PEAK
Working on this uncovered that most of the
STREAM_
based tests were not using theCUDF_TEST_PROGRAM_MAIN()
and so did not support custom parameters. Also, at least one test failed the stream check after this was corrected.The PR includes a shell script to run each test and report the peak memory for each to stdout in CSV format.
Checklist