dylanyunlon 8d0551c113 [ENGINE] attention.py: CCCL dispatch_reduce.cuh single-tile decision for V1/V2
Replace arbitrary key_cache.dim()==4 condition with CCCL-derived decision:
  V1 (InvokeSingleTile) when max_context_len fits in 1 partition
  V2 (InvokePasses) when cross-partition merge is required

Source: dispatch_reduce.cuh Invoke():
  if (num_items <= threads_per_block * items_per_thread): InvokeSingleTile
  else: InvokePasses

kernel_reduce.cuh teaches:
  SingleTile: one CTA, ConsumeRange(0,N), no temp buffer
  MultiTile+Stable: GridEvenShare partitions → Phase 2 merge
  MultiTile+Atomic: fetch_add (BI-V100: 16 SM → negligible contention)

V1 saves ~3-5μs per decode step for short sequences by avoiding
tmp_output allocation + merge kernel launch overhead.
2026-08-07 01:54:40 +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%