---
id: pr-cccl-cub-8538
repo: NVIDIA/cccl
pr: 8538
title: Implement the new tuning API for `detail::batched_topk::dispatch_batched_topk`
author: bernhardmgruber
date: '2026-04-22'
url: https://github.com/NVIDIA/cccl/pull/8538
source_category: upstream-code
architectures:
- sm100
tags:
- CUB
- benchmark_test
- memory_primitives
- moe_routing
- policy tuning
- scheduler_autotune
- topk
techniques:
- autotuning
- tile-scheduling
hardware_features: []
kernel_types:
- memory
- moe
- scheduler
languages:
- cuda-cpp
captured_at: '2026-05-16'
status: merged
merge_sha: 224794312c9af5a7958457fc1a4f0e95df583f56
inclusion_reason: Mine shape sets, tolerance rules, warmup logic, and profile commands before mutating code.
changed_paths:
- cub/benchmarks/bench/segmented_topk/keys.cu
- cub/cub/agent/agent_batched_topk.cuh
- cub/cub/device/dispatch/dispatch_batched_topk.cuh
- cub/cub/device/dispatch/kernels/kernel_batched_topk.cuh
- cub/cub/device/dispatch/tuning/tuning_batched_topk.cuh
- cub/test/catch2_test_device_segmented_topk_keys.cu
- cub/test/catch2_test_device_segmented_topk_pairs.cu
artifact_dir: evidence/pull-bundles/cccl-cub/gh-8538
head_ref_oid: c713e2ea0053ca76d11e193c746146e01cb2504d
---
# Implement the new tuning API for `detail::batched_topk::dispatch_batched_topk`

- Repository: `NVIDIA/cccl`
- PR: [8538](https://github.com/NVIDIA/cccl/pull/8538)
- Decision: `Mine shape sets, tolerance rules, warmup logic, and profile commands before mutating code.`
- Reason: Mine shape sets, tolerance rules, warmup logic, and profile commands before mutating code.

## Changed Paths

- `cub/benchmarks/bench/segmented_topk/keys.cu`
- `cub/cub/agent/agent_batched_topk.cuh`
- `cub/cub/device/dispatch/dispatch_batched_topk.cuh`
- `cub/cub/device/dispatch/kernels/kernel_batched_topk.cuh`
- `cub/cub/device/dispatch/tuning/tuning_batched_topk.cuh`
- `cub/test/catch2_test_device_segmented_topk_keys.cu`
- `cub/test/catch2_test_device_segmented_topk_pairs.cu`

## Evidence Bundle

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