cuplyr runs dplyr pipelines on an NVIDIA GPU through libcudf. The aim is that any dplyr pipeline gives the same answer on a GPU table as on a data frame. Bug reports, feature ideas, documentation fixes and code are all welcome.
How work moves
- Every bug and feature starts as a GitHub issue. The issue is where the approach gets discussed and agreed. Issues are ordered on the roadmap board.
- Every change lands through a pull request that links its issue with
Fixes #123. The maintainer and coding agents work this way too. - A maintainer runs the merge gate on the pull request and posts the result as a comment.
- A passing pull request is squash-merged, so the default branch gets one commit per pull request.
Typos and small documentation fixes can skip the issue. Open the pull request directly.
The roadmap board
The roadmap board shows every open issue in priority order: the top of the list is worked on first. Each issue has a status:
| Status | Meaning |
|---|---|
| Proposed | A report or an idea. Discussion is welcome; nothing is agreed yet. |
| Approved | Agreed and ready to pick up, with the approach in the issue. |
| In progress | Someone is working on it. Its pull request, if there is one yet, is a draft. |
| In review | The pull request is ready for review. |
| Done | Merged. |
| Not planned | Decided against; the issue says why. |
New issues start as Proposed. A maintainer moves an issue to Approved once the problem and the approach are clear, and sets the order.
The tbd label marks an open question: a design choice, a trade-off, or whether a difference from dplyr is worth fixing. The question is in the issue’s comments. If you have a view or a use case, say so there; that is one of the most useful things an outside contributor can do.
To pick up an issue, choose one that is Approved, ideally labelled good first issue ❤️ or help wanted ❤️, and comment that you are taking it. A maintainer moves it to In progress so nobody else starts the same work.
Scope
In scope:
- dplyr verbs, helpers and arguments, with dplyr’s semantics. A result that differs from dplyr is a bug.
- GPU code for verbs that use the CPU fallback today. The fallback stays as the safety net.
- Reading and writing data on the GPU, memory management, and the lazy optimizer.
- Installation and packaging.
- Column classes beyond the basic types (
ts,difftime,hms,IDate,POSIXltand others). Today an upload raisescuplyr_error_unsupported_class; the aim is that they work, natively where a GPU type fits and through the CPU route otherwise.
Out of scope for now:
- General lubridate parity. lubridate functions run through the CPU fallback, apart from fixed-unit
floor_date(),ceiling_date()andround_date(). - Multi-GPU execution.
- A GPU version of
do().do()works on a GPU table through the CPU fallback and stays there: it is superseded in dplyr, and it runs arbitrary R code on each group’s data frame.
Something outside this list can still come in. Open an issue and make the case. Changing the scope means a pull request against this section.
Known differences from dplyr
These differences are deliberate, not bugs:
- A
Datewith a fractional day is floored at upload, with acuplyr_warning_fractional_datewarning. - Duplicated column names are allowed only on ungrouped tables.
-
integer64columns are stored as doubles and lose precision above 2^53, with a warning.
Reporting a bug
Open an issue with the template. A good report has:
- a small example that builds its own data, ideally made with
reprex::reprex() - what you expected, which is usually what dplyr returns for a data frame
- the output of
cuplyr::diagnostics()
If you know, say whether the problem shows on eager tables, lazy tables or both.
Proposing a feature
Open an issue and show the code you want to work. Wait until a maintainer agrees on the approach before you write a large pull request.
Issues labelled help wanted ❤️ are agreed and open to anyone. Comment on the issue before you start so two people don’t do the same work (see the roadmap board).
Pull requests
- Fork the repository and branch from the default branch. Name the branch after the issue, for example
142-slice-sample-weights. - Keep one topic per pull request. A feature plus an unrelated refactor is two pull requests.
- Put
Fixes #123in the description. - Open the pull request as a draft early if you like, so others can see the approach and comment before it is finished. Mark it ready for review when it is done; the merge gate doesn’t run on drafts.
- Add a bullet to
NEWS.mdunder “development version” for anything a user can see. Start with the function name and write what the user can now do. - Don’t change the version in
DESCRIPTION. Only release pull requests do. - Give the pull request a conventional-commit title (
feat: ...,fix: ...,perf: ...,docs: ...,test: ...,refactor: ...). The title becomes the squashed commit’s subject. - Fix review comments with new commits. Don’t force-push once a review has started.
The merge gate
Every test needs a CUDA GPU, and GitHub’s free runners have none. A maintainer runs the gate on a workstation GPU instead, against your branch merged into the current default branch. All three parts must pass:
| Part | What it checks | Run it yourself |
|---|---|---|
| Test suite | Every testthat file, no failures or errors | pixi run test |
| Performance | No benchmark is more than 1.5x slower than the recorded baseline | pixi run perf |
| dplyr conformance | dplyr’s own test suite, run against GPU tables. A test that passes today must still pass | pixi run conformance |
The performance baseline comes from the maintainer’s GPU, so your own pixi run perf numbers are only a rough guide. If the gate fails, the maintainer posts the failing tests or benchmarks on the pull request.
You can contribute without a GPU. Say so in the pull request and a maintainer runs the tests for you. This takes longer.
Developer setup
You need Linux, an NVIDIA GPU with compute capability 7.5 (Turing) or newer, a system CUDA toolkit (./configure accepts 12.2 or newer, but RAPIDS 26.x is tested with CUDA 13, which pixi and the installers use; it finds the toolkit through CUDA_HOME or /usr/local/cuda), and pixi. pixi installs R, RAPIDS libcudf and every R package into the project directory. The default pixi environment is RAPIDS 26.10, the series cuplyr is developed, tested and gated on. It carries no CUDA compiler: nvcc and the CUDA headers come from the system toolkit.
curl -fsSL https://pixi.sh/install.sh | bash # once
git clone https://github.com/<you>/cuplyr.git
cd cuplyr
pixi run build-dll # compile the C++ in place
pixi run check-deps # confirm the GPU and libraries are foundDaily commands:
| Task | Command |
|---|---|
| Compile after a C++ change | pixi run build-dll |
| Run one or more test files | pixi run test-file tests/testthat/test-filter.R |
| Run the full suite | pixi run test |
Regenerate NAMESPACE, man/ and the Rcpp exports |
pixi run document |
| Start R with the package environment |
pixi run r, then pkgload::load_all()
|
Build the pkgdown site into docs/
|
pixi run pkgdown |
Checking against RAPIDS 26.02
cuplyr supports RAPIDS 26.02 and later, with 26.02 as the minimum. A second pixi environment, rapids2602, pins that series. Run any task in it by name:
or select it for one command with CUPLYR_PIXI_ENV=rapids2602 tools/conformance. The tools/ scripts pick their environment (CUPLYR_PIXI_MANIFEST and CUPLYR_PIXI_ENV) from the first of these that sets it: the CUPLYR_PIXI_* variable itself; the environment pixi run -e <env> or pixi shell -e <env> activated; a worktree’s untracked .cuplyr-env file (KEY=VALUE lines); the main checkout’s pixi.toml and its default environment. So pixi run -e rapids2602 ... wins over a .cuplyr-env that pins another series. The tools rebuild the C++ when the active RAPIDS changes (they record what src/ was built against in src/.cuplyr-build-env), so you can switch back and forth in one checkout. The release check runs the dplyr conformance suite on 26.02 as well as 26.10; see the release checklist.
The test commands load the package from the source tree with pkgload::load_all(), so you don’t need to install it. They also take a file lock so two runs never share the GPU. The memory tests need that to stay stable.
pixi run install installs the package into the pixi environment. Use it to try cuplyr as a user would.
.claude/reference/architecture.md explains how the code works: the AST and optimizer, joins, factors and the libcudf calls to be careful with. Read it before a larger change.
Code guidelines
Exports
Never edit NAMESPACE or the Rcpp export files by hand. Add roxygen tags (@export, @importFrom) and run pixi run document. Commit the regenerated src/RcppExports.cpp and R/RcppExports.R with your C++ change. A source install from a clone uses them as they are.
Tests
- Tests use testthat, edition 3. Every GPU test starts with
skip_if_no_gpu(). - Compare against real dplyr with
expect_same_as_dplyr()andexpect_same_as_dplyr_lazy()fromtests/testthat/helper-oracle.R. Cover eager and lazy tables. - Pass
arrange_by =only where dplyr itself leaves the row order undefined. - A bug fix starts with a test that fails. If the test passes before the fix, the bug isn’t understood yet.
test_that("filter() keeps rows where the condition is TRUE", {
skip_if_no_gpu()
df <- data.frame(x = c(1, NA, 3), g = c("a", "b", "a"))
expect_same_as_dplyr(df, function(d) dplyr::filter(d, x > 1))
})Style
Follow the tidyverse style guide for R, and match the surrounding code for C++. Signal errors with cli::cli_abort() and a class that starts with cuplyr_error_.
AI-assisted contributions
Claude Code agents write most of cuplyr’s code. The maintainer directs and reviews them, and their commits carry a Co-Authored-By trailer. You may use AI tools too, on these terms:
- Say so in the pull request, using the line in the template.
- Read every changed line and be able to explain and debug it. If you can’t answer review questions, the pull request gets closed.
- Tests still come first. Generated code without oracle tests against dplyr won’t be reviewed.
- Don’t post generated text as issue comments or reviews without reading it.
AGENTS.md holds the rules that agents working in this repository follow.
Releases
The default branch always carries a development version ending in .9000. A release is a pull request that sets the version in DESCRIPTION and tidies NEWS.md. After the merge, the maintainer:
- tags the commit
- publishes a GitHub release from the NEWS section
- publishes the website
- returns the version to
.9000
Release notes name the RAPIDS version the release was built and tested against. Before a release, run the dplyr conformance suite on the minimum supported RAPIDS too (pixi run -e rapids2602 conformance, see Checking against RAPIDS 26.02).
Website
The site at https://bbtheo.github.io/cuplyr/ is built with pkgdown and served by GitHub Pages from the gh-pages branch. The vignettes and reference examples run on the GPU, so GitHub’s runners can’t build it. The maintainer builds it locally and pushes the result.
-
pixi run pkgdownbuilds the site intodocs/from the current checkout. Opendocs/index.htmlto check it.docs/is not committed. -
pixi run site-publishbuilds the site frommainand replaces the contents ofgh-pageswith it. It refuses to run on a dirty checkout or on any commit other thanorigin/main.
The maintainer publishes the site at every release, and after any merge that changes user-facing docs such as the vignettes, the README or the documentation of exported functions.
Code of conduct
Everyone taking part follows the code of conduct.
Project structure
cuplyr/
├── R/ # R code (dplyr verbs, AST, optimizer)
├── src/ # C++ code (Rcpp bindings to libcudf)
├── tests/testthat/ # Test suite, including the oracle helpers
├── tools/ # Wrappers for builds, tests, the perf and conformance gates
├── vignettes/ # Long-form documentation
├── man/ # Generated docs (don't edit directly)
├── configure # Detects CUDA and libcudf, writes src/Makevars
├── pixi.toml # Dependencies and tasks
└── DESCRIPTION # R package metadata
