---
id: pr-cccl-cub-7718
repo: NVIDIA/cccl
pr: 7718
title: Optimize non fixed size segmented reduce for small segments using max_segment_size
author: srinivasyadav18
date: '2026-03-10'
url: https://github.com/NVIDIA/cccl/pull/7718
source_category: upstream-code
architectures:
- sm100
tags:
- benchmark_test
- block reduce
- memory_primitives
- policy tuning
- reduce
- scheduler_autotune
- segmented reduce
- warp reduce
techniques:
- autotuning
- tile-scheduling
- warp-specialization
hardware_features: []
kernel_types:
- memory
- scheduler
languages:
- cuda-cpp
captured_at: '2026-05-16'
status: merged
merge_sha: 93902acfcccec8535a8a0ecbc7819309ee9a8dba
inclusion_reason: 'Transfer primitive policy carefully: coalescing, shared-memory staging, partial tiles, and determinism are part of the contract.'
changed_paths:
- c/parallel/src/segmented_reduce.cu
- c/parallel/test/test_segmented_reduce.cpp
- cub/benchmarks/bench/segmented_reduce/base.cuh
- cub/benchmarks/bench/segmented_reduce/variable_argmax.cu
- cub/benchmarks/bench/segmented_reduce/variable_base.cuh
- cub/benchmarks/bench/segmented_reduce/variable_sum.cu
- cub/cub/agent/agent_reduce.cuh
- cub/cub/device/device_segmented_reduce.cuh
- cub/cub/device/dispatch/dispatch_fixed_size_segmented_reduce.cuh
- cub/cub/device/dispatch/dispatch_segmented_reduce.cuh
- cub/cub/device/dispatch/kernels/kernel_segmented_reduce.cuh
- cub/cub/device/dispatch/tuning/tuning_reduce.cuh
- cub/cub/device/dispatch/tuning/tuning_segmented_reduce.cuh
- cub/test/catch2_test_device_segmented_reduce_large_offsets.cu
- cub/test/catch2_test_device_segmented_reduce_max_seg_size.cu
artifact_dir: evidence/pull-bundles/cccl-cub/gh-7718
head_ref_oid: be9552f456f482c681396abbf3127ec8558ce15d
---
# Optimize non fixed size segmented reduce for small segments using max_segment_size

- Repository: `NVIDIA/cccl`
- PR: [7718](https://github.com/NVIDIA/cccl/pull/7718)
- Decision: `Transfer primitive policy carefully: coalescing, shared-memory staging, partial tiles, and determinism are part of the contract.`
- Reason: Transfer primitive policy carefully: coalescing, shared-memory staging, partial tiles, and determinism are part of the contract.

## Changed Paths

- `c/parallel/src/segmented_reduce.cu`
- `c/parallel/test/test_segmented_reduce.cpp`
- `cub/benchmarks/bench/segmented_reduce/base.cuh`
- `cub/benchmarks/bench/segmented_reduce/variable_argmax.cu`
- `cub/benchmarks/bench/segmented_reduce/variable_base.cuh`
- `cub/benchmarks/bench/segmented_reduce/variable_sum.cu`
- `cub/cub/agent/agent_reduce.cuh`
- `cub/cub/device/device_segmented_reduce.cuh`
- `cub/cub/device/dispatch/dispatch_fixed_size_segmented_reduce.cuh`
- `cub/cub/device/dispatch/dispatch_segmented_reduce.cuh`
- `cub/cub/device/dispatch/kernels/kernel_segmented_reduce.cuh`
- `cub/cub/device/dispatch/tuning/tuning_reduce.cuh`
- `cub/cub/device/dispatch/tuning/tuning_segmented_reduce.cuh`
- `cub/test/catch2_test_device_segmented_reduce_large_offsets.cu`
- `cub/test/catch2_test_device_segmented_reduce_max_seg_size.cu`

## Evidence Bundle

`evidence/pull-bundles/cccl-cub/gh-7718`
