Skip to content

Commit

Permalink
Don't fail on bad-alloc for large memory test.
Browse files Browse the repository at this point in the history
  • Loading branch information
alliepiper committed Apr 23, 2024
1 parent 29a24f4 commit 44329fc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cub/test/catch2_test_device_select_if.cu
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ CUB_TEST("DeviceSelect::If works with a different output type", "[device][select
}

CUB_TEST("DeviceSelect::If works for very large number of items", "[device][select_if]", offset_types)
try
{
using type = std::int64_t;
using offset_t = typename c2h::get<0, TestType>;
Expand Down Expand Up @@ -431,6 +432,10 @@ CUB_TEST("DeviceSelect::If works for very large number of items", "[device][sele
bool all_results_correct = thrust::equal(out.cbegin(), out.cend(), expected_out_it);
REQUIRE(all_results_correct == true);
}
catch (std::bad_alloc&)
{
// Exceeding memory is not a failure.
}

CUB_TEST("DeviceSelect::If works for very large number of output items", "[device][select_if]", offset_types)
{
Expand Down

0 comments on commit 44329fc

Please sign in to comment.