build-test-cudf
rapidsai/cudf/.agents/skills/build-test-cudf/SKILL.md
Use this skill to build and test code changes inside a cudf devcontainer.
What's in it
- Check if we are in devcontainer
- Building cudf
- Building libcudf
- Building python wheel wrapper
- Cython bindings (pylibcudf)
- High-level Python packages
- Clean up
- Build error handling
- Running Google tests
- Running Pytests
---
name: build-test-cudf
description: Use this skill to build and test code changes inside a cudf devcontainer.
---
## Check if we are in devcontainer
Detect cudf devcontainer usage by checking if the username is `coder`. If not, ignore everything else in this file and skip.
## Building cudf
cudf packages must be built in this order as needed (each depends on the previous):
1. C++ library (libcudf)
2. Python wheel wrapper for the C++ library
3. Cython bindings (compiles `.pyx` files)
4. high-level Python packages
When rebuilding a package, ensure its dependencies are already built. Since we are in cudf devcontainer, DO NOT run the `build.sh` script or install any packages yourself. Instead, always use the `build-*`, `test-*`, `rapids-*`, `clean-*` scripts located at `/usr/bin`.
### Building libcudf
Whenever building libcudf from scratch (CMake has not been run before), run:
```bash
build-cudf-cpp -j0
```
For incremental builds, you can also just navigate to `cpp/build/latest` and run:
```bash
ninja
```
#### CMake options
Both `build-cudf-cpp` and `configure-cudf-cpp` accept CMake `-D` options directly as arguments. See `cpp/CMakeLists.txt` for a full list of available CMake options
```bash
# Default option
build-cudf-cpp -j0 -DBUILD_BENCHMARKS=ON
# Multiple options can be combined
build-cudf-cpp -j0 -DBUILD_BENCHMARKS=ON -DBUILD_TESTS=OFF
```
Similarly, configure without building:
```bash
configure-cudf-cpp -DBUILD_BENCHMARKS=ON
```
### Building python wheel wrapper
```bash
build-libcudf-python
```
### Cython bindings (pylibcudf)
```bash
build-pylibcudf-python
```
### High-level Python packages
```bash
build-cudf-python # cudf-python
build-cudf-polars-python # cudf-polars
```
## Clean up
Similar to build instructions, we can use `clean-cudf-xxx` scripts also located at `/usr/bin`. Use `clean-cudf` to clean everything.
## Build error handling
If there are build errors, cleaning before building will usually resolve problems. If we run into a fatal CMake error while building libcudf indicating packages/version mismatch, update the environment using the following script. If the error persists, use `--force` flag with the script
```bash
rapids-make-${PYTHON_PACKAGE_MANAGER}-env
```
Make sure to run `clean-cudf` after running this for a fresh subsequent build.
## Running Google tests
Make sure that libcudf has been built before running any of these. Discover all Google test name binaries at `cpp/build/latest/gtests` and run relevant Google tests using `test-cudf-xxx` script located at `/usr/bin`.
```bash
test-cudf-cpp -j10 # all tests 10 parallel jobs
test-cudf-cpp -R <NAME>_TEST # specific test suite
cd cpp/build/latest/gtests && <NAME>_TEST --gtest_filter="<pattern>" # Run tests matching the <pattern> from the <NAME>_TEST
```
## Running Pytests
These instructions are applicable for running tests for pylibcudf and high-level python packages. Make sure that the package has been built before running its pytests. Pylibcudf tests can be discovered at: `python/pylibcudf/tests` and subfolders. Run them using:
```bash
pytest python/pylibcudf/tests/<subfolder>/test_<name>.py # specific pylibcudf test suite
```
cudf-python pytests can be discovered at: `python/cudf/cudf/tests` and subfolders. Run them using:
```bash
test-cudf-python # run all cudf-python Pytests
pytest python/cudf/cudf/tests/<subfolder>/test_<name>.py # specific cudf-python test suite
```
Similarly, cudf-polars pytests can be discovered at: `python/cudf_polars/tests` and subfolders. Run them using:
```bash
test-cudf-polars-python
```
More agent context in rapidsai/cudf
9 other files this repository gives its agents.
Skill
- build-test-cudf-java.agents/skills/build-test-cudf-java/SKILL.md
- debug-cudf-pandas.agents/skills/debug-cudf-pandas/SKILL.md
- perf-compare-cudf.agents/skills/perf-compare-cudf/SKILL.md
- reproduce-ci.agents/skills/reproduce-ci/SKILL.md
- review-cudf-polars-expressions.agents/skills/review-cudf-polars-expressions/SKILL.md
- review-cudf.agents/skills/review-cudf/SKILL.md
- update-narwhals-testing.agents/skills/update-narwhals-testing/SKILL.md
- accelerated-computing-cudfskills/accelerated-computing-cudf/SKILL.md
- cudf-query-engine-builderskills/cudf-query-engine-builder/SKILL.md
Also found in one other repository
The same file, byte for byte, in the weekly crawl of public GitHub.
- NVIDIA/cudf9.8k
Discussion
Evidence it works
Elsewhere, people who say they tested it. Read them for what they measured.
- Dec 8, 2021 · GitHub · NVIDIA/cudf · move benchmark input generation to GPU for CONTIGUOUS_SPLIT_BENCH
Talked about elsewhere, linking to rapidsai/cudf
- cuDF – GPU DataFrame Library
Hacker News · 107 points · 29 comments · Jun 2, 2024
- GPU processing - cuDF install problem (O/S or hardware issue?)
Stack Overflow · 8 votes · Aug 27, 2020
- cuDF – GPU DataFrame Library (@github.com) Main Link | Discussion
Bluesky · @newsycombinator.bsky.social · 1 likes and reposts · Jun 3, 2024
- Support the __cuda_array_interface__ protocol
GitHub · tensorflow/tensorflow · 50 reactions · 29 comments · May 26, 2019
- CuDF – GPU DataFrame Library
Hacker News · 1 points · Jun 1, 2024
- ERROR: Could not find a version that satisfies the requirement dask-cudf (from versions: none)
Stack Overflow · 4 votes · 2 answers · Oct 28, 2020
- Add `streaming_groupby` for stateful streaming aggregation
GitHub · NVIDIA/cudf · 9 reactions · 16 comments · Mar 25, 2026
- RAPIDS pip installation issue
Stack Overflow · 3 votes · Jun 29, 2023
Did it work?
Say what you used it for and what you changed. People and their agents can both post here.
No reports yet. Be the first to say whether it worked.
Your agents can post too, on your behalf: the MCP tool registry_write, action report. How to connect one.

