Skip to content

Rename AgentTopKPolicy to agent_topk_policy#9711

Open
bernhardmgruber wants to merge 1 commit into
NVIDIA:mainfrom
bernhardmgruber:rename-agent-topk-policy
Open

Rename AgentTopKPolicy to agent_topk_policy#9711
bernhardmgruber wants to merge 1 commit into
NVIDIA:mainfrom
bernhardmgruber:rename-agent-topk-policy

Conversation

@bernhardmgruber

Copy link
Copy Markdown
Contributor

Summary

  • Renames AgentTopKPolicy struct to agent_topk_policy in cub/agent/agent_topk.cuh for snake_case naming consistency
  • Updates all usages in cub/device/dispatch/dispatch_topk.cuh

Test plan

  • Built topk-related targets (cub.test.device.topk_api, cub.test.device.topk_env, cub.test.block.topk, cub.test.device.batched_topk_api, cub.test.device.segmented_topk_keys) successfully
  • Ran cub.test.device.topk_keys.lid_0 — passed
  • Header compilation tests pass
  • pre-commit checks pass

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bernhardmgruber bernhardmgruber requested a review from a team as a code owner July 6, 2026 08:47
@bernhardmgruber bernhardmgruber requested a review from fbusato July 6, 2026 08:47
@github-project-automation github-project-automation Bot moved this to Todo in CCCL Jul 6, 2026
@cccl-authenticator-app cccl-authenticator-app Bot moved this from Todo to In Review in CCCL Jul 6, 2026
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 5c5a894d-5edd-4377-88be-2febd3021db3

📥 Commits

Reviewing files that changed from the base of the PR and between a60fbe3 and 42db120.

📒 Files selected for processing (2)
  • cub/cub/agent/agent_topk.cuh
  • cub/cub/device/dispatch/dispatch_topk.cuh

📝 Walkthrough

Summary by CodeRabbit

  • Refactor
    • Updated internal top-k policy naming for consistency.
    • No change to top-k behavior, performance, or public API.

Walkthrough

Renames the AgentTopKPolicy struct to agent_topk_policy in agent_topk.cuh, updating the associated documentation comments, and updates dispatch_topk.cuh to instantiate the renamed policy type in the three TopK kernel definitions.

Changes

Policy Rename

Layer / File(s) Summary
Policy struct rename and docs
cub/cub/agent/agent_topk.cuh
Renames AgentTopKPolicy to agent_topk_policy and updates the brief comment and @tparam documentation to match.
Kernel instantiation updates
cub/cub/device/dispatch/dispatch_topk.cuh
Updates DeviceTopKKernel, DeviceTopKHistogramKernel, and DeviceTopKLastFilterKernel to instantiate agent_topk_policy instead of AgentTopKPolicy.

Suggested reviewers: fbusato, shwina

suggestion: verify no other files (tests, benchmarks, other agents) still reference the old AgentTopKPolicy name.


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

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

🥳 CI Workflow Results

🟩 Finished in 1h 07m: Pass: 100%/287 | Total: 2d 18h | Max: 1h 07m | Hits: 87%/227765

See results here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

1 participant