What problem does it solve?
LuisaCompute DSL kernels often bottleneck on contended atomics, block-wide reductions, and inter-thread communication, and naive implementations waste cycles on shared-memory barriers and per-command driver submission overhead.
Core Features & Use Cases
- Warp/Wave Collective Optimization: Replace shared-memory reductions and atomics with single-instruction warp primitives like warp_active_sum, warp_prefix_sum, and warp_read_lane.
- Shared-Memory Aggregation: Apply block-local atomic privatization, two-level warp-to-block reductions, and shared staging patterns to cut global atomic traffic from O(block_size) to O(1) per block.
- Host-Side Command Batching: Batch stream submissions with CommandList and replace blocking synchronize() calls with async callbacks to reduce driver overhead.
- Use Case: A softmax or stream-compaction kernel that serializes on global atomics can be rewritten so each warp reduces locally, one lane per warp updates shared memory, and a single global atomic commits the block result.
Quick Start
Optimize my LuisaCompute kernel that uses shared-memory atomics for a block-wide reduction by applying warp collectives and shared-memory privatization.