Skip to content

Add BGZIP multibyte_split benchmark - #11723

Merged
rapids-bot[bot] merged 7 commits into
NVIDIA:branch-22.12from
upsj:feature/bgzip_benchmark
Oct 10, 2022
Merged

Add BGZIP multibyte_split benchmark#11723
rapids-bot[bot] merged 7 commits into
NVIDIA:branch-22.12from
upsj:feature/bgzip_benchmark

Conversation

@upsj

@upsj upsj commented Sep 20, 2022

Copy link
Copy Markdown

Description

This refactors #11652 to extract the BGZIP IO and adds another source_type to the multibyte_split benchmark, creating a compressed file using zlib.

A quick benchmark shows performance results around 2.5x slower than reading from a device buffer at around 1:5 compression ratio

[0] Tesla T4

source_type delim_size delim_percent size_approx byte_range_percent Time Peak Memory Usage Encoded file size
bgzip 1 1 2^30 = 1073741824 100 507.479 ms 4.022 GiB 1006.638 MiB
file 1 1 2^30 = 1073741824 100 339.860 ms 3.947 GiB 1006.638 MiB
device 1 1 2^30 = 1073741824 100 201.556 ms 3.947 GiB 1006.638 MiB

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@upsj upsj added 3 - Ready for Review Ready for review by team libcudf Affects libcudf (C++/CUDA) code. improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Sep 20, 2022
@upsj upsj added this to the Genomics read_text support milestone Sep 20, 2022
@upsj upsj self-assigned this Sep 20, 2022
@upsj
upsj requested review from a team as code owners September 20, 2022 19:34
@upsj
upsj requested review from PointKernel and harrism September 20, 2022 19:34
@github-actions github-actions Bot added the CMake CMake build issue label Sep 20, 2022
@PointKernel

Copy link
Copy Markdown
Member

@upsj Is this PR depending on #11652?

@upsj

upsj commented Sep 21, 2022

Copy link
Copy Markdown
Author

@PointKernel yes, should we wait with the review until #11652 is merged? Many of the suggestions also apply to the refactored code.

@upsj
upsj requested review from vuule and removed request for harrism September 21, 2022 06:00

@robertmaynard robertmaynard left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

CMake changes LGTM

@PointKernel

Copy link
Copy Markdown
Member

should we wait with the review until #11652 is merged?

Yes please, this will avoid unnecessary back-and-forth effort.

@upsj upsj removed the 3 - Ready for Review Ready for review by team label Sep 21, 2022
@upsj upsj mentioned this pull request Sep 26, 2022
7 tasks
Comment thread cpp/benchmarks/io/text/multibyte_split.cpp Outdated
Comment thread cpp/benchmarks/io/text/multibyte_split.cpp Outdated
Comment thread cpp/benchmarks/io/text/multibyte_split.cpp Outdated
@vuule vuule added the 0 - Waiting on Author Waiting for author to respond to review label Sep 27, 2022

@ttnghia ttnghia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This seems to be larger than just a benchmark.

@vuule

vuule commented Sep 27, 2022

Copy link
Copy Markdown
Contributor

This seems to be larger than just a benchmark.

I think 22.10 needs to be merged so #11652 changes are excluded. @upsj do you want to keep this targeted for 22.10?

@upsj
upsj force-pushed the feature/bgzip_benchmark branch from 19f52a8 to 848fc5e Compare September 28, 2022 09:14
@upsj upsj added 3 - Ready for Review Ready for review by team and removed 0 - Waiting on Author Waiting for author to respond to review labels Sep 28, 2022
@upsj

upsj commented Sep 28, 2022

Copy link
Copy Markdown
Author

@vuule @ttnghia apologies for the confusion, the PR was still not up-to-date. I am used to a rebase-then-merge workflow rather than a merge-then-squash, so I hope me rebasing the branch doesn't mess up your review workflow. It should be ready now. It's not important to get this into 22.10

@upsj

upsj commented Sep 28, 2022

Copy link
Copy Markdown
Author

rerun tests

1 similar comment
@upsj

upsj commented Sep 29, 2022

Copy link
Copy Markdown
Author

rerun tests

@upsj upsj added the cuIO cuIO issue label Sep 29, 2022
Comment thread cpp/src/io/text/bgzip_utils.hpp

@vuule vuule left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks pretty good. Some minor comments/questions.

Comment thread cpp/tests/io/text/data_chunk_source_test.cpp Outdated
Comment thread cpp/tests/io/text/data_chunk_source_test.cpp Outdated
Comment thread cpp/tests/io/text/data_chunk_source_test.cpp Outdated
Comment thread cpp/tests/io/text/data_chunk_source_test.cpp
@upsj

upsj commented Oct 3, 2022

Copy link
Copy Markdown
Author

rerun tests

@codecov

codecov Bot commented Oct 3, 2022

Copy link
Copy Markdown

Codecov Report

❗ No coverage uploaded for pull request base (branch-22.12@a270ae6). Click here to learn what that means.
Patch has no changes to coverable lines.

Additional details and impacted files
@@               Coverage Diff               @@
##             branch-22.12   #11723   +/-   ##
===============================================
  Coverage                ?   87.48%           
===============================================
  Files                   ?      133           
  Lines                   ?    21866           
  Branches                ?        0           
===============================================
  Hits                    ?    19130           
  Misses                  ?     2736           
  Partials                ?        0           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@PointKernel

PointKernel commented Oct 3, 2022

Copy link
Copy Markdown
Member
source_type
bgzip
file
device

@upsj How did you print out (display) the source type without using NVBENCH_DECLARE_ENUM_TYPE_STRINGS?

@upsj

upsj commented Oct 4, 2022

Copy link
Copy Markdown
Author

@PointKernel I didn't 😉 I edited the output manually for clarity, but thanks for reminding me of the macro, I'll use it instead

@PointKernel PointKernel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Some nitpick. Looks great!

Comment thread cpp/src/io/text/bgzip_utils.cpp Outdated
Comment thread cpp/src/io/text/bgzip_utils.cpp Outdated
Comment thread cpp/src/io/text/bgzip_utils.cpp Outdated
Comment thread cpp/src/io/text/bgzip_utils.cpp Outdated
@vuule
vuule changed the base branch from branch-22.12 to branch-22.10 October 4, 2022 16:06
@vuule
vuule changed the base branch from branch-22.10 to branch-22.12 October 4, 2022 16:06

@vuule vuule left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔥

Comment thread cpp/benchmarks/io/text/multibyte_split.cpp Outdated
Comment thread cpp/benchmarks/io/text/multibyte_split.cpp Outdated
* move header to include
* more constexpr
* rename ostreams to output_stream
* fewer magic numbers

@bdice bdice left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A couple small comments that you can handle as you wish, otherwise LGTM.

Comment thread cpp/include/cudf/io/text/detail/bgzip_utils.hpp Outdated
Comment thread cpp/include/cudf/io/text/detail/bgzip_utils.hpp Outdated
@upsj upsj added 5 - Ready to Merge Testing and reviews complete, ready to merge and removed 3 - Ready for Review Ready for review by team labels Oct 8, 2022
@upsj
upsj requested a review from a team as a code owner October 9, 2022 08:30
@github-actions github-actions Bot added the conda label Oct 9, 2022
@upsj upsj removed the 5 - Ready to Merge Testing and reviews complete, ready to merge label Oct 9, 2022
@upsj upsj added the 5 - Ready to Merge Testing and reviews complete, ready to merge label Oct 10, 2022
@upsj

upsj commented Oct 10, 2022

Copy link
Copy Markdown
Author

@gpucibot merge

@rapids-bot
rapids-bot Bot merged commit 4eb9c6c into NVIDIA:branch-22.12 Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5 - Ready to Merge Testing and reviews complete, ready to merge CMake CMake build issue cuIO cuIO issue improvement Improvement / enhancement to an existing function libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants