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

Attempt to address oom failures in test suite #1672

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

wence-
Copy link
Contributor

@wence- wence- commented Sep 6, 2024

Description

Audit the existing MR tests and serialize those that make large allocations (specifically, a pool with 90% of the available device memory). This also allows us to remove serialization from some of the tests which don't make large allocations.

Checklist

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

Audit the existing MR tests and serialize those that make large
allocations (specifically, a pool with 90% of the available device
memory). This also allows us to remove serialization from some of the
tests which don't make large allocations.
@github-actions github-actions bot added CMake cpp Pertains to C++ code labels Sep 6, 2024
@wence- wence- added non-breaking Non-breaking change improvement Improvement / enhancement to an existing function labels Sep 6, 2024
Copy link
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for auditing the test suite and finding the root causes! I have one suggestion for us to refactor/simplify the arena test.

@@ -125,7 +125,7 @@ ConfigureTest(DEVICE_MR_REF_TEST mr/device/mr_ref_tests.cpp
ConfigureTest(ADAPTOR_TEST mr/device/adaptor_tests.cpp)

# pool mr tests
ConfigureTest(POOL_MR_TEST mr/device/pool_mr_tests.cpp GPUS 1 PERCENT 60)
ConfigureTest(POOL_MR_TEST mr/device/pool_mr_tests.cpp GPUS 1 PERCENT 100)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: Large allocation occurs here:

auto const ninety_percent_pool = rmm::percent_of_free_device_memory(90);

@@ -182,7 +182,7 @@ ConfigureTest(PREFETCH_TEST prefetch_tests.cpp)
ConfigureTest(LOGGER_TEST logger_tests.cpp)

# arena MR tests
ConfigureTest(ARENA_MR_TEST mr/device/arena_mr_tests.cpp GPUS 1 PERCENT 60)
ConfigureTest(ARENA_MR_TEST mr/device/arena_mr_tests.cpp GPUS 1 PERCENT 100)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: Large allocation occurs here:

TEST_F(ArenaTest, AllocateNinetyPercent) // NOLINT
{
EXPECT_NO_THROW([]() { // NOLINT(cppcoreguidelines-avoid-goto)
auto const free = rmm::available_device_memory().first;
auto const ninety_percent = rmm::align_up(
static_cast<std::size_t>(static_cast<double>(free) * 0.9), rmm::CUDA_ALLOCATION_ALIGNMENT);
arena_mr mr(rmm::mr::get_current_device_resource(), ninety_percent);
}());
}

We should refactor this test to use rmm::percent_of_free_device_memory. I think the only difference is whether it uses rmm::align_up vs. rmm::align_down, but that seems unimportant here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll do this one separately.

@harrism
Copy link
Member

harrism commented Sep 6, 2024

Thanks @wence- !

@wence- wence- marked this pull request as ready for review September 9, 2024 13:25
@wence- wence- requested a review from a team as a code owner September 9, 2024 13:25
@wence-
Copy link
Contributor Author

wence- commented Sep 9, 2024

/merge

@rapids-bot rapids-bot bot merged commit 1e5fa03 into rapidsai:branch-24.10 Sep 9, 2024
57 checks passed
@wence- wence- deleted the wence/fix/1671 branch September 9, 2024 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CMake cpp Pertains to C++ code improvement Improvement / enhancement to an existing function non-breaking Non-breaking change
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[BUG] Flaky tests
3 participants