Skip to content

Commit

Permalink
Fix deprecation warnings for deprecated hash() calls (#15095)
Browse files Browse the repository at this point in the history
Merged #15074 too soon and missed fixing these now deprecated call warnings.

Authors:
  - David Wendt (https://github.com/davidwendt)

Approvers:
  - Nghia Truong (https://github.com/ttnghia)
  - Mark Harris (https://github.com/harrism)

URL: #15095
  • Loading branch information
davidwendt authored Feb 21, 2024
1 parent 8ea716b commit 8e68b37
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 19 deletions.
15 changes: 1 addition & 14 deletions cpp/benchmarks/hashing/hash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,6 @@ static void bench_hash(nvbench::state& state)

state.exec(nvbench::exec_tag::sync,
[&](nvbench::launch& launch) { auto result = cudf::hashing::sha512(data->view()); });
} else if (hash_name == "spark_murmurhash3_x86_32") {
state.add_global_memory_writes<nvbench::int32_t>(num_rows);

state.exec(nvbench::exec_tag::sync, [&](nvbench::launch& launch) {
auto result = cudf::hashing::spark_murmurhash3_x86_32(data->view());
});
} else {
state.skip(hash_name + ": unknown hash name");
}
Expand All @@ -113,11 +107,4 @@ NVBENCH_BENCH(bench_hash)
.add_int64_axis("num_rows", {65536, 16777216})
.add_float64_axis("nulls", {0.0, 0.1})
.add_string_axis("hash_name",
{"murmurhash3_x86_32",
"md5",
"sha1",
"sha224",
"sha256",
"sha384",
"sha512",
"spark_murmurhash3_x86_32"});
{"murmurhash3_x86_32", "md5", "sha1", "sha224", "sha256", "sha384", "sha512"});
4 changes: 2 additions & 2 deletions cpp/tests/partitioning/hash_partition_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,11 +309,11 @@ void run_fixed_width_test(size_t cols,
cudf::table_view partitions_table({partitions_col});

// Sort partition numbers by the corresponding row hashes of each output
auto hash1 = cudf::hash(output1->view());
auto hash1 = cudf::hashing::murmurhash3_x86_32(output1->view());
cudf::table_view hash1_table({hash1->view()});
auto sorted_partitions1 = cudf::sort_by_key(partitions_table, hash1_table);

auto hash2 = cudf::hash(output2->view());
auto hash2 = cudf::hashing::murmurhash3_x86_32(output2->view());
cudf::table_view hash2_table({hash2->view()});
auto sorted_partitions2 = cudf::sort_by_key(partitions_table, hash2_table);

Expand Down
6 changes: 3 additions & 3 deletions cpp/tests/streams/hash_test.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, NVIDIA CORPORATION.
* Copyright (c) 2023-2024, 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 @@ -49,6 +49,6 @@ TEST_F(HashTest, MultiValue)

auto const input1 = cudf::table_view({strings_col, ints_col, bools_col1, secs_col});

auto const output1 = cudf::hash(
input1, cudf::hash_id::HASH_MURMUR3, cudf::DEFAULT_HASH_SEED, cudf::test::get_default_stream());
auto const output1 = cudf::hashing::murmurhash3_x86_32(
input1, cudf::DEFAULT_HASH_SEED, cudf::test::get_default_stream());
}

0 comments on commit 8e68b37

Please sign in to comment.