Commit Graph

3 Commits

Author SHA1 Message Date
Dylan
4ca0115af7 [ENGINE] apply CCCL CacheAsyncConfiguration pattern to activation/layernorm
Source: cccl_upstream/cub/cub/device/dispatch/dispatch_transform.cuh
        (CacheAsyncConfiguration + spread_out_items_per_thread)

CCCL dispatch_transform.cuh insight: element-wise transforms have
deterministic output shapes. Cache output tensors to avoid cudaMalloc.
Quote from CCCL: 'This computation MUST NOT depend on runtime state
... since the result will be cached.'

Applied to:
1. GeluAndMul.forward_cuda — output tensor cached during decode
2. RMSNorm.forward_cuda — output tensor cached during decode
   (64 layers × 2 norms/layer = 128 cudaMalloc eliminated per step)

SiluAndMul already had this pattern from previous commit.

BI-V100 has no async memory allocator — synchronous cudaMalloc blocks
the entire SM pipeline. Eliminating 128+ allocations per decode step
directly improves Output TPS (83% competition weight).
2026-08-07 01:22:17 +00:00
Claude
4eb83a7ee4 [BASE] activation.py SiluAndMul: CCCL dispatch_transform CacheAsyncConfiguration output tensor caching
Source: cccl_upstream/cub/cub/device/dispatch/dispatch_transform.cuh
Target: vllm/model_executor/layers/activation.py

CCCL system design applied:
- dispatch_transform.cuh CacheAsyncConfiguration: cache occupancy/config
  results across calls to avoid recomputation
- Applied: cache output tensor when shape/dtype/device unchanged
- BI-V100 has no async allocator → cudaMalloc is synchronous → caching
  avoids blocking the stream on every decode step
- spread_out_items_per_thread: dynamic tile adjustment for occupancy
  → we only cache for stable decode shapes, not variable prefill
2026-08-06 04:17:59 +00:00
dylanyunlon
ef6abf3dc7 [DEPLOY] Complete submission: baseline + all optimizations
Adds ALL files needed for Dockerfile build:
  - qwen3_6_scripts/ (baseline patches + our optimizations)
  - vllm/ (full vllm package)
  - paged_attention_v2_pytorch.py (V2 with single-bmm optimization)
  - Dockerfile + computility-run.yaml

Our optimizations vs baseline:
  1. paged_attn.py: pre-gathered context KV (eliminates 194 gather calls),
     Triton try/fallback, V2 heuristic, threshold 32K→64K
  2. paged_attention_v2_pytorch.py: fills NotImplementedError,
     single-bmm Phase 1 (195 launches → 3)
  3. patch_enable_triton.py: HAS_TRITON=True with safety fallback
  4. patch_triton_tuning.py: BLOCK=64, NUM_WARPS=4 for BI-V100
  5. computility-run.yaml: gpu-memory-utilization 0.9→0.95,
     max-num-batched-tokens 8192→16384

This repo can now be submitted to dev.modelhub.org.cn as-is.
2026-07-30 16:06:20 +00:00