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

Remove dependence on managed memory for multimap test #7451

Merged
Merged
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
24 changes: 10 additions & 14 deletions cpp/tests/hash_map/multimap_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/

#include <hash/concurrent_unordered_multimap.cuh>
#include <hash/hash_allocator.cuh>

#include <cudf_test/base_fixture.hpp>

Expand Down Expand Up @@ -46,11 +47,15 @@ class MultimapTest : public cudf::test::BaseFixture {
using value_type = typename T::value_type;
using size_type = int;

using multimap_type = concurrent_unordered_multimap<key_type,
value_type,
size_type,
std::numeric_limits<key_type>::max(),
std::numeric_limits<value_type>::max()>;
using multimap_type =
concurrent_unordered_multimap<key_type,
value_type,
size_type,
std::numeric_limits<key_type>::max(),
std::numeric_limits<value_type>::max(),
default_hash<key_type>,
equal_to<key_type>,
default_allocator<thrust::pair<key_type, value_type>>>;

std::unique_ptr<multimap_type, std::function<void(multimap_type*)>> the_map;

Expand Down Expand Up @@ -91,12 +96,3 @@ TYPED_TEST(MultimapTest, InitialState)
auto end = this->the_map->end();
EXPECT_NE(begin, end);
}

TYPED_TEST(MultimapTest, CheckUnusedValues)
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this test removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To remove the dependence on managed memory. It was accessing it from the host.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a way to add alternate test for this ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not necessary.

{
EXPECT_EQ(this->the_map->get_unused_key(), this->unused_key);

auto begin = this->the_map->begin();
EXPECT_EQ(begin->first, this->unused_key);
EXPECT_EQ(begin->second, this->unused_value);
}