You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reviewing files that changed from the base of the PR and between d454ead and 786e6d3.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Summary
Summary by CodeRabbit
Refactor
Updated compile-time logarithm calculations across scan, sort, reduction, and decoding operations to use CUDA math utilities.
Deprecation
The legacy logarithm helper is deprecated; CUDA math logarithm utilities are the recommended alternative.
CUB agent, block, and warp headers replace cub::Log2 calculations with CUDA integer logarithm functions. The cub::Log2 template and its zero specialization are marked deprecated in favor of cuda::ceil_ilog2.
Changes: CUB Logarithm Utility Migration
Layer / File(s)
Summary
Migrate agent and block calculations cub/cub/agent/*, cub/cub/block/*
Agent and block algorithms now use cuda::ilog2 or cuda::ceil_ilog2 for their compile-time logarithm calculations. The counter sizing and packing expressions are otherwise unchanged.
Warp reduction and scan specializations now use cuda::ilog2 or cuda::ceil_ilog2 to compute their step counts.
Deprecate CUB Log2 cub/cub/detail/log2.cuh
Log2 and its zero specialization now carry deprecation attributes that direct callers to cuda::ceil_ilog2. The Doxygen guard now excludes both declarations.
This change replaces the internal Log2 utility with CUDA integer log functions and deprecates the old template. The replacements appear to preserve sizing values, so the merge risk is minimal.
Architecture risk: Low · up to d454e
The change affects 1 system.
Changed systems:cub
Architecture concerns
No architecture-level concerns identified.
Review details
Systems and components
observed — cub (service) was modified; 9 changed files map to changed impact.
Before / after behavior
observed — Modified behavior in cub/cub/agent/agent_batch_memcpy.cuh: The header replaces the cub/detail/log2.cuh include with cuda/__cmath/ilog.h; the uninitialized.cuh, util_ptx.cuh, and ceil_div.h includes remain.
observed — Modified behavior in cub/cub/agent/agent_batch_memcpy.cuh: bit_packed_counter now computes the nonzero maximum’s minimum bit width as cuda::ilog2(MaxItemValue) + 1 rather than cub::Log2(MaxItemValue + 1). For power-of-two sizing, it uses cuda::ceil_ilog2 to round that minimum width up to a power of two instead of using cub::Log2.
observed — Modified behavior in cub/cub/agent/agent_radix_sort_upsweep.cuh: The include list removes cub/detail/log2.cuh and adds cuda/__cmath/ilog.h; the existing uninitialized-storage, iterator, and thread-load includes remain.
observed — Modified behavior in cub/cub/agent/agent_radix_sort_upsweep.cuh: OG_BYTES_PER_COUNTER and LOG_PACKING_RATIO now use ::cuda::ilog2 instead of Log2<...>::VALUE; the PACKING_RATIO calculation is unchanged.
- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Reviewing files that changed from the base of the PR and between bb4ff6d and d454ead.
Files selected for processing: 9
cub/cub/agent/agent_batch_memcpy.cuh
cub/cub/agent/agent_radix_sort_upsweep.cuh
cub/cub/agent/single_pass_scan_operators.cuh
cub/cub/block/block_radix_rank.cuh
cub/cub/block/block_run_length_decode.cuh
cub/cub/detail/log2.cuh
cub/cub/warp/specializations/warp_reduce_smem.cuh
cub/cub/warp/specializations/warp_scan_shfl.cuh
cub/cub/warp/specializations/warp_scan_smem.cuh
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Replace
cub::Log2withcuda::ilog2. No SASS changes involvedAlso, updated #3701