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

Fix multi-replace target count logic for large strings #15807

Merged
merged 1 commit into from
May 31, 2024

Conversation

davidwendt
Copy link
Contributor

Description

Replaces thrust::count_if with raw kernel counter to handle large strings (int64 offsets) and > 2GB strings columns.

Checklist

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

@davidwendt davidwendt added bug Something isn't working 2 - In Progress Currently a work in progress libcudf Affects libcudf (C++/CUDA) code. strings strings issues (C++ and Python) non-breaking Non-breaking change labels May 21, 2024
@davidwendt davidwendt self-assigned this May 21, 2024
@davidwendt davidwendt added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels May 28, 2024
@davidwendt davidwendt marked this pull request as ready for review May 28, 2024 15:06
@davidwendt davidwendt requested a review from a team as a code owner May 28, 2024 15:06
@davidwendt davidwendt requested review from bdice and ttnghia May 28, 2024 15:06
Copy link
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

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

The code looks good to me. Can we verify that the benchmarks have no regressions?

@davidwendt
Copy link
Contributor Author

Benchmarks show now significant performance hit

Comparing multi-baseline.json to multi-rk1.json
Benchmark                            Time       CPU   T Old  T New   CPU Old CPU New
------------------------------------------------------------------------------------
StringReplace/multi/4096/32       +0.0009   +0.0009     0       0        0        0
StringReplace/multi/4096/64       -0.0009   -0.0015     0       0        0        0
StringReplace/multi/4096/128      +0.0002   +0.0002     0       0        0        0
StringReplace/multi/4096/256      -0.0001   -0.0002     0       0        0        0
StringReplace/multi/4096/512      -0.0233   -0.0226     0       0        0        0
StringReplace/multi/4096/1024     -0.0182   -0.0176     1       1        1        1
StringReplace/multi/4096/2048     -0.0079   -0.0078     1       1        1        1
StringReplace/multi/4096/4096     +0.0002   +0.0002     1       1        1        1
StringReplace/multi/4096/8192     +0.0055   +0.0055     3       3        3        3
StringReplace/multi/32768/32      -0.0006   -0.0029     0       0        0        0
StringReplace/multi/32768/64      -0.0005   -0.0016     0       0        0        0
StringReplace/multi/32768/128     +0.0003   -0.0006     0       0        0        0
StringReplace/multi/32768/256     +0.0007   +0.0001     0       0        0        0
StringReplace/multi/32768/512     -0.0006   -0.0009     1       1        1        1
StringReplace/multi/32768/1024    +0.0021   +0.0021     2       2        2        2
StringReplace/multi/32768/2048    +0.0085   +0.0084     4       4        4        4
StringReplace/multi/32768/4096    +0.0106   +0.0106     6       7        7        7
StringReplace/multi/32768/8192    +0.0097   +0.0097    12      12       12       12
StringReplace/multi/262144/32     -0.0023   -0.0026     0       0        0        0
StringReplace/multi/262144/64     +0.0002   -0.0002     0       0        0        0
StringReplace/multi/262144/128    +0.0033   +0.0033     1       1        1        1
StringReplace/multi/262144/256    +0.0041   +0.0041     3       3        3        3
StringReplace/multi/262144/512    +0.0098   +0.0098     7       7        7        7
StringReplace/multi/262144/1024   +0.0142   +0.0142    13      13       13       13
StringReplace/multi/262144/2048   +0.0142   +0.0141    25      25       25       25
StringReplace/multi/262144/4096   +0.0093   +0.0093    51      51       51       51
StringReplace/multi/2097152/32    +0.0023   +0.0021     1       1        1        1
StringReplace/multi/2097152/64    +0.0003   +0.0003     2       2        2        2
StringReplace/multi/2097152/128   +0.0046   +0.0046     5       5        5        5
StringReplace/multi/2097152/256   +0.0012   +0.0014    15      15       15       15
StringReplace/multi/2097152/512   +0.0106   +0.0105    50      51       50       51
StringReplace/multi/16777216/32   +0.0003   +0.0003     7       7        7        7
StringReplace/multi/16777216/64   +0.0012   +0.0012    17      17       17       17
OVERALL_GEOMEAN                   +0.0018   +0.0016     0       0        0        0

@davidwendt
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit dec0354 into rapidsai:branch-24.08 May 31, 2024
71 checks passed
@davidwendt davidwendt deleted the replace-count-if branch May 31, 2024 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team bug Something isn't working libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change strings strings issues (C++ and Python)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants