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 groupby std and variance aggregation types in libcudf Debug build #12799

Merged
merged 5 commits into from
Feb 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions cpp/src/groupby/sort/group_std.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2022, NVIDIA CORPORATION.
* Copyright (c) 2019-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -99,9 +99,6 @@ struct var_functor {
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr)
{
// Running this in debug build causes a runtime error:
// `reduce_by_key failed on 2nd step: invalid device function`
#if !defined(__CUDACC_DEBUG__)
using ResultType = cudf::detail::target_type_t<T, aggregation::Kind::VARIANCE>;

std::unique_ptr<column> result = make_numeric_column(data_type(type_to_id<ResultType>()),
Expand Down Expand Up @@ -141,9 +138,6 @@ struct var_functor {
});

return result;
#else
CUDF_FAIL("Groupby std/var supported in debug build");
#endif
}

template <typename T, typename... Args>
Expand Down
28 changes: 0 additions & 28 deletions cpp/tests/groupby/std_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,7 @@ using supported_types = cudf::test::Types<int8_t, int16_t, int32_t, int64_t, flo

TYPED_TEST_SUITE(groupby_std_test, supported_types);

#ifdef NDEBUG // currently groupby std tests are not supported in debug
TYPED_TEST(groupby_std_test, basic)
#else
TYPED_TEST(groupby_std_test, DISABLED_basic)
#endif
{
using K = int32_t;
using V = TypeParam;
Expand All @@ -57,11 +53,7 @@ TYPED_TEST(groupby_std_test, DISABLED_basic)
test_single_agg(keys, vals, expect_keys, expect_vals, std::move(agg));
}

#ifdef NDEBUG // currently groupby std tests are not supported in debug
TYPED_TEST(groupby_std_test, empty_cols)
#else
TYPED_TEST(groupby_std_test, DISABLED_empty_cols)
#endif
{
using K = int32_t;
using V = TypeParam;
Expand All @@ -77,11 +69,7 @@ TYPED_TEST(groupby_std_test, DISABLED_empty_cols)
test_single_agg(keys, vals, expect_keys, expect_vals, std::move(agg));
}

#ifdef NDEBUG // currently groupby std tests are not supported in debug
TYPED_TEST(groupby_std_test, zero_valid_keys)
#else
TYPED_TEST(groupby_std_test, DISABLED_zero_valid_keys)
#endif
{
using K = int32_t;
using V = TypeParam;
Expand All @@ -97,11 +85,7 @@ TYPED_TEST(groupby_std_test, DISABLED_zero_valid_keys)
test_single_agg(keys, vals, expect_keys, expect_vals, std::move(agg));
}

#ifdef NDEBUG // currently groupby std tests are not supported in debug
TYPED_TEST(groupby_std_test, zero_valid_values)
#else
TYPED_TEST(groupby_std_test, DISABLED_zero_valid_values)
#endif
{
using K = int32_t;
using V = TypeParam;
Expand All @@ -117,11 +101,7 @@ TYPED_TEST(groupby_std_test, DISABLED_zero_valid_values)
test_single_agg(keys, vals, expect_keys, expect_vals, std::move(agg));
}

#ifdef NDEBUG // currently groupby std tests are not supported in debug
TYPED_TEST(groupby_std_test, null_keys_and_values)
#else
TYPED_TEST(groupby_std_test, DISABLED_null_keys_and_values)
#endif
{
using K = int32_t;
using V = TypeParam;
Expand All @@ -142,11 +122,7 @@ TYPED_TEST(groupby_std_test, DISABLED_null_keys_and_values)
test_single_agg(keys, vals, expect_keys, expect_vals, std::move(agg));
}

#ifdef NDEBUG // currently groupby std tests are not supported in debug
TYPED_TEST(groupby_std_test, ddof_non_default)
#else
TYPED_TEST(groupby_std_test, DISABLED_ddof_non_default)
#endif
{
using K = int32_t;
using V = TypeParam;
Expand All @@ -167,11 +143,7 @@ TYPED_TEST(groupby_std_test, DISABLED_ddof_non_default)
test_single_agg(keys, vals, expect_keys, expect_vals, std::move(agg));
}

#ifdef NDEBUG // currently groupby std tests are not supported in debug
TYPED_TEST(groupby_std_test, dictionary)
#else
TYPED_TEST(groupby_std_test, DISABLED_dictionary)
#endif
{
using K = int32_t;
using V = TypeParam;
Expand Down
28 changes: 0 additions & 28 deletions cpp/tests/groupby/var_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,7 @@ using supported_types = cudf::test::Types<int8_t, int16_t, int32_t, int64_t, flo

TYPED_TEST_SUITE(groupby_var_test, supported_types);

#ifdef NDEBUG
TYPED_TEST(groupby_var_test, basic)
#else
TYPED_TEST(groupby_var_test, DISABLED_basic)
#endif
{
using K = int32_t;
using V = TypeParam;
Expand All @@ -57,11 +53,7 @@ TYPED_TEST(groupby_var_test, DISABLED_basic)
test_single_agg(keys, vals, expect_keys, expect_vals, std::move(agg));
}

#ifdef NDEBUG
TYPED_TEST(groupby_var_test, empty_cols)
#else
TYPED_TEST(groupby_var_test, DISABLED_empty_cols)
#endif
{
using K = int32_t;
using V = TypeParam;
Expand All @@ -77,11 +69,7 @@ TYPED_TEST(groupby_var_test, DISABLED_empty_cols)
test_single_agg(keys, vals, expect_keys, expect_vals, std::move(agg));
}

#ifdef NDEBUG
TYPED_TEST(groupby_var_test, zero_valid_keys)
#else
TYPED_TEST(groupby_var_test, DISABLED_zero_valid_keys)
#endif
{
using K = int32_t;
using V = TypeParam;
Expand All @@ -97,11 +85,7 @@ TYPED_TEST(groupby_var_test, DISABLED_zero_valid_keys)
test_single_agg(keys, vals, expect_keys, expect_vals, std::move(agg));
}

#ifdef NDEBUG
TYPED_TEST(groupby_var_test, zero_valid_values)
#else
TYPED_TEST(groupby_var_test, DISABLED_zero_valid_values)
#endif
{
using K = int32_t;
using V = TypeParam;
Expand All @@ -117,11 +101,7 @@ TYPED_TEST(groupby_var_test, DISABLED_zero_valid_values)
test_single_agg(keys, vals, expect_keys, expect_vals, std::move(agg));
}

#ifdef NDEBUG
TYPED_TEST(groupby_var_test, null_keys_and_values)
#else
TYPED_TEST(groupby_var_test, DISABLED_null_keys_and_values)
#endif
{
using K = int32_t;
using V = TypeParam;
Expand All @@ -143,11 +123,7 @@ TYPED_TEST(groupby_var_test, DISABLED_null_keys_and_values)
test_single_agg(keys, vals, expect_keys, expect_vals, std::move(agg));
}

#ifdef NDEBUG
TYPED_TEST(groupby_var_test, ddof_non_default)
#else
TYPED_TEST(groupby_var_test, DISABLED_ddof_non_default)
#endif
{
using K = int32_t;
using V = TypeParam;
Expand All @@ -170,11 +146,7 @@ TYPED_TEST(groupby_var_test, DISABLED_ddof_non_default)
test_single_agg(keys, vals, expect_keys, expect_vals, std::move(agg));
}

#ifdef NDEBUG
TYPED_TEST(groupby_var_test, dictionary)
#else
TYPED_TEST(groupby_var_test, DISABLED_dictionary)
#endif
{
using K = int32_t;
using V = TypeParam;
Expand Down