Skip to content

Commit

Permalink
Remove temporary functor overloads required by cuco version bump (#16242
Browse files Browse the repository at this point in the history
)

This is a follow-up of #15938. It removes the temporary workaround no longer needed after the cuco version bump.

Authors:
  - Yunsong Wang (https://github.com/PointKernel)

Approvers:
  - Bradley Dice (https://github.com/bdice)
  - David Wendt (https://github.com/davidwendt)

URL: #16242
  • Loading branch information
PointKernel authored Jul 12, 2024
1 parent 1cbd9eb commit 99ad73d
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 60 deletions.
20 changes: 0 additions & 20 deletions cpp/include/cudf/detail/distinct_hash_join.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,6 @@ template <typename Equal>
struct comparator_adapter {
comparator_adapter(Equal const& d_equal) : _d_equal{d_equal} {}

// suppress "function was declared but never referenced warning"
#pragma nv_diagnostic push
#pragma nv_diag_suppress 177
__device__ constexpr auto operator()(
cuco::pair<hash_value_type, lhs_index_type> const&,
cuco::pair<hash_value_type, lhs_index_type> const&) const noexcept
{
// All build table keys are distinct thus `false` no matter what
return false;
}

__device__ constexpr auto operator()(
cuco::pair<hash_value_type, rhs_index_type> const&,
cuco::pair<hash_value_type, rhs_index_type> const&) const noexcept
Expand All @@ -69,15 +58,6 @@ struct comparator_adapter {
return _d_equal(lhs.second, rhs.second);
}

__device__ constexpr auto operator()(
cuco::pair<hash_value_type, rhs_index_type> const& lhs,
cuco::pair<hash_value_type, lhs_index_type> const& rhs) const noexcept
{
if (lhs.first != rhs.first) { return false; }
return _d_equal(lhs.second, rhs.second);
}
#pragma nv_diagnostic pop

private:
Equal _d_equal;
};
Expand Down
19 changes: 0 additions & 19 deletions cpp/src/search/contains_table.cu
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,6 @@ struct comparator_adapter {
{
}

// suppress "function was declared but never referenced warning"
#pragma nv_diagnostic push
#pragma nv_diag_suppress 177
__device__ constexpr auto operator()(lhs_index_type lhs_index,
lhs_index_type rhs_index) const noexcept
{
auto const lhs = static_cast<size_type>(lhs_index);
auto const rhs = static_cast<size_type>(rhs_index);

return _self_equal(lhs, rhs);
}

__device__ constexpr auto operator()(rhs_index_type lhs_index,
rhs_index_type rhs_index) const noexcept
{
Expand All @@ -103,13 +91,6 @@ struct comparator_adapter {
return _two_table_equal(lhs_index, rhs_index);
}

__device__ constexpr auto operator()(rhs_index_type lhs_index,
lhs_index_type rhs_index) const noexcept
{
return _two_table_equal(lhs_index, rhs_index);
}
#pragma nv_diagnostic pop

private:
SelfEqual const _self_equal;
TwoTableEqual const _two_table_equal;
Expand Down
13 changes: 0 additions & 13 deletions cpp/src/text/bpe/byte_pair_encoding.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,6 @@ struct bpe_equal {
return lhs == rhs; // all rows are unique
}
// used by find
__device__ bool operator()(cudf::size_type lhs, merge_pair_type const& rhs) const noexcept
{
lhs *= 2;
auto const left = d_strings.element<cudf::string_view>(lhs);
auto const right = d_strings.element<cudf::string_view>(lhs + 1);
return (left == rhs.first) && (right == rhs.second);
}
// used by find
__device__ bool operator()(merge_pair_type const& lhs, cudf::size_type rhs) const noexcept
{
rhs *= 2;
Expand Down Expand Up @@ -157,11 +149,6 @@ struct mp_equal {
return left == right;
}
// used by find
__device__ bool operator()(cudf::size_type lhs, cudf::string_view const& rhs) const noexcept
{
auto const left = d_strings.element<cudf::string_view>(lhs);
return left == rhs;
}
__device__ bool operator()(cudf::string_view const& lhs, cudf::size_type rhs) const noexcept
{
auto const right = d_strings.element<cudf::string_view>(rhs);
Expand Down
8 changes: 0 additions & 8 deletions cpp/src/text/vocabulary_tokenize.cu
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,10 @@ struct vocab_equal {
return lhs == rhs; // all rows are expected to be unique
}
// used by find
// suppress "function was declared but never referenced warning"
#pragma nv_diagnostic push
#pragma nv_diag_suppress 177
__device__ bool operator()(cudf::size_type lhs, cudf::string_view const& rhs) const noexcept
{
return d_strings.element<cudf::string_view>(lhs) == rhs;
}
__device__ bool operator()(cudf::string_view const& lhs, cudf::size_type rhs) const noexcept
{
return d_strings.element<cudf::string_view>(rhs) == lhs;
}
#pragma nv_diagnostic pop
};

using probe_scheme = cuco::linear_probing<1, vocab_hasher>;
Expand Down

0 comments on commit 99ad73d

Please sign in to comment.