Skip to content

Convert cudf::repeat to use device_uvector instead of device_vector - #8042

Merged
rapids-bot[bot] merged 3 commits into
NVIDIA:branch-0.20from
harrism:repeat-uvector
Apr 28, 2021
Merged

rapids-bot[bot] merged 3 commits into
NVIDIA:branch-0.20from
harrism:repeat-uvector

Conversation

@harrism

@harrism harrism commented Apr 22, 2021

Copy link
Copy Markdown
Contributor

Converts cudf::repeat to use device_uvector as much as possible, and converts to using indexalator for computing offsets from repeat counts.

Also adds a benchmark for cudf::repeat.

Contributes to #7287

Performance is improved:

Comparing /home/mharris/rapids/cudf/cpp/build/repeat_before.json to /home/mharris/rapids/cudf/cpp/build/repeat_after.json
Benchmark                                                       Time             CPU      Time Old      Time New       CPU Old       CPU New
--------------------------------------------------------------------------------------------------------------------------------------------
Repeat/double_nulls/1024/1/manual_time                       -0.1681         -0.1361             0             0             0             0
Repeat/double_nulls/4096/1/manual_time                       -0.1663         -0.1329             0             0             0             0
Repeat/double_nulls/32768/1/manual_time                      -0.1702         -0.1372             0             0             0             0
Repeat/double_nulls/262144/1/manual_time                     -0.1347         -0.1159             0             0             0             0
Repeat/double_nulls/2097152/1/manual_time                    -0.1053         -0.1010             0             0             0             0
Repeat/double_nulls/16777216/1/manual_time                   -0.0931         -0.0926             3             3             3             3
Repeat/double_nulls/67108864/1/manual_time                   -0.0869         -0.0868            12            11            12            11
Repeat/double_nulls/1024/8/manual_time                       -0.0539         -0.0462             0             0             0             0
Repeat/double_nulls/4096/8/manual_time                       -0.0951         -0.0839             0             0             0             0
Repeat/double_nulls/32768/8/manual_time                      -0.0905         -0.0821             0             0             0             0
Repeat/double_nulls/262144/8/manual_time                     -0.0499         -0.0453             0             0             0             0
Repeat/double_nulls/2097152/8/manual_time                    -0.0322         -0.0325             1             1             1             1
Repeat/double_nulls/16777216/8/manual_time                   -0.0267         -0.0272            10             9            10             9
Repeat/double_nulls/67108864/8/manual_time                   -0.0276         -0.0267            39            38            39            38
Repeat/double_no_nulls/1024/1/manual_time                    -0.2183         -0.1590             0             0             0             0
Repeat/double_no_nulls/4096/1/manual_time                    -0.2308         -0.1711             0             0             0             0
Repeat/double_no_nulls/32768/1/manual_time                   -0.2374         -0.1820             0             0             0             0
Repeat/double_no_nulls/262144/1/manual_time                  -0.1886         -0.1571             0             0             0             0
Repeat/double_no_nulls/2097152/1/manual_time                 -0.1266         -0.1200             0             0             0             0
Repeat/double_no_nulls/16777216/1/manual_time                -0.1045         -0.1039             3             2             3             2
Repeat/double_no_nulls/67108864/1/manual_time                -0.0945         -0.0944            11            10            11            10
Repeat/double_no_nulls/1024/8/manual_time                    -0.0595         -0.0490             0             0             0             0
Repeat/double_no_nulls/4096/8/manual_time                    -0.1201         -0.1028             0             0             0             0
Repeat/double_no_nulls/32768/8/manual_time                   -0.1085         -0.0968             0             0             0             0
Repeat/double_no_nulls/262144/8/manual_time                  -0.0670         -0.0635             0             0             0             0
Repeat/double_no_nulls/2097152/8/manual_time                 -0.0405         -0.0400             1             1             1             1
Repeat/double_no_nulls/16777216/8/manual_time                -0.0352         -0.0354             8             8             8             8
Repeat/double_no_nulls/67108864/8/manual_time                -0.0295         -0.0295            32            31            32            31

@harrism
harrism requested review from a team as code owners April 22, 2021 23:40
@harrism
harrism requested review from cwharris and ttnghia April 22, 2021 23:40
@github-actions github-actions Bot added CMake CMake build issue libcudf Affects libcudf (C++/CUDA) code. labels Apr 22, 2021
@harrism harrism added non-breaking Non-breaking change improvement Improvement / enhancement to an existing function labels Apr 22, 2021
@harrism harrism self-assigned this Apr 22, 2021
@codecov

codecov Bot commented Apr 23, 2021 •

Copy link
Copy Markdown

Codecov Report

Merging #8042 (9e412fb) into branch-0.20 (51336df) will decrease coverage by 0.04%.
The diff coverage is 90.34%.

Impacted file tree graph

@@               Coverage Diff               @@
##           branch-0.20    #8042      +/-   ##
===============================================
- Coverage        82.88%   82.84%   -0.05%     
===============================================
  Files              103      103              
  Lines            17668    17804     +136     
===============================================
+ Hits             14645    14750     +105     
- Misses            3023     3054      +31     
Impacted Files Coverage Δ
python/cudf/cudf/core/column/__init__.py 100.00% <ø> (ø)
python/cudf/cudf/io/orc.py 86.89% <ø> (ø)
python/cudf/cudf/utils/dtypes.py 81.87% <ø> (-1.57%) ⬇️
python/cudf/cudf/utils/cudautils.py 57.75% <25.00%> (ø)
python/cudf/cudf/core/column/numerical.py 94.43% <72.72%> (ø)
python/cudf/cudf/core/groupby/groupby.py 91.55% <76.92%> (+0.11%) ⬆️
python/cudf/cudf/core/column/decimal.py 90.83% <77.27%> (-2.09%) ⬇️
python/dask_cudf/dask_cudf/backends.py 89.51% <80.00%> (-0.08%) ⬇️
python/cudf/cudf/core/column/column.py 88.64% <83.33%> (ø)
python/cudf/cudf/utils/utils.py 90.00% <95.00%> (+0.49%) ⬆️
... and 29 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f18af7f...9e412fb. Read the comment docs.

Comment thread cpp/src/filling/repeat.cu Resolved
@harrism

harrism commented Apr 28, 2021

Copy link
Copy Markdown
Contributor Author

@gpucibot merge

@rapids-bot
rapids-bot Bot merged commit b27aef6 into NVIDIA:branch-0.20 Apr 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CMake CMake build 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.

4 participants