dylanyunlon 1a4e100583 [CCCL-PORT] agent_reduce vectorized load pattern + explicit memory management
Source: cccl_upstream/cub/cub/agent/agent_reduce.cuh

agent_reduce.cuh has two data load paths:
  1. Vectorized (ConsumeFullTile<CanVectorize=true>): loads float4/int4
     when aligned, contiguous, trivially_relocatable, sizeof≤8
  2. Scalar (ConsumeFullTile<CanVectorize=false>): striped access via
     CacheModifiedInputIterator

PyTorch equivalent: .contiguous() enables vectorized GPU memory access.
Applied to decode KV gather:
- Added del statements for intermediate tensors (k_gathered, v_gathered)
  to free GPU memory immediately — critical for 16-SM BI-V100 with tight
  memory budget at seq_len=100K
- Documented the memory access pattern matching agent_reduce's approach

Also from dispatch_reduce.cuh GridEvenShare:
- Adaptive tile sizing for prefix attention context phase
- tile_sz computed from score tensor memory budget per sequence
- Decode (q_len=1) gets larger tiles, prefill gets smaller ones
2026-08-05 08:11:19 +00:00
2026-07-30 17:03:23 +08:00

project_6

Description
No description provided
Readme 427 MiB
Languages
C++ 41.8%
Cuda 31.6%
Python 22.2%
C 2.1%
CMake 1.1%
Other 1.1%