Skip to content

[cuda.compute] Enable building cuda-compute against CCCL C V2 - #9200

Merged
shwina merged 12 commits into
NVIDIA:mainfrom
shwina:cccl-python-v2
Jun 8, 2026
Merged

shwina merged 12 commits into
NVIDIA:mainfrom
shwina:cccl-python-v2

Conversation

@shwina

@shwina shwina commented Jun 1, 2026 •

Copy link
Copy Markdown
Contributor

Description

Overview

After #8985, we have two implementations of CCCL C (v1 and v2). The latter uses host JIT and we will eventually replace v1 with v2.

This PR introduces the ability to build cuda.compute upon v2 (in addition to v1), as well as (very limited) CI testing for the resulting build.

Whether v1 or v2 is used is controlled by the -DCCCL_PYTHON_USE_V2 cmake switch:

# build cuda.compute on CCCL C V2:
CMAKE_ARGS="-DCCCL_PYTHON_USE_V2=ON" pip install ".[test-cu13]"

Lowering Python operators to LLVM-IR

In v1, which is based on nvrtc/nvJitLink, we compile Python-side ops to LTO-IR, and link it together with the JIT compiled CUB kernel (also LTO-IR), and nvJitLink can nicely inline the op in the final SASS.

In v2, the CUB kernel is compiled into LLVM-IR (bitcode). Correspondingly, we also must lower Python ops to LLVM-IR, so that LLVM can inline it. If we stay with LTO-IR, nvJitlink will see PTX (lowered kernel LLVM-IR) + LTO-IR (lowered Python op) which it cannot inline.

Thus, for efficiency reasons, Python ops in v2 are lowered to LLVM-IR rather than LTO-IR. This constitutes the majority of the changes introduced in this PR.

Note, despite its inefficiency, this PR still uses the second pathway nvJitlink(PTX, LTO-IR) to support RawOp.

Checklist

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@shwina
shwina requested review from a team as code owners June 1, 2026 10:46
@shwina
shwina requested a review from gonidelis June 1, 2026 10:46
@shwina
shwina requested a review from bernhardmgruber June 1, 2026 10:46
@github-project-automation github-project-automation Bot moved this to Todo in CCCL Jun 1, 2026
@shwina
shwina requested a review from kkraus14 June 1, 2026 10:46
@cccl-authenticator-app cccl-authenticator-app Bot moved this from Todo to In Review in CCCL Jun 1, 2026
@coderabbitai

coderabbitai Bot commented Jun 1, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

important: This PR extends the CUDA CCCL Python bindings to support a v2 HostJIT backend, adds per-extra code-kind tracking in the C API, introduces a DeviceCode abstraction, routes compilation and JIT paths to produce kind-tagged code, updates bindings and iterators to carry DeviceCode, and updates CI and tests to exercise the v2 path.

Changes

CCCL C Parallel v2 HostJIT Integration

Layer / File(s) Summary
C API type extension
c/parallel/include/cccl/c/types.h, c/parallel/test/test_util.h
Adds cccl_op_t.extra_code_types field to track per-extra code kind; updates C test factories to use designated initializers for v1/v2 layout compatibility.
DeviceCode type and validation
python/cuda_cccl/cuda/compute/_device_code.py
New frozen dataclass bundling code bytes with kind tag ("ltoir", "llvm_ir", "cpp_source") and runtime validation.
CMake backend selection and build info
python/cuda_cccl/CMakeLists.txt
Adds CCCL_PYTHON_USE_V2 option to select cccl.c.parallel vs cccl.c.parallel.v2 targets, generates _build_info.py with USING_V2 flag, bumps CMake minimum to 3.30, wires backend-conditional .pxi file generation.
Op code type tracking in bindings
python/cuda_cccl/cuda/compute/_bindings_op_code_type_v1.pxi, _bindings_op_code_type_v2.pxi, _bindings_impl.pyx
Backend-specific enums for cccl_op_code_type with v2 including CCCL_OP_LLVM_IR; Op construction accepts bytes or DeviceCode-like objects, allocates and tracks extra_code_types_arr; exposes Op.code and Op.extra_code properties returning DeviceCode wrappers.
Segmented reduce and binary search backends
_bindings_segmented_reduce_backend_v1.pxi, _bindings_segmented_reduce_backend_v2.pxi, _bindings_binary_search_backend_v1.pxi, _bindings_binary_search_backend_v2.pxi
Backend-specific extern declarations and helper functions (_call_segmented_reduce, _binary_search_cubin_bytes) abstracting API surface differences; compute routines route through helpers.
C++ and JIT compilation backend selection
python/cuda_cccl/cuda/compute/_cpp_compile.py, _jit.py, op.py
compile_cpp_op_code returns DeviceCode with kind "cpp_source" (v2) or "ltoir" (v1); _compile_op_to_llvm_bitcode generates LLVM bitcode for v2; stateless/stateful ops conditionally use LLVM IR or LTO-IR; RawOp accepts bytes or DeviceCode objects.
Iterator adaptations
python/cuda_cccl/cuda/compute/iterators/*.py
All iterator types switch to compile_cpp_op_code and extract child op payloads via .code/.extra_code instead of .ltoir/.extra_ltoirs; composite ops wire new code kind properties.
HostJIT environment setup
python/cuda_cccl/cuda/compute/__init__.py
Probes bundled CCCL headers and sets HOSTJIT_CLANG_PATH/HOSTJIT_INCLUDE_PATH environment variables for v2 builds.
Wheel build and CI infrastructure
ci/build_cuda_cccl_wheel.sh, build_cuda_cccl_python.sh, build_cuda_cccl_python_v2.sh, test_cuda_compute_python.sh, test_cuda_compute_python_v2.sh, ci/matrix.yaml, ci/project_files_and_dependencies.yaml, ci/util/workflow/get_wheel_artifact_name.sh
Installs ccache and GCC 13, wires ccache into CMake, conditionally installs nvjitlink/nvfatbin devel packages and cmake>=3.27 when v2 enabled; adds v2 wrapper scripts setting CCCL_PYTHON_USE_V2=1; CI matrices add single-point python_v2 entries; artifact naming includes -v2 suffix for v2 builds; updates test output files for new component coverage.
Testing and examples
python/cuda_cccl/tests/compute/conftest.py, examples/raw_op/llvm_stateless.py, test_permutation_iterator.py, test_zip_iterator.py, test_raw_op.py, tests/test_examples.py
Detects v2 build and skips known broken tests; new LLVM IR example demonstrates hand-written bitcode in DeviceCode; example skip handling via sys.exit(0); cache tests updated to measure compile_cpp_op_code hits; docstrings clarify v2 LLVM bitcode path.
Build configuration
python/cuda_cccl/pyproject.toml, python/cuda_cccl/cuda/compute/_bindings.pyi
Enforces cmake>=3.30 in build-system requires and toolchain; type stub declares Op.code and Op.extra_code properties.

Suggested reviewers

  • bernhardmgruber
  • gonidelis

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 11

🧹 Nitpick comments (19)
c/parallel.v2/src/hostjit/codegen/bitcode.cpp (1)

78-81: 💤 Low value

suggestion: Silent failure when write_file fails. Consider logging a warning or returning a failure indicator so callers can detect the issue. Currently the bitcode is silently dropped.

c/parallel.v2/src/hostjit/compiler.cpp (1)

274-289: ⚡ Quick win

suggestion: The PTX-version floor logic is duplicated verbatim in compileDeviceToPTX and compileToDeviceBitcode. Extract a small ptx_version_for_sm(int) helper so the floor/tier values can't drift between the two paths.

diff
+  static int ptx_version_for_sm(int sm_version)
+  {
+    // PTX version floor is 7.8 — CUB's instruction selection assumes
+    // features added in PTX 7.6 (e.g. `bmsk`).
+    if (sm_version >= 120) return 87;
+    if (sm_version >= 100) return 85;
+    if (sm_version >= 90)  return 80;
+    return 78;
+  }

Also applies to: 730-745

python/cuda_cccl/cuda/compute/__init__.py (1)

14-43: 💤 Low value

suggestion: Import-time environment modification couples module loading to runtime configuration.

The function mutates os.environ during import, which can complicate test isolation and make behavior dependent on import order. Consider deferring configuration until the first JIT call (lazy init), or document that users should import cuda.compute before setting custom env vars.

Also, the file-presence probes (is_file()) don't catch permission errors. If a bundled header exists but is unreadable, the env var will be set and the C library will encounter an I/O error later. Low-impact since bundled files are typically readable, but you could wrap in a try/except and skip setting the var on PermissionError.

python/cuda_cccl/cuda/compute/_bindings_impl.pyx (2)

389-398: 💤 Low value

suggestion: Clarify the v1/v2 compatibility guard in _code_kind.

Line 396 uses _parse_code_type("llvm_ir") as the comparison target rather than a named constant. This works because v1's _parse_code_type (which doesn't know about LLVM_IR) will return CCCL_OP_LTOIR for unrecognized strings, but it's non-obvious. Add a comment:

# v1 doesn't define CCCL_OP_LLVM_IR; _parse_code_type("llvm_ir") safely
# returns CCCL_OP_LTOIR (the default), so this comparison never matches in v1.
if t == _parse_code_type("llvm_ir"):
    return "llvm_ir"

1522-1555: ⚡ Quick win

suggestion: max_segment_size parameter in v2 is silently ignored.

Line 1533 accepts max_segment_size=0 for v1 compatibility, but v2's _call_segmented_reduce (pulled from the .pxi) ignores it entirely. A user switching from v1 to v2 who relies on this parameter will get no warning that it's inoperative.

Consider adding a runtime check in v2 builds:

if max_segment_size != 0:
    import warnings
    warnings.warn(
        "max_segment_size is not supported in v2 backend and will be ignored",
        DeprecationWarning, stacklevel=2
    )

Or document in the docstring that the parameter is v1-only.

python/cuda_cccl/cuda/compute/iterators/_shuffle.py (1)

88-93: 💤 Low value

suggestion: Parameter name ltoir= is misleading when passing DeviceCode.

Line 92 passes ltoir=code where code is a DeviceCode object returned by compile_cpp_op_code. The Op constructor accepts this (duck-typed as DeviceCode-like), but the parameter name ltoir implies LTO-IR bytes. This naming inconsistency could confuse maintainers.

Consider renaming the Op constructor parameter to code= or device_code= in a follow-up refactor, or at minimum document that ltoir now accepts multiple code formats.

python/cuda_cccl/cuda/compute/iterators/_transform.py (1)

133-140: 💤 Low value

suggestion: Property/parameter naming mismatch creates confusion.

Lines 138-139 pass ltoir=code and extra_ltoirs=[child_op.code, *child_op.extra_code]. The Op properties are named .code/.extra_code (returning DeviceCode), but the constructor parameters are ltoir=/extra_ltoirs=. This asymmetry makes the code harder to follow.

Consider aligning names: either rename the constructor parameters to code=/extra_code=, or rename the properties to .ltoir/.extra_ltoirs. The former is preferable since "code" is more general.

python/cuda_cccl/cuda/compute/_bindings.pyi (1)

107-110: 💤 Low value

suggestion: Add return type annotation to code property. Line 108 is missing -> ... while line 110 has -> list. For consistency and type-checker completeness, both should specify return types.

python/cuda_cccl/cuda/compute/_jit.py (2)

102-108: 💤 Low value

suggestion: The regex r"(?m)^target datalayout =.*\n" assumes the datalayout directive is always a single line starting at column 0. If LLVM IR format evolves (e.g., multi-line directives, inline comments), this could silently fail to strip or over-strip. Consider logging when the substitution matches zero times, which might indicate a format change.


110-114: 💤 Low value

suggestion: llvm.parse_assembly(part) can raise parsing errors. Wrap in try/except to provide clearer diagnostic context (e.g., which module chunk failed, first 200 chars of the failing IR) to help debugging when LLVM IR format or codegen changes.

python/cuda_cccl/cuda/compute/_cpp_compile.py (1)

100-102: 💤 Low value

suggestion: arch is part of the lru_cache key but is ignored on the v2 branch, so distinct arch values for identical source produce redundant (identical) cache entries. Harmless, but if you want v2 cache hits to be arch-independent you could drop arch from the key on that path.

c/parallel.v2/test/freestanding/test_cub_device_reduce_explicit_templates.cpp (1)

96-96: 💤 Low value

suggestion: Hardcoded SM version restricts testing scope.

sm_version = 80 forces Ampere architecture. The harness won't verify compilation behavior on sm_70, sm_75, sm_89, sm_90, etc. Consider deriving SM from cudaGetDeviceProperties() or accepting it via argv/environment to test across architectures.

ci/build_cuda_cccl_wheel.sh (1)

19-22: 💤 Low value

suggestion: Suppress ccache diagnostic errors.

If ccache is not in PATH (unlikely but possible after dnf install), lines 20-21 will print errors to the console. Redirect stderr: ccache --version 2>&1 | head -1 || true and ccache --show-stats 2>&1 | head -5 || true to avoid confusing output if ccache is misconfigured.

ci/project_files_and_dependencies.yaml (1)

128-138: 💤 Low value

suggestion: python_v2 lite-depends on the whole cccl_c_parallel_v2 (no public/internal split), so this expensive wheel+GPU job reruns on any c/parallel.v2/ change including its own tests, plus transitively on c2h. The v1 python project only depends on cccl_c_parallel_public. Confirm the broader triggering is intended for the experimental path, or split v2 into public/internal to narrow it.

c/parallel.v2/src/merge_sort.cu (1)

95-97: 💤 Low value

suggestion: When has_items is false, d_in_items is a null pointer iterator. Accessing d_in_items.value_type may read uninitialized or garbage data. Consider only assigning item_type when has_items is true, or zero-initialize it otherwise.

   build_ptr->keys_only    = has_items ? 0 : 1;
   build_ptr->key_type     = d_in_keys.value_type;
-  build_ptr->item_type    = d_in_items.value_type;
+  build_ptr->item_type    = has_items ? d_in_items.value_type : cccl_type_info{};
c/parallel.v2/src/radix_sort.cu (1)

100-106: suggestion: The original asymmetry concern doesn’t look correctness-critical for hostjit: the CCCL_POINTER codegen path branches on it.type and derives the element type from it.value_type, so carrying over advance/dereference/size/alignment from input_keys_it won’t affect emitted iterator code. Brace-initializing output_keys_it can still be kept as a consistency/defensive style improvement.

c/parallel.v2/src/three_way_partition.cu (1)

82-86: 💤 Low value

suggestion: Error message says _build() but this is _build_ex(). Minor debugging inconvenience.

-  fprintf(stderr, "\nEXCEPTION in cccl_device_three_way_partition_build(): %s\n", exc.what());
+  fprintf(stderr, "\nEXCEPTION in cccl_device_three_way_partition_build_ex(): %s\n", exc.what());
c/parallel.v2/src/transform.cu (1)

63-67: 💤 Low value

suggestion: Error message says _build() but this is _build_ex(). Same issue at line 109 for binary variant.

-  fprintf(stderr, "\nEXCEPTION in cccl_device_unary_transform_build(): %s\n", exc.what());
+  fprintf(stderr, "\nEXCEPTION in cccl_device_unary_transform_build_ex(): %s\n", exc.what());
c/parallel.v2/src/unique_by_key.cu (1)

77-81: 💤 Low value

suggestion: Error message says _build() but this is _build_ex().

-  fprintf(stderr, "\nEXCEPTION in cccl_device_unique_by_key_build(): %s\n", exc.what());
+  fprintf(stderr, "\nEXCEPTION in cccl_device_unique_by_key_build_ex(): %s\n", exc.what());

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 4faab5d3-850a-4ab2-9b72-7fcd303494cd

📥 Commits

Reviewing files that changed from the base of the PR and between b60263a and 1e3324e.

📒 Files selected for processing (146)
  • .gitignore
  • CMakeLists.txt
  • CMakePresets.json
  • c/CMakeLists.txt
  • c/parallel.v2/CMakeLists.txt
  • c/parallel.v2/include/cccl/c/binary_search.h
  • c/parallel.v2/include/cccl/c/extern_c.h
  • c/parallel.v2/include/cccl/c/for.h
  • c/parallel.v2/include/cccl/c/histogram.h
  • c/parallel.v2/include/cccl/c/merge_sort.h
  • c/parallel.v2/include/cccl/c/radix_sort.h
  • c/parallel.v2/include/cccl/c/reduce.h
  • c/parallel.v2/include/cccl/c/scan.h
  • c/parallel.v2/include/cccl/c/segmented_reduce.h
  • c/parallel.v2/include/cccl/c/segmented_sort.h
  • c/parallel.v2/include/cccl/c/three_way_partition.h
  • c/parallel.v2/include/cccl/c/transform.h
  • c/parallel.v2/include/cccl/c/types.h
  • c/parallel.v2/include/cccl/c/unique_by_key.h
  • c/parallel.v2/src/binary_search.cu
  • c/parallel.v2/src/for.cu
  • c/parallel.v2/src/histogram.cu
  • c/parallel.v2/src/hostjit/CMakeLists.txt
  • c/parallel.v2/src/hostjit/codegen/bitcode.cpp
  • c/parallel.v2/src/hostjit/codegen/cub_call.cpp
  • c/parallel.v2/src/hostjit/codegen/iterators.cpp
  • c/parallel.v2/src/hostjit/codegen/operators.cpp
  • c/parallel.v2/src/hostjit/codegen/types.cpp
  • c/parallel.v2/src/hostjit/compiler.cpp
  • c/parallel.v2/src/hostjit/config.cpp
  • c/parallel.v2/src/hostjit/include/hostjit/codegen/bitcode.hpp
  • c/parallel.v2/src/hostjit/include/hostjit/codegen/cub_call.hpp
  • c/parallel.v2/src/hostjit/include/hostjit/codegen/iterators.hpp
  • c/parallel.v2/src/hostjit/include/hostjit/codegen/operators.hpp
  • c/parallel.v2/src/hostjit/include/hostjit/codegen/types.hpp
  • c/parallel.v2/src/hostjit/include/hostjit/compiler.hpp
  • c/parallel.v2/src/hostjit/include/hostjit/config.hpp
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/__clang_cuda_device_functions.h
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/__clang_cuda_libdevice_declares.h
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/__clang_cuda_math.h
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/__clang_cuda_runtime_wrapper.h
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/assert.h
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/cassert
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/climits
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/cmath
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/cstddef
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/cstdlib
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/ctype.h
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/cuda/std/__cstdlib/aligned_alloc.h
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/initializer_list
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/limits
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/math.h
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/memory.h
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/new
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/stdlib.h
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/string.h
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/utility
  • c/parallel.v2/src/hostjit/include/hostjit/jit_compiler.hpp
  • c/parallel.v2/src/hostjit/include/hostjit/loader.hpp
  • c/parallel.v2/src/hostjit/jit_compiler.cpp
  • c/parallel.v2/src/hostjit/loader.cpp
  • c/parallel.v2/src/merge_sort.cu
  • c/parallel.v2/src/radix_sort.cu
  • c/parallel.v2/src/reduce.cu
  • c/parallel.v2/src/scan.cu
  • c/parallel.v2/src/segmented_reduce.cu
  • c/parallel.v2/src/segmented_sort.cu
  • c/parallel.v2/src/three_way_partition.cu
  • c/parallel.v2/src/transform.cu
  • c/parallel.v2/src/unique_by_key.cu
  • c/parallel.v2/src/util/build_utils.h
  • c/parallel.v2/test/CMakeLists.txt
  • c/parallel.v2/test/freestanding/CMakeLists.txt
  • c/parallel.v2/test/freestanding/test_basic_cccl_header.cpp
  • c/parallel.v2/test/freestanding/test_compiler.cpp
  • c/parallel.v2/test/freestanding/test_cub_device_adjacent_difference.cpp
  • c/parallel.v2/test/freestanding/test_cub_device_reduce_bitcode.cpp
  • c/parallel.v2/test/freestanding/test_cub_device_reduce_custom_op.cpp
  • c/parallel.v2/test/freestanding/test_cub_device_reduce_deterministic.cpp
  • c/parallel.v2/test/freestanding/test_cub_device_reduce_explicit_templates.cpp
  • c/parallel.v2/test/freestanding/test_required_host_headers.cpp
  • c/parallel.v2/test/freestanding/test_util.h
  • c/parallel/CMakeLists.txt
  • c/parallel/include/cccl/c/types.h
  • c/parallel/src/hostjit/include/hostjit/cuda_minimal/stubs/cstdlib
  • c/parallel/test/CMakeLists.txt
  • c/parallel/test/test_binary_search.cpp
  • c/parallel/test/test_for.cpp
  • c/parallel/test/test_merge_sort.cpp
  • c/parallel/test/test_reduce.cpp
  • c/parallel/test/test_scan.cpp
  • c/parallel/test/test_segmented_reduce.cpp
  • c/parallel/test/test_three_way_partition.cpp
  • c/parallel/test/test_transform.cpp
  • c/parallel/test/test_unique_by_key.cpp
  • c/parallel/test/test_util.h
  • ci/build_cuda_cccl_python.sh
  • ci/build_cuda_cccl_python_v2.sh
  • ci/build_cuda_cccl_wheel.sh
  • ci/matrix.yaml
  • ci/project_files_and_dependencies.yaml
  • ci/test/inspect_changes/c2h_dependency.output
  • ci/test/inspect_changes/core_dirty.output
  • ci/test/inspect_changes/libcudacxx_both.output
  • ci/test/inspect_changes/libcudacxx_public_only.output
  • ci/test/inspect_changes/libcudacxx_thrust.output
  • ci/test/inspect_changes/multiple_projects.output
  • ci/test_cccl_c_parallel_hostjit.sh
  • ci/test_cccl_c_parallel_v2.sh
  • ci/test_cuda_compute_python.sh
  • ci/test_cuda_compute_python_v2.sh
  • ci/util/workflow/get_wheel_artifact_name.sh
  • ci/windows/build_cccl_c_parallel_hostjit.ps1
  • ci/windows/test_cccl_c_parallel_v2.ps1
  • python/cuda_cccl/CMakeLists.txt
  • python/cuda_cccl/cuda/compute/__init__.py
  • python/cuda_cccl/cuda/compute/_bindings.pyi
  • python/cuda_cccl/cuda/compute/_bindings_binary_search_backend_v1.pxi
  • python/cuda_cccl/cuda/compute/_bindings_binary_search_backend_v2.pxi
  • python/cuda_cccl/cuda/compute/_bindings_impl.pyx
  • python/cuda_cccl/cuda/compute/_bindings_op_code_type_v1.pxi
  • python/cuda_cccl/cuda/compute/_bindings_op_code_type_v2.pxi
  • python/cuda_cccl/cuda/compute/_bindings_segmented_reduce_backend_v1.pxi
  • python/cuda_cccl/cuda/compute/_bindings_segmented_reduce_backend_v2.pxi
  • python/cuda_cccl/cuda/compute/_cpp_compile.py
  • python/cuda_cccl/cuda/compute/_device_code.py
  • python/cuda_cccl/cuda/compute/_jit.py
  • python/cuda_cccl/cuda/compute/algorithms/_select.py
  • python/cuda_cccl/cuda/compute/iterators/_cache_modified.py
  • python/cuda_cccl/cuda/compute/iterators/_constant.py
  • python/cuda_cccl/cuda/compute/iterators/_counting.py
  • python/cuda_cccl/cuda/compute/iterators/_discard.py
  • python/cuda_cccl/cuda/compute/iterators/_permutation.py
  • python/cuda_cccl/cuda/compute/iterators/_pointer.py
  • python/cuda_cccl/cuda/compute/iterators/_reverse.py
  • python/cuda_cccl/cuda/compute/iterators/_shuffle.py
  • python/cuda_cccl/cuda/compute/iterators/_transform.py
  • python/cuda_cccl/cuda/compute/iterators/_zip.py
  • python/cuda_cccl/cuda/compute/op.py
  • python/cuda_cccl/pyproject.toml
  • python/cuda_cccl/tests/compute/conftest.py
  • python/cuda_cccl/tests/compute/examples/raw_op/llvm_stateless.py
  • python/cuda_cccl/tests/compute/test_permutation_iterator.py
  • python/cuda_cccl/tests/compute/test_raw_op.py
  • python/cuda_cccl/tests/compute/test_zip_iterator.py
  • python/cuda_cccl/tests/test_examples.py
💤 Files with no reviewable changes (5)
  • ci/windows/build_cccl_c_parallel_hostjit.ps1
  • ci/test_cccl_c_parallel_hostjit.sh
  • c/parallel/CMakeLists.txt
  • c/parallel/src/hostjit/include/hostjit/cuda_minimal/stubs/cstdlib
  • c/parallel/test/CMakeLists.txt

Comment thread c/parallel.v2/src/binary_search.cu Resolved
Comment thread c/parallel.v2/src/for.cu Resolved
Comment thread c/parallel.v2/src/hostjit/compiler.cpp Resolved
Comment thread c/parallel.v2/src/hostjit/compiler.cpp Resolved
Comment thread c/parallel.v2/src/util/build_utils.h Resolved
Comment thread c/parallel.v2/test/CMakeLists.txt Resolved
Comment on lines +73 to +87
import os
import re

import llvmlite.binding as llvm
from numba.cuda.compiler import _compile_pyfunc_with_fixup

target_name = wrapped_op.__name__
lib, _ = _compile_pyfunc_with_fixup(
wrapped_op,
wrapper_sig,
device=True,
abi="c",
abi_info={"abi_name": target_name},
lto=False,
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if numba version is pinned in pyproject.toml or requirements
rg -n "numba" python/cuda_cccl/pyproject.toml python/cuda_cccl/requirements*.txt 2>/dev/null || echo "No explicit numba version constraint found"

Repository: NVIDIA/cccl

Length of output: 865


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Search for explicit pins/locks anywhere in repo (beyond just requirements*.txt)
rg -n --hidden --glob '!.git/*' \
  'numba\s*([=]{1,2})' \
  . || true

rg -n --hidden --glob '!.git/*' \
  'numba-cuda\s*([=]{1,2})' \
  . || true

# Look for typical lock/constraints files that might pin versions
fd -t f -e toml -e lock -e txt -e in -e sh -e yml -e yaml -e cfg -e md \
  -a . | rg -i '(lock|constraints|requirements|pip|poetry|uv|tox|nox|ci|workflow|dependabot|package-lock|pnpm-lock|yarn-lock)' || true

Repository: NVIDIA/cccl

Length of output: 5036


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Targeted exact-pin searches
rg -n --hidden --glob '!.git/*' \
  '(^|[[:space:]])numba==|numba-cuda==|(^|[[:space:]])numba-cuda==|(^|[[:space:]])numba==[0-9]' \
  . || true

rg -n --hidden --glob '!.git/*' \
  'numba(\s*[<>=]{1,2}\s*[^,;\s]+)?' \
  python/cuda_cccl . || true

# Look for common lock/constraint files and search inside them
fd -t f -a . -e lock -e txt -e toml -e yml -e yaml -e json -e cfg -e sh -e md -e csv \
  | rg -i '(poetry\.lock|uv\.lock|constraints|requirements.*lock|pip\.conf|tox\.ini|nox\.ini)' || true

for f in $(fd -t f -a . -e lock -e txt -e toml -e yml -e yaml -e json -e cfg -e sh -e ini -e md | rg -i '(poetry\.lock|uv\.lock|constraints|requirements.*lock|pip\.conf|tox\.ini|nox\.ini)'); do
  rg -n --hidden 'numba(-cuda)?==|numba(-cuda)?\s*[<>=]{1,2}\s*' "$f" || true
done

Repository: NVIDIA/cccl

Length of output: 50368


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Exact-pin presence checks (count + limited listing)
echo "numba== matches:"; rg -n --hidden --glob '!.git/*' '(^|[^A-Za-z0-9_.-])numba==[0-9]' . || true
echo "numba-cuda== matches:"; rg -n --hidden --glob '!.git/*' '(^|[^A-Za-z0-9_.-])numba-cuda==[0-9]' . || true

# Also check for any caret/tilde pins (tight ranges) specifically
echo "numba>= pinned upper-bounds (numba<...):"
rg -n --hidden --glob '!.git/*' '(^|[^A-Za-z0-9_.-])numba<=[0-9]|(^|[^A-Za-z0-9_.-])numba<[0-9]' python/cuda_cccl . || true

Repository: NVIDIA/cccl

Length of output: 135


important: _compile_pyfunc_with_fixup in python/cuda_cccl/cuda/compute/_jit.py is a private Numba API, and the project does not pin Numba to an exact version (numba== / numba-cuda== not found repo-wide; pyproject.toml only specifies lower bounds like numba>=0.60.0 and numba-cuda[cu12|cu13]>=0.23.0 with exclusions). Add an exact/strict version constraint (or upper bounds + CI matrix) so minor Numba/llvmlite changes don’t break the LLVM IR/linking and datalayout-stripping logic.

Comment on lines +135 to +140
# Individual tests known to crash on the v2 backend. Match is on `item.name`
# (parametrized id, e.g. "test_foo[int32]") OR on the bare function name. Add
# a one-line reason for each so it's clear why it's deferred rather than fixed.
_V2_BROKEN_TESTS = {
"test_segmented_sort_op_kind": "cudaErrorMisalignedAddress at runtime; v2 segmented_sort path",
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

important: test_segmented_sort_op_kind is skipped due to cudaErrorMisalignedAddress runtime error in v2. This indicates a memory alignment bug, not a missing feature. Skipping hides a correctness issue. Add a GitHub issue reference to the skip reason and ensure there's a plan to fix this before v2 is released or document it as a known limitation in release notes.

@shwina
shwina requested review from a team as code owners June 1, 2026 11:10

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 10

🧹 Nitpick comments (5)
benchmarks/scripts/sol.py (1)

63-82: 💤 Low value

suggestion: Line 68 print(df) dumps an empty dataframe right after the warning and adds no diagnostic value beyond the already-printed fused_algname. Drop it.

                     if df.empty:
                         print(
                             f"WARNING: Skipped {fused_algname} because no data is present"
                         )
-                        print(df)
                         continue
c/experimental/stf/include/cccl/c/experimental/stf/stf.h (1)

406-436: 💤 Low value

suggestion: The return type int for stf_ctx_wait lacks documentation on what non-zero error codes mean. Consider documenting specific error values or adding an stf_error enum, consistent with other CCCL C APIs.

c/experimental/stf/src/stf.cu (1)

477-480: 💤 Low value

suggestion: Silent exception swallowing differs from the pattern in stf_try_allocate which logs to stderr. Consider logging the exception message here too for debuggability, or at minimum documenting that errors are silently swallowed.

ci/test_thrust.sh (1)

55-63: 💤 Low value

suggestion: consider preset name validation

Preset names thrust-cpu and thrust-gpu are hardcoded. If these change in CMakePresets.json, the script will silently fail. Consider adding a verification step or documenting the preset name dependency.

cub/test/catch2_test_device_transform_if.cu (1)

18-21: 💤 Low value

suggestion: Hardcoding offset_t = int64_t drops the previous coverage of narrower/signed offset types for TransformIf. If that was intentional (e.g. unifying with the v2 suite), ignore; otherwise consider retaining a small offset-type list to keep offset-width regressions covered.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: c0bae808-eb18-4205-b112-9acc683c35c5

📥 Commits

Reviewing files that changed from the base of the PR and between 1e3324e and 18a2a81.

📒 Files selected for processing (262)
  • .devcontainer/launch.sh
  • .gitignore
  • CMakeLists.txt
  • CMakePresets.json
  • benchmarks/scripts/sol.py
  • c/CMakeLists.txt
  • c/experimental/stf/include/cccl/c/experimental/stf/stf.h
  • c/experimental/stf/src/stf.cu
  • c/experimental/stf/test/test_ctx.cpp
  • c/experimental/stf/test/test_places.cpp
  • c/parallel.v2/CMakeLists.txt
  • c/parallel.v2/include/cccl/c/binary_search.h
  • c/parallel.v2/include/cccl/c/extern_c.h
  • c/parallel.v2/include/cccl/c/for.h
  • c/parallel.v2/include/cccl/c/histogram.h
  • c/parallel.v2/include/cccl/c/merge_sort.h
  • c/parallel.v2/include/cccl/c/radix_sort.h
  • c/parallel.v2/include/cccl/c/reduce.h
  • c/parallel.v2/include/cccl/c/scan.h
  • c/parallel.v2/include/cccl/c/segmented_reduce.h
  • c/parallel.v2/include/cccl/c/segmented_sort.h
  • c/parallel.v2/include/cccl/c/three_way_partition.h
  • c/parallel.v2/include/cccl/c/transform.h
  • c/parallel.v2/include/cccl/c/types.h
  • c/parallel.v2/include/cccl/c/unique_by_key.h
  • c/parallel.v2/src/binary_search.cu
  • c/parallel.v2/src/for.cu
  • c/parallel.v2/src/histogram.cu
  • c/parallel.v2/src/hostjit/CMakeLists.txt
  • c/parallel.v2/src/hostjit/codegen/bitcode.cpp
  • c/parallel.v2/src/hostjit/codegen/cub_call.cpp
  • c/parallel.v2/src/hostjit/codegen/iterators.cpp
  • c/parallel.v2/src/hostjit/codegen/operators.cpp
  • c/parallel.v2/src/hostjit/codegen/types.cpp
  • c/parallel.v2/src/hostjit/compiler.cpp
  • c/parallel.v2/src/hostjit/config.cpp
  • c/parallel.v2/src/hostjit/include/hostjit/codegen/bitcode.hpp
  • c/parallel.v2/src/hostjit/include/hostjit/codegen/cub_call.hpp
  • c/parallel.v2/src/hostjit/include/hostjit/codegen/iterators.hpp
  • c/parallel.v2/src/hostjit/include/hostjit/codegen/operators.hpp
  • c/parallel.v2/src/hostjit/include/hostjit/codegen/types.hpp
  • c/parallel.v2/src/hostjit/include/hostjit/compiler.hpp
  • c/parallel.v2/src/hostjit/include/hostjit/config.hpp
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/__clang_cuda_device_functions.h
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/__clang_cuda_libdevice_declares.h
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/__clang_cuda_math.h
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/__clang_cuda_runtime_wrapper.h
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/assert.h
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/cassert
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/climits
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/cmath
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/cstddef
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/cstdlib
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/ctype.h
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/cuda/std/__cstdlib/aligned_alloc.h
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/initializer_list
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/limits
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/math.h
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/memory.h
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/new
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/stdlib.h
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/string.h
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/utility
  • c/parallel.v2/src/hostjit/include/hostjit/jit_compiler.hpp
  • c/parallel.v2/src/hostjit/include/hostjit/loader.hpp
  • c/parallel.v2/src/hostjit/jit_compiler.cpp
  • c/parallel.v2/src/hostjit/loader.cpp
  • c/parallel.v2/src/merge_sort.cu
  • c/parallel.v2/src/radix_sort.cu
  • c/parallel.v2/src/reduce.cu
  • c/parallel.v2/src/scan.cu
  • c/parallel.v2/src/segmented_reduce.cu
  • c/parallel.v2/src/segmented_sort.cu
  • c/parallel.v2/src/three_way_partition.cu
  • c/parallel.v2/src/transform.cu
  • c/parallel.v2/src/unique_by_key.cu
  • c/parallel.v2/src/util/build_utils.h
  • c/parallel.v2/test/CMakeLists.txt
  • c/parallel.v2/test/freestanding/CMakeLists.txt
  • c/parallel.v2/test/freestanding/test_basic_cccl_header.cpp
  • c/parallel.v2/test/freestanding/test_compiler.cpp
  • c/parallel.v2/test/freestanding/test_cub_device_adjacent_difference.cpp
  • c/parallel.v2/test/freestanding/test_cub_device_reduce_bitcode.cpp
  • c/parallel.v2/test/freestanding/test_cub_device_reduce_custom_op.cpp
  • c/parallel.v2/test/freestanding/test_cub_device_reduce_deterministic.cpp
  • c/parallel.v2/test/freestanding/test_cub_device_reduce_explicit_templates.cpp
  • c/parallel.v2/test/freestanding/test_required_host_headers.cpp
  • c/parallel.v2/test/freestanding/test_util.h
  • c/parallel/CMakeLists.txt
  • c/parallel/include/cccl/c/types.h
  • c/parallel/src/hostjit/include/hostjit/cuda_minimal/stubs/cstdlib
  • c/parallel/test/CMakeLists.txt
  • c/parallel/test/test_binary_search.cpp
  • c/parallel/test/test_for.cpp
  • c/parallel/test/test_merge_sort.cpp
  • c/parallel/test/test_reduce.cpp
  • c/parallel/test/test_scan.cpp
  • c/parallel/test/test_segmented_reduce.cpp
  • c/parallel/test/test_three_way_partition.cpp
  • c/parallel/test/test_transform.cpp
  • c/parallel/test/test_unique_by_key.cpp
  • c/parallel/test/test_util.h
  • ci/build_common.sh
  • ci/build_cuda_cccl_python.sh
  • ci/build_cuda_cccl_python_v2.sh
  • ci/build_cuda_cccl_wheel.sh
  • ci/matrix.yaml
  • ci/project_files_and_dependencies.yaml
  • ci/test/inspect_changes/c2h_dependency.output
  • ci/test/inspect_changes/core_dirty.output
  • ci/test/inspect_changes/libcudacxx_both.output
  • ci/test/inspect_changes/libcudacxx_public_only.output
  • ci/test/inspect_changes/libcudacxx_thrust.output
  • ci/test/inspect_changes/multiple_projects.output
  • ci/test_cccl_c_parallel_hostjit.sh
  • ci/test_cccl_c_parallel_v2.sh
  • ci/test_cuda_compute_python.sh
  • ci/test_cuda_compute_python_v2.sh
  • ci/test_thrust.sh
  • ci/upload_cub_test_artifacts.sh
  • ci/upload_thrust_test_artifacts.sh
  • ci/util/workflow/get_wheel_artifact_name.sh
  • ci/windows/build_cccl_c_parallel_hostjit.ps1
  • ci/windows/test_cccl_c_parallel_v2.ps1
  • ci/windows/test_thrust.ps1
  • cub/benchmarks/bench/scan/exclusive/sum.warpspeed.cu
  • cub/benchmarks/bench/scan/policy_selector.h
  • cub/benchmarks/bench/segmented_topk/fixed/keys.cu
  • cub/benchmarks/bench/segmented_topk/variable/keys.cu
  • cub/benchmarks/bench/transform/babelstream.cu
  • cub/benchmarks/bench/transform/common.h
  • cub/benchmarks/bench/transform/complex_cmp.cu
  • cub/benchmarks/bench/transform/fib.cu
  • cub/benchmarks/bench/transform/fill.cu
  • cub/benchmarks/bench/transform/grayscale.cu
  • cub/benchmarks/bench/transform/heavy.cu
  • cub/benchmarks/bench/transform/pytorch.cu
  • cub/benchmarks/bench/transform_reduce/sum.cu
  • cub/cub/detail/launcher/cuda_driver.cuh
  • cub/cub/detail/launcher/cuda_runtime.cuh
  • cub/cub/detail/warpspeed/resource/smem_resource.cuh
  • cub/cub/detail/warpspeed/squad/squad.cuh
  • cub/cub/detail/warpspeed/squad/squad_desc.cuh
  • cub/cub/device/device_reduce.cuh
  • cub/cub/device/device_transform.cuh
  • cub/cub/device/dispatch/dispatch_batched_topk.cuh
  • cub/cub/device/dispatch/dispatch_find.cuh
  • cub/cub/device/dispatch/dispatch_histogram.cuh
  • cub/cub/device/dispatch/dispatch_merge_sort.cuh
  • cub/cub/device/dispatch/dispatch_scan.cuh
  • cub/cub/device/dispatch/dispatch_transform.cuh
  • cub/cub/device/dispatch/kernels/kernel_scan_warpspeed.cuh
  • cub/cub/device/dispatch/kernels/kernel_transform.cuh
  • cub/cub/device/dispatch/tuning/tuning_scan.cuh
  • cub/cub/warp/warp_reduce.cuh
  • cub/test/catch2_test_device_reduce_env.cu
  • cub/test/catch2_test_device_transform.cu
  • cub/test/catch2_test_device_transform_if.cu
  • cudax/cmake/cudaxBuildCompilerTargets.cmake
  • cudax/include/cuda/experimental/__places/data_place_interface.cuh
  • cudax/include/cuda/experimental/__places/exec/cuda_stream.cuh
  • cudax/include/cuda/experimental/__places/localized_array.cuh
  • cudax/include/cuda/experimental/__places/partitions/blocked_partition.cuh
  • cudax/include/cuda/experimental/__places/partitions/cyclic_shape.cuh
  • cudax/include/cuda/experimental/__places/partitions/tiled_partition.cuh
  • cudax/include/cuda/experimental/__places/places.cuh
  • cudax/include/cuda/experimental/__places/stream_pool.cuh
  • cudax/include/cuda/experimental/__stf/internal/async_resources_handle.cuh
  • cudax/include/cuda/experimental/__stf/internal/backend_ctx.cuh
  • cudax/include/cuda/experimental/__stf/internal/parallel_for_scope.cuh
  • cudax/include/cuda/experimental/__stf/internal/stf_places_extended_exports.cuh
  • cudax/include/cuda/experimental/__stf/internal/stf_places_into_stf_core.cuh
  • cudax/include/cuda/experimental/__stf/stream/interfaces/slice.cuh
  • cudax/include/cuda/experimental/__stf/stream/internal/event_types.cuh
  • cudax/include/cuda/experimental/__stf/stream/stream_ctx.cuh
  • cudax/include/cuda/experimental/__stf/stream/stream_task.cuh
  • cudax/test/CMakeLists.txt
  • cudax/test/cuco/utility/test_hashers.cu
  • cudax/test/stf/CMakeLists.txt
  • cudax/test/stf/cpp/test_pick_stream.cu
  • cudax/test/stf/cpp/test_pick_stream_green_context.cu
  • cudax/test/stf/local_stf/stream_ctx_lifetime_btb.cu
  • docs/cudax/places.rst
  • libcudacxx/include/cuda/__hierarchy/hierarchy_level_base.h
  • libcudacxx/include/cuda/__hierarchy/native_hierarchy_level_base.h
  • libcudacxx/include/cuda/std/__cccl/dialect.h
  • libcudacxx/include/cuda/std/__cccl/ptx_isa.h
  • libcudacxx/include/cuda/std/__ranges/subrange.h
  • libcudacxx/include/cuda/std/__simd/abi.h
  • libcudacxx/include/cuda/std/__simd/basic_mask.h
  • libcudacxx/include/cuda/std/__simd/basic_vec.h
  • libcudacxx/include/cuda/std/__simd/permute.h
  • libcudacxx/include/cuda/std/__simd/utility.h
  • libcudacxx/include/cuda/std/__simd_
  • libcudacxx/include/cuda/std/__tuple_dir/tuple_like.h
  • libcudacxx/include/cuda/std/__utility/constant_wrapper.h
  • libcudacxx/include/cuda/std/inplace_vector
  • libcudacxx/include/cuda/std/utility
  • libcudacxx/include/cuda/std/version
  • libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/emplace.pass.cpp
  • libcudacxx/test/libcudacxx/std/numerics/simd/simd.permute/permute.dynamic.pass.cpp
  • libcudacxx/test/libcudacxx/std/numerics/simd/simd.permute/permute.mask.pass.cpp
  • libcudacxx/test/libcudacxx/std/numerics/simd/simd.permute/permute.static.pass.cpp
  • libcudacxx/test/libcudacxx/std/numerics/simd/simd_test_utils.h
  • libcudacxx/test/libcudacxx/std/ranges/range.utility/range.subrange/ctor.pair_like_conv.pass.cpp
  • libcudacxx/test/libcudacxx/std/ranges/range.utility/range.subrange/get.pass.cpp
  • libcudacxx/test/libcudacxx/std/ranges/range.utility/range.subrange/structured_bindings.pass.cpp
  • libcudacxx/test/libcudacxx/std/utilities/const.wrap.class/adl.compile.pass.cpp
  • libcudacxx/test/libcudacxx/std/utilities/const.wrap.class/assign.pass.cpp
  • libcudacxx/test/libcudacxx/std/utilities/const.wrap.class/binary_ops.pass.cpp
  • libcudacxx/test/libcudacxx/std/utilities/const.wrap.class/call.pass.cpp
  • libcudacxx/test/libcudacxx/std/utilities/const.wrap.class/comma.pass.cpp
  • libcudacxx/test/libcudacxx/std/utilities/const.wrap.class/comp.pass.cpp
  • libcudacxx/test/libcudacxx/std/utilities/const.wrap.class/convert.pass.cpp
  • libcudacxx/test/libcudacxx/std/utilities/const.wrap.class/ctad.compile.pass.cpp
  • libcudacxx/test/libcudacxx/std/utilities/const.wrap.class/cw.pass.cpp
  • libcudacxx/test/libcudacxx/std/utilities/const.wrap.class/cw_fixed.array.ctor.pass.cpp
  • libcudacxx/test/libcudacxx/std/utilities/const.wrap.class/cw_fixed.ctor.pass.cpp
  • libcudacxx/test/libcudacxx/std/utilities/const.wrap.class/general.pass.cpp
  • libcudacxx/test/libcudacxx/std/utilities/const.wrap.class/helpers.h
  • libcudacxx/test/libcudacxx/std/utilities/const.wrap.class/kernel_parameter.array.pass.cpp
  • libcudacxx/test/libcudacxx/std/utilities/const.wrap.class/kernel_parameter.pass.cpp
  • libcudacxx/test/libcudacxx/std/utilities/const.wrap.class/mem_ptr.pass.cpp
  • libcudacxx/test/libcudacxx/std/utilities/const.wrap.class/pseudo_mutators.pass.cpp
  • libcudacxx/test/libcudacxx/std/utilities/const.wrap.class/subscript.pass.cpp
  • libcudacxx/test/libcudacxx/std/utilities/const.wrap.class/types.compile.pass.cpp
  • libcudacxx/test/libcudacxx/std/utilities/const.wrap.class/unary_ops.pass.cpp
  • python/cuda_cccl/CMakeLists.txt
  • python/cuda_cccl/cuda/compute/__init__.py
  • python/cuda_cccl/cuda/compute/_bindings.pyi
  • python/cuda_cccl/cuda/compute/_bindings_binary_search_backend_v1.pxi
  • python/cuda_cccl/cuda/compute/_bindings_binary_search_backend_v2.pxi
  • python/cuda_cccl/cuda/compute/_bindings_impl.pyx
  • python/cuda_cccl/cuda/compute/_bindings_op_code_type_v1.pxi
  • python/cuda_cccl/cuda/compute/_bindings_op_code_type_v2.pxi
  • python/cuda_cccl/cuda/compute/_bindings_segmented_reduce_backend_v1.pxi
  • python/cuda_cccl/cuda/compute/_bindings_segmented_reduce_backend_v2.pxi
  • python/cuda_cccl/cuda/compute/_cpp_compile.py
  • python/cuda_cccl/cuda/compute/_device_code.py
  • python/cuda_cccl/cuda/compute/_jit.py
  • python/cuda_cccl/cuda/compute/algorithms/_select.py
  • python/cuda_cccl/cuda/compute/iterators/_cache_modified.py
  • python/cuda_cccl/cuda/compute/iterators/_constant.py
  • python/cuda_cccl/cuda/compute/iterators/_counting.py
  • python/cuda_cccl/cuda/compute/iterators/_discard.py
  • python/cuda_cccl/cuda/compute/iterators/_permutation.py
  • python/cuda_cccl/cuda/compute/iterators/_pointer.py
  • python/cuda_cccl/cuda/compute/iterators/_reverse.py
  • python/cuda_cccl/cuda/compute/iterators/_shuffle.py
  • python/cuda_cccl/cuda/compute/iterators/_transform.py
  • python/cuda_cccl/cuda/compute/iterators/_zip.py
  • python/cuda_cccl/cuda/compute/op.py
  • python/cuda_cccl/pyproject.toml
  • python/cuda_cccl/tests/compute/conftest.py
  • python/cuda_cccl/tests/compute/examples/raw_op/llvm_stateless.py
  • python/cuda_cccl/tests/compute/test_permutation_iterator.py
  • python/cuda_cccl/tests/compute/test_raw_op.py
  • python/cuda_cccl/tests/compute/test_zip_iterator.py
  • python/cuda_cccl/tests/test_examples.py
  • test/cuda_smoke/CMakeLists.txt
  • test/cuda_smoke/cuda_runtime_smoke.cu
  • thrust/thrust/system/cuda/detail/transform.h
💤 Files with no reviewable changes (6)
  • libcudacxx/test/libcudacxx/std/ranges/range.utility/range.subrange/ctor.pair_like_conv.pass.cpp
  • c/parallel/test/CMakeLists.txt
  • c/parallel/CMakeLists.txt
  • ci/windows/build_cccl_c_parallel_hostjit.ps1
  • c/parallel/src/hostjit/include/hostjit/cuda_minimal/stubs/cstdlib
  • ci/test_cccl_c_parallel_hostjit.sh
✅ Files skipped from review due to trivial changes (15)
  • ci/test/inspect_changes/multiple_projects.output
  • cub/benchmarks/bench/scan/policy_selector.h
  • libcudacxx/include/cuda/std/_simd
  • cudax/test/stf/CMakeLists.txt
  • cub/cub/detail/warpspeed/squad/squad.cuh
  • cudax/cmake/cudaxBuildCompilerTargets.cmake
  • ci/test/inspect_changes/libcudacxx_both.output
  • ci/test/inspect_changes/libcudacxx_thrust.output
  • ci/test/inspect_changes/c2h_dependency.output
  • .gitignore
  • libcudacxx/include/cuda/std/version
  • cudax/include/cuda/experimental/__stf/stream/interfaces/slice.cuh
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/cstddef
  • ci/test/inspect_changes/core_dirty.output
  • libcudacxx/include/cuda/std/utility
🚧 Files skipped from review as they are similar to previous changes (59)
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/assert.h
  • c/parallel/include/cccl/c/types.h
  • c/parallel/test/test_transform.cpp
  • ci/test_cccl_c_parallel_v2.sh
  • c/parallel.v2/src/hostjit/include/hostjit/codegen/types.hpp
  • ci/test_cuda_compute_python.sh
  • c/parallel.v2/src/hostjit/codegen/types.cpp
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/cstdlib
  • ci/build_cuda_cccl_python_v2.sh
  • ci/build_cuda_cccl_python.sh
  • c/parallel.v2/src/hostjit/config.cpp
  • c/parallel.v2/src/hostjit/include/hostjit/codegen/bitcode.hpp
  • c/CMakeLists.txt
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/cassert
  • c/parallel/test/test_for.cpp
  • c/parallel/test/test_scan.cpp
  • ci/test/inspect_changes/libcudacxx_public_only.output
  • c/parallel/test/test_reduce.cpp
  • c/parallel.v2/test/freestanding/CMakeLists.txt
  • c/parallel/test/test_binary_search.cpp
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/__clang_cuda_runtime_wrapper.h
  • c/parallel.v2/include/cccl/c/extern_c.h
  • ci/windows/test_cccl_c_parallel_v2.ps1
  • c/parallel.v2/src/for.cu
  • ci/project_files_and_dependencies.yaml
  • c/parallel/test/test_three_way_partition.cpp
  • c/parallel/test/test_merge_sort.cpp
  • python/cuda_cccl/cuda/compute/_bindings_op_code_type_v1.pxi
  • c/parallel.v2/test/CMakeLists.txt
  • python/cuda_cccl/cuda/compute/_bindings_op_code_type_v2.pxi
  • python/cuda_cccl/cuda/compute/_bindings_binary_search_backend_v1.pxi
  • c/parallel/test/test_segmented_reduce.cpp
  • c/parallel.v2/test/freestanding/test_cub_device_reduce_explicit_templates.cpp
  • c/parallel.v2/src/hostjit/include/hostjit/codegen/operators.hpp
  • ci/build_cuda_cccl_wheel.sh
  • c/parallel.v2/src/hostjit/include/hostjit/config.hpp
  • c/parallel.v2/src/radix_sort.cu
  • c/parallel.v2/src/histogram.cu
  • c/parallel.v2/CMakeLists.txt
  • python/cuda_cccl/cuda/compute/init.py
  • c/parallel.v2/src/three_way_partition.cu
  • c/parallel.v2/src/merge_sort.cu
  • c/parallel.v2/src/hostjit/codegen/iterators.cpp
  • c/parallel.v2/src/hostjit/CMakeLists.txt
  • python/cuda_cccl/CMakeLists.txt
  • c/parallel.v2/src/unique_by_key.cu
  • c/parallel/test/test_util.h
  • c/parallel.v2/src/hostjit/codegen/bitcode.cpp
  • c/parallel.v2/src/segmented_reduce.cu
  • c/parallel.v2/src/reduce.cu
  • c/parallel.v2/src/util/build_utils.h
  • c/parallel.v2/src/binary_search.cu
  • c/parallel.v2/src/segmented_sort.cu
  • python/cuda_cccl/cuda/compute/_bindings_impl.pyx
  • c/parallel/test/test_unique_by_key.cpp
  • c/parallel.v2/src/hostjit/include/hostjit/codegen/cub_call.hpp
  • c/parallel.v2/src/hostjit/codegen/cub_call.cpp
  • c/parallel.v2/src/hostjit/codegen/operators.cpp
  • c/parallel.v2/src/hostjit/compiler.cpp

Comment thread .devcontainer/launch.sh Resolved
Comment thread c/parallel.v2/src/scan.cu Resolved
Comment thread c/parallel.v2/src/scan.cu Resolved
Comment thread c/parallel.v2/src/transform.cu Resolved
Comment thread c/parallel.v2/src/transform.cu Resolved
Comment thread ci/build_common.sh Resolved
@shwina
shwina force-pushed the cccl-python-v2 branch 3 times, most recently from 74124e0 to 9d88081 Compare June 1, 2026 12:49

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 10

🧹 Nitpick comments (1)
c/parallel.v2/src/hostjit/codegen/iterators.cpp (1)

118-118: 💤 Low value

suggestion: operator- always returns 0 (lines 118, 255). This breaks algorithms that compute iterator distance. If intentional for lazy-evaluation iterators, consider adding a comment explaining the limitation.

Also applies to: 255-255


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 1c63c6f9-7a64-4cef-abae-fee03f6ebfec

📥 Commits

Reviewing files that changed from the base of the PR and between 18a2a81 and 9d88081.

📒 Files selected for processing (114)
  • .gitignore
  • CMakeLists.txt
  • CMakePresets.json
  • c/CMakeLists.txt
  • c/parallel.v2/CMakeLists.txt
  • c/parallel.v2/include/cccl/c/binary_search.h
  • c/parallel.v2/include/cccl/c/extern_c.h
  • c/parallel.v2/include/cccl/c/for.h
  • c/parallel.v2/include/cccl/c/histogram.h
  • c/parallel.v2/include/cccl/c/merge_sort.h
  • c/parallel.v2/include/cccl/c/radix_sort.h
  • c/parallel.v2/include/cccl/c/reduce.h
  • c/parallel.v2/include/cccl/c/scan.h
  • c/parallel.v2/include/cccl/c/segmented_reduce.h
  • c/parallel.v2/include/cccl/c/segmented_sort.h
  • c/parallel.v2/include/cccl/c/three_way_partition.h
  • c/parallel.v2/include/cccl/c/transform.h
  • c/parallel.v2/include/cccl/c/types.h
  • c/parallel.v2/include/cccl/c/unique_by_key.h
  • c/parallel.v2/src/binary_search.cu
  • c/parallel.v2/src/for.cu
  • c/parallel.v2/src/histogram.cu
  • c/parallel.v2/src/hostjit/CMakeLists.txt
  • c/parallel.v2/src/hostjit/codegen/bitcode.cpp
  • c/parallel.v2/src/hostjit/codegen/cub_call.cpp
  • c/parallel.v2/src/hostjit/codegen/iterators.cpp
  • c/parallel.v2/src/hostjit/codegen/operators.cpp
  • c/parallel.v2/src/hostjit/codegen/types.cpp
  • c/parallel.v2/src/hostjit/compiler.cpp
  • c/parallel.v2/src/hostjit/config.cpp
  • c/parallel.v2/src/hostjit/include/hostjit/codegen/bitcode.hpp
  • c/parallel.v2/src/hostjit/include/hostjit/codegen/cub_call.hpp
  • c/parallel.v2/src/hostjit/include/hostjit/codegen/iterators.hpp
  • c/parallel.v2/src/hostjit/include/hostjit/codegen/operators.hpp
  • c/parallel.v2/src/hostjit/include/hostjit/codegen/types.hpp
  • c/parallel.v2/src/hostjit/include/hostjit/compiler.hpp
  • c/parallel.v2/src/hostjit/include/hostjit/config.hpp
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/__clang_cuda_device_functions.h
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/__clang_cuda_libdevice_declares.h
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/__clang_cuda_math.h
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/__clang_cuda_runtime_wrapper.h
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/assert.h
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/cassert
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/climits
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/cmath
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/cstddef
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/cstdlib
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/ctype.h
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/cuda/std/__cstdlib/aligned_alloc.h
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/initializer_list
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/limits
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/math.h
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/memory.h
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/new
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/stdlib.h
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/string.h
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/utility
  • c/parallel.v2/src/hostjit/include/hostjit/jit_compiler.hpp
  • c/parallel.v2/src/hostjit/include/hostjit/loader.hpp
  • c/parallel.v2/src/hostjit/jit_compiler.cpp
  • c/parallel.v2/src/hostjit/loader.cpp
  • c/parallel.v2/src/merge_sort.cu
  • c/parallel.v2/src/radix_sort.cu
  • c/parallel.v2/src/reduce.cu
  • c/parallel.v2/src/scan.cu
  • c/parallel.v2/src/segmented_reduce.cu
  • c/parallel.v2/src/segmented_sort.cu
  • c/parallel.v2/src/three_way_partition.cu
  • c/parallel.v2/src/transform.cu
  • c/parallel.v2/src/unique_by_key.cu
  • c/parallel.v2/src/util/build_utils.h
  • c/parallel.v2/test/CMakeLists.txt
  • c/parallel.v2/test/freestanding/CMakeLists.txt
  • c/parallel.v2/test/freestanding/test_basic_cccl_header.cpp
  • c/parallel.v2/test/freestanding/test_compiler.cpp
  • c/parallel.v2/test/freestanding/test_cub_device_adjacent_difference.cpp
  • c/parallel.v2/test/freestanding/test_cub_device_reduce_bitcode.cpp
  • c/parallel.v2/test/freestanding/test_cub_device_reduce_custom_op.cpp
  • c/parallel.v2/test/freestanding/test_cub_device_reduce_deterministic.cpp
  • c/parallel.v2/test/freestanding/test_cub_device_reduce_explicit_templates.cpp
  • c/parallel.v2/test/freestanding/test_required_host_headers.cpp
  • c/parallel.v2/test/freestanding/test_util.h
  • c/parallel/CMakeLists.txt
  • c/parallel/include/cccl/c/types.h
  • c/parallel/src/hostjit/include/hostjit/cuda_minimal/stubs/cstdlib
  • c/parallel/test/CMakeLists.txt
  • c/parallel/test/test_binary_search.cpp
  • c/parallel/test/test_for.cpp
  • c/parallel/test/test_merge_sort.cpp
  • c/parallel/test/test_reduce.cpp
  • c/parallel/test/test_scan.cpp
  • c/parallel/test/test_segmented_reduce.cpp
  • c/parallel/test/test_three_way_partition.cpp
  • c/parallel/test/test_transform.cpp
  • c/parallel/test/test_unique_by_key.cpp
  • c/parallel/test/test_util.h
  • ci/build_cuda_cccl_python.sh
  • ci/build_cuda_cccl_python_v2.sh
  • ci/build_cuda_cccl_wheel.sh
  • ci/matrix.yaml
  • ci/project_files_and_dependencies.yaml
  • ci/test/inspect_changes/c2h_dependency.output
  • ci/test/inspect_changes/core_dirty.output
  • ci/test/inspect_changes/libcudacxx_both.output
  • ci/test/inspect_changes/libcudacxx_public_only.output
  • ci/test/inspect_changes/libcudacxx_thrust.output
  • ci/test/inspect_changes/multiple_projects.output
  • ci/test_cccl_c_parallel_hostjit.sh
  • ci/test_cccl_c_parallel_v2.sh
  • ci/test_cuda_compute_python.sh
  • ci/test_cuda_compute_python_v2.sh
  • ci/util/workflow/get_wheel_artifact_name.sh
  • ci/windows/build_cccl_c_parallel_hostjit.ps1
  • ci/windows/test_cccl_c_parallel_v2.ps1
💤 Files with no reviewable changes (5)
  • c/parallel/CMakeLists.txt
  • c/parallel/src/hostjit/include/hostjit/cuda_minimal/stubs/cstdlib
  • c/parallel/test/CMakeLists.txt
  • ci/windows/build_cccl_c_parallel_hostjit.ps1
  • ci/test_cccl_c_parallel_hostjit.sh
✅ Files skipped from review due to trivial changes (6)
  • ci/test/inspect_changes/core_dirty.output
  • .gitignore
  • c/parallel.v2/include/cccl/c/extern_c.h
  • ci/test/inspect_changes/libcudacxx_thrust.output
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/cstddef
  • ci/util/workflow/get_wheel_artifact_name.sh
🚧 Files skipped from review as they are similar to previous changes (57)
  • ci/test_cuda_compute_python_v2.sh
  • c/parallel/include/cccl/c/types.h
  • ci/build_cuda_cccl_python_v2.sh
  • ci/test/inspect_changes/libcudacxx_public_only.output
  • ci/test_cuda_compute_python.sh
  • c/parallel/test/test_reduce.cpp
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/cassert
  • c/parallel.v2/src/hostjit/config.cpp
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/string.h
  • c/parallel.v2/src/hostjit/include/hostjit/codegen/types.hpp
  • ci/test_cccl_c_parallel_v2.sh
  • c/parallel/test/test_scan.cpp
  • c/parallel/test/test_binary_search.cpp
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/cstdlib
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/stubs/assert.h
  • c/parallel/test/test_transform.cpp
  • c/CMakeLists.txt
  • c/parallel/test/test_merge_sort.cpp
  • c/parallel/test/test_for.cpp
  • c/parallel.v2/src/hostjit/include/hostjit/codegen/iterators.hpp
  • c/parallel.v2/src/hostjit/include/hostjit/codegen/operators.hpp
  • ci/test/inspect_changes/c2h_dependency.output
  • c/parallel.v2/src/hostjit/codegen/types.cpp
  • c/parallel.v2/test/CMakeLists.txt
  • c/parallel/test/test_three_way_partition.cpp
  • ci/windows/test_cccl_c_parallel_v2.ps1
  • c/parallel/test/test_unique_by_key.cpp
  • c/parallel.v2/test/freestanding/test_cub_device_reduce_explicit_templates.cpp
  • ci/project_files_and_dependencies.yaml
  • c/parallel.v2/src/unique_by_key.cu
  • c/parallel.v2/src/for.cu
  • ci/build_cuda_cccl_wheel.sh
  • c/parallel.v2/src/hostjit/include/hostjit/codegen/bitcode.hpp
  • c/parallel/test/test_segmented_reduce.cpp
  • c/parallel.v2/src/reduce.cu
  • c/parallel/test/test_util.h
  • c/parallel.v2/CMakeLists.txt
  • c/parallel.v2/src/segmented_reduce.cu
  • c/parallel.v2/src/hostjit/include/hostjit/cuda_minimal/__clang_cuda_runtime_wrapper.h
  • c/parallel.v2/src/merge_sort.cu
  • c/parallel.v2/src/histogram.cu
  • c/parallel.v2/src/hostjit/include/hostjit/codegen/cub_call.hpp
  • c/parallel.v2/src/hostjit/codegen/bitcode.cpp
  • c/parallel.v2/src/radix_sort.cu
  • c/parallel.v2/src/three_way_partition.cu
  • ci/matrix.yaml
  • c/parallel.v2/src/hostjit/CMakeLists.txt
  • c/parallel.v2/src/binary_search.cu
  • CMakePresets.json
  • ci/build_cuda_cccl_python.sh
  • c/parallel.v2/src/util/build_utils.h
  • c/parallel.v2/src/hostjit/compiler.cpp
  • c/parallel.v2/src/transform.cu
  • c/parallel.v2/src/scan.cu
  • c/parallel.v2/src/segmented_sort.cu
  • c/parallel.v2/src/hostjit/codegen/cub_call.cpp
  • c/parallel.v2/src/hostjit/codegen/operators.cpp

Comment thread c/parallel.v2/include/cccl/c/for.h Resolved
Comment thread c/parallel.v2/include/cccl/c/reduce.h Resolved
Comment thread c/parallel.v2/include/cccl/c/scan.h Resolved
@github-actions

This comment has been minimized.

@shwina shwina changed the title Enable building cuda-compute against CCCL C V2 [cuda.compute] Enable building cuda-compute against CCCL C V2 Jun 1, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 976ce69a-371c-4078-a5ef-f5f43f77fe4b

📥 Commits

Reviewing files that changed from the base of the PR and between 9d88081 and 6bb8ff0.

📒 Files selected for processing (48)
  • c/parallel/include/cccl/c/types.h
  • c/parallel/test/test_util.h
  • ci/build_cuda_cccl_python.sh
  • ci/build_cuda_cccl_python_v2.sh
  • ci/build_cuda_cccl_wheel.sh
  • ci/matrix.yaml
  • ci/project_files_and_dependencies.yaml
  • ci/test/inspect_changes/c2h_dependency.output
  • ci/test/inspect_changes/core_dirty.output
  • ci/test/inspect_changes/libcudacxx_both.output
  • ci/test/inspect_changes/libcudacxx_public_only.output
  • ci/test/inspect_changes/libcudacxx_thrust.output
  • ci/test/inspect_changes/multiple_projects.output
  • ci/test_cuda_compute_python.sh
  • ci/test_cuda_compute_python_v2.sh
  • ci/util/workflow/get_wheel_artifact_name.sh
  • python/cuda_cccl/CMakeLists.txt
  • python/cuda_cccl/cuda/compute/__init__.py
  • python/cuda_cccl/cuda/compute/_bindings.pyi
  • python/cuda_cccl/cuda/compute/_bindings_binary_search_backend_v1.pxi
  • python/cuda_cccl/cuda/compute/_bindings_binary_search_backend_v2.pxi
  • python/cuda_cccl/cuda/compute/_bindings_impl.pyx
  • python/cuda_cccl/cuda/compute/_bindings_op_code_type_v1.pxi
  • python/cuda_cccl/cuda/compute/_bindings_op_code_type_v2.pxi
  • python/cuda_cccl/cuda/compute/_bindings_segmented_reduce_backend_v1.pxi
  • python/cuda_cccl/cuda/compute/_bindings_segmented_reduce_backend_v2.pxi
  • python/cuda_cccl/cuda/compute/_cpp_compile.py
  • python/cuda_cccl/cuda/compute/_device_code.py
  • python/cuda_cccl/cuda/compute/_jit.py
  • python/cuda_cccl/cuda/compute/algorithms/_select.py
  • python/cuda_cccl/cuda/compute/iterators/_cache_modified.py
  • python/cuda_cccl/cuda/compute/iterators/_constant.py
  • python/cuda_cccl/cuda/compute/iterators/_counting.py
  • python/cuda_cccl/cuda/compute/iterators/_discard.py
  • python/cuda_cccl/cuda/compute/iterators/_permutation.py
  • python/cuda_cccl/cuda/compute/iterators/_pointer.py
  • python/cuda_cccl/cuda/compute/iterators/_reverse.py
  • python/cuda_cccl/cuda/compute/iterators/_shuffle.py
  • python/cuda_cccl/cuda/compute/iterators/_transform.py
  • python/cuda_cccl/cuda/compute/iterators/_zip.py
  • python/cuda_cccl/cuda/compute/op.py
  • python/cuda_cccl/pyproject.toml
  • python/cuda_cccl/tests/compute/conftest.py
  • python/cuda_cccl/tests/compute/examples/raw_op/llvm_stateless.py
  • python/cuda_cccl/tests/compute/test_permutation_iterator.py
  • python/cuda_cccl/tests/compute/test_raw_op.py
  • python/cuda_cccl/tests/compute/test_zip_iterator.py
  • python/cuda_cccl/tests/test_examples.py
✅ Files skipped from review due to trivial changes (5)
  • ci/test/inspect_changes/multiple_projects.output
  • ci/test_cuda_compute_python_v2.sh
  • python/cuda_cccl/tests/compute/test_raw_op.py
  • ci/test/inspect_changes/libcudacxx_public_only.output
  • python/cuda_cccl/pyproject.toml
🚧 Files skipped from review as they are similar to previous changes (34)
  • ci/util/workflow/get_wheel_artifact_name.sh
  • python/cuda_cccl/tests/test_examples.py
  • ci/test/inspect_changes/libcudacxx_thrust.output
  • python/cuda_cccl/cuda/compute/algorithms/_select.py
  • ci/test_cuda_compute_python.sh
  • python/cuda_cccl/cuda/compute/_bindings_op_code_type_v1.pxi
  • ci/build_cuda_cccl_python.sh
  • c/parallel/include/cccl/c/types.h
  • python/cuda_cccl/cuda/compute/_bindings_segmented_reduce_backend_v2.pxi
  • python/cuda_cccl/cuda/compute/init.py
  • python/cuda_cccl/cuda/compute/_device_code.py
  • python/cuda_cccl/cuda/compute/iterators/_counting.py
  • python/cuda_cccl/cuda/compute/iterators/_constant.py
  • ci/build_cuda_cccl_python_v2.sh
  • python/cuda_cccl/tests/compute/test_permutation_iterator.py
  • python/cuda_cccl/cuda/compute/_bindings_binary_search_backend_v2.pxi
  • python/cuda_cccl/cuda/compute/iterators/_cache_modified.py
  • python/cuda_cccl/cuda/compute/_bindings.pyi
  • ci/build_cuda_cccl_wheel.sh
  • python/cuda_cccl/cuda/compute/iterators/_discard.py
  • python/cuda_cccl/cuda/compute/iterators/_reverse.py
  • python/cuda_cccl/cuda/compute/iterators/_pointer.py
  • python/cuda_cccl/cuda/compute/iterators/_transform.py
  • python/cuda_cccl/CMakeLists.txt
  • python/cuda_cccl/cuda/compute/iterators/_zip.py
  • python/cuda_cccl/cuda/compute/op.py
  • python/cuda_cccl/cuda/compute/iterators/_permutation.py
  • python/cuda_cccl/cuda/compute/_bindings_binary_search_backend_v1.pxi
  • python/cuda_cccl/cuda/compute/_bindings_op_code_type_v2.pxi
  • python/cuda_cccl/tests/compute/test_zip_iterator.py
  • python/cuda_cccl/cuda/compute/iterators/_shuffle.py
  • python/cuda_cccl/cuda/compute/_jit.py
  • python/cuda_cccl/tests/compute/examples/raw_op/llvm_stateless.py
  • python/cuda_cccl/cuda/compute/_bindings_impl.pyx

@github-actions

This comment has been minimized.

@shwina
shwina removed request for a team June 4, 2026 17:22
@shwina

shwina commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

I dismissed cudax, libcudacxx, and thrust review requests. Those were introduced by a bad rebase.

@shwina

shwina commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 157f75e

shwina added a commit to shwina/cccl that referenced this pull request Jun 5, 2026
- conftest.py: match v2-broken tests on the parametrized id (item.name) as well
  as the bare function name, as the surrounding comment already claimed (it only
  checked the bare name before).
- _bindings_impl.pyx: validate that DeviceCode.bytes_ is bytes and .kind is str
  (for the main op and each extra) so a malformed object raises a clear TypeError
  instead of crashing later during unpacking.
- ci/matrix.yaml: add test_py_examples to the python_v2 job so the new
  v2-specific raw_op example and the test_examples.py changes are exercised on
  the HostJIT backend (previously only test_py_par ran there).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

shwina and others added 12 commits June 8, 2026 09:38
Rebased onto main after the CCCL C v2 backend landed via NVIDIA#8985. Drops this
branch's redundant copy of the v2 C backend (main now provides it) and keeps its
unique contribution:

- c/parallel.v2: the LLVM-IR operator support that NVIDIA#8985 predates — a
  CCCL_OP_LLVM_IR op-code type and a per-extra `extra_code_types` field on
  cccl_op_t, plus BitcodeCollector dispatch (LLVM bitcode -> IR-level inlining;
  C++ source -> compile; LTO-IR -> nvJitLink). 4 files; the rest of
  c/parallel.v2 is identical to main.
- python/cuda_cccl: build cuda.compute against c.parallel.v2 via the
  CCCL_PYTHON_USE_V2 CMake option; v1/v2 backend-conditional Cython .pxi shims;
  user operators lowered to LLVM IR (bitcode) on v2.
- ci: build_cuda_cccl_python_v2.sh / test_cuda_compute_python_v2.sh, a python_v2
  matrix project + dependency wiring, and inspect_changes fixtures regenerated
  to include python_v2.
- c/parallel: minor v1 test-util/types additions used by the unified test tree.

Squashed from the prior 50-commit branch (backup: backup/cccl-python-v2-prerebase).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- conftest.py: match v2-broken tests on the parametrized id (item.name) as well
  as the bare function name, as the surrounding comment already claimed (it only
  checked the bare name before).
- _bindings_impl.pyx: validate that DeviceCode.bytes_ is bytes and .kind is str
  (for the main op and each extra) so a malformed object raises a clear TypeError
  instead of crashing later during unpacking.
- ci/matrix.yaml: add test_py_examples to the python_v2 job so the new
  v2-specific raw_op example and the test_examples.py changes are exercised on
  the HostJIT backend (previously only test_py_par ran there).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
v2 (HostJIT) is experimental and shouldn't surface in user-facing docs.

- RawOp: document the stable LTO-IR contract only; drop the "LLVM bitcode is
  preferred / routed through nvJitLink / inlined into the CUB module" paragraph,
  the llvm_stateless example reference, and the "recommended for v2" notes on
  the ltoir/extra_ltoirs args.
- DeviceCode (internal): make the `kind` description backend-neutral; drop the
  "v2 backend dispatches" wording and the c/parallel.v2 source-tree path.
- compile_cpp_op_code (internal): drop the v1/v2 backend-dispatch paragraph.

No behavior change; the code still accepts DeviceCode/llvm_ir as before.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adding test_py_examples to the python_v2 job_map (CodeRabbit review) makes the
workflow dispatch resolve ci/test_cuda_cccl_examples_python_v2.sh, which didn't
exist — runs failed with "No such file or directory". Add the wrapper, mirroring
test_cuda_compute_python_v2.sh: export CCCL_PYTHON_USE_V2=1 and delegate to
test_cuda_cccl_examples_python.sh.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Comment thread ci/matrix.yaml
# - { jobs: ['run_gpu'], project: 'target', ctk: ['12.X', '13.X'], cxx: ['gcc', 'clang'], gpu: 'rtx2080',
# args: '--preset libcudacxx --lit-tests "cuda/utility/basic_any.pass.cpp"' }
#
override:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should add a comment here to stop agents from stripping this out xD

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I promise I'll follow up with a PR doing that :) sorry about that

@alliepiper alliepiper left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

CMake/infra lgtm, a nit about the override matrix stub.

@shwina
shwina enabled auto-merge (squash) June 8, 2026 15:02
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

🥳 CI Workflow Results

🟩 Finished in 2h 33m: Pass: 100%/503 | Total: 17d 10h | Max: 2h 22m | Hits: 39%/1755687

See results here.

@shwina
shwina merged commit a385d04 into NVIDIA:main Jun 8, 2026
583 checks passed
@github-project-automation github-project-automation Bot moved this from In Review to Done in CCCL Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants