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

Hyper log log plus plus(HLL++) #2522

Open
wants to merge 33 commits into
base: branch-25.02
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
03c0f5a
Add HLL++ evaluation function
Oct 16, 2024
df8b223
Update function comments
Nov 4, 2024
2daca3f
Fix
Nov 19, 2024
3afdfde
Use exec_policy_nosync instead of exec_policy
Nov 26, 2024
956af39
Format code; Remove a useless file
Nov 26, 2024
8aaf0f6
Merge branch 'branch-25.02' into hll
Nov 27, 2024
5bfb544
Use UDF
Dec 15, 2024
f8c6a02
Use UDF
Dec 17, 2024
208d67e
Use UDF
Dec 17, 2024
e29d5a1
Address comments
Dec 18, 2024
9f7ec44
Merge branch 'branch-25.02' into hll
Dec 18, 2024
3c70a30
Merge branch 'branch-25.02' into hll
Dec 19, 2024
3e22512
Fix compile error
Dec 19, 2024
aa7ca68
Handle null inputs: must ignore the null input values
Dec 20, 2024
f0970c0
Rename refactor: Correct spelling errors
Dec 23, 2024
2e74412
Update copyright for new year 2025
Jan 13, 2025
7fe4a39
Use get_current_device_resource_ref
Jan 13, 2025
b7058a7
Fix comments
Jan 13, 2025
78cc207
Fix comments
Jan 13, 2025
4d202f4
Merge branch 'branch-25.02' into hll
Jan 13, 2025
2281d69
Merge branch 'branch-25.02' into hll
Jan 15, 2025
d045020
Close host UDF instance using JNI
Jan 15, 2025
a7cef89
Address comments
Jan 15, 2025
278d8d9
Fix compile error
Jan 15, 2025
86832ae
Address comments
Jan 16, 2025
b331db9
Address comments
Jan 16, 2025
7b929b4
Address comments
Jan 16, 2025
6fcf7e0
Address comments
Jan 16, 2025
024da64
Change make device uvector from async to sync
Jan 16, 2025
c9f4bfb
Add test case
Jan 18, 2025
b678c17
Format and Copyright
Jan 19, 2025
cbc3d12
Update according to cuDF UDF instance management change
Jan 22, 2025
ff48be6
Merge branch 'branch-25.02' into hll
Jan 24, 2025
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
Prev Previous commit
Next Next commit
Use exec_policy_nosync instead of exec_policy
  • Loading branch information
Chong Gao committed Nov 26, 2024
commit 3afdfdef7ac93cda55267994f9865296e061c25c
1 change: 1 addition & 0 deletions src/main/cpp/compile_commands.json
2 changes: 1 addition & 1 deletion src/main/cpp/src/HLLPP.cu
Original file line number Diff line number Diff line change
@@ -92,7 +92,7 @@ std::unique_ptr<cudf::column> estimate_from_hll_sketches(cudf::column_view const
auto result = cudf::make_numeric_column(
cudf::data_type{cudf::type_id::INT64}, input.size(), cudf::mask_state::ALL_VALID, stream);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need such all-valid null mask? How about cudf::mask_state::UNALLOCATED?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Tested Spark behavior, for approx_count_distinct(null) returns 0.
So the values in result column are always non-null

Copy link
Collaborator

Choose a reason for hiding this comment

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

I meant, if all rows are valid, we don't need to allocate a null mask.
BTW, we need to pass mr to the returning column (but do not pass it to the intermediate vector/column).

Suggested change
cudf::data_type{cudf::type_id::INT64}, input.size(), cudf::mask_state::ALL_VALID, stream);
cudf::data_type{cudf::type_id::INT64}, input.size(), cudf::mask_state::UNALLOCATED, stream, mr);

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

// evaluate from struct<long, ..., long>
thrust::for_each_n(rmm::exec_policy(stream),
thrust::for_each_n(rmm::exec_policy_nosync(stream),
thrust::make_counting_iterator(0),
input.size(),
estimate_fn{d_inputs, precision, result->mutable_view().data<int64_t>()});
Loading