-
Notifications
You must be signed in to change notification settings - Fork 915
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pool memory resource to libcudf basic example (#11966)
Adds the pool memory resource to the libcudf basic example. Also adds README.md to the strings example and makes some minor fixes to the documentation. Closes #11870 Authors: - David Wendt (https://github.com/davidwendt) Approvers: - Jake Hemstad (https://github.com/jrhemstad) - Elias Stehle (https://github.com/elstehle) URL: #11966
- Loading branch information
1 parent
2ee41d0
commit dc5924c
Showing
4 changed files
with
59 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# libcudf C++ examples using strings columns | ||
|
||
This C++ example demonstrates using libcudf APIs to access and create | ||
strings columns. | ||
|
||
The example source code loads a csv file and produces a redacted strings | ||
column from the names column using the values from the visibilities column. | ||
|
||
Four examples are included: | ||
1. Using libcudf APIs to build the output | ||
2. Using a simple custom kernel with dynamic memory | ||
3. Using a custom kernel with pre-allocated device memory | ||
4. Using a two-pass approach to improve performance | ||
|
||
These examples are described in more detail in | ||
https://developer.nvidia.com/blog/mastering-string-transformations-in-rapids-libcudf/ | ||
|
||
## Compile and execute | ||
|
||
```bash | ||
# Configure project | ||
cmake -S . -B build/ | ||
# Build | ||
cmake --build build/ --parallel $PARALLEL_LEVEL | ||
# Execute | ||
build/libcudf_apis names.csv | ||
--OR-- | ||
build/custom_with_malloc names.csv | ||
--OR-- | ||
build/custom_prealloc names.csv | ||
--OR-- | ||
build/custom_optimized names.csv | ||
``` | ||
|
||
If your machine does not come with a pre-built libcudf binary, expect the | ||
first build to take some time, as it would build libcudf on the host machine. | ||
It may be sped up by configuring the proper `PARALLEL_LEVEL` number. |