perf: move decode split partials to InferenceWorkspace
- Replace per-.cu-file static cached tensors with workspace-managed pre-allocated buffers - InferenceWorkspace now owns decode_o_part / decode_ml_part (mirrors FlashInfer's workspace pattern) - KVCache carries the buffers through the backend -> C++ kernel chain - C++ kernels accept optional pre-allocated buffers; fallback to alloc_split_partials for backward compat - Pre-allocates once at Executor init, zero allocation in the decode hot loop - Prerequisite for CUDA-graph capture (all kernel addresses are stable)
This commit is contained in:
@@ -14,7 +14,12 @@ from tests.extension.conftest import D, skip_no_kernel
|
||||
|
||||
def _ws(pool: PagePool) -> InferenceWorkspace:
|
||||
return InferenceWorkspace(
|
||||
pool.max_batch_size, pool.max_seq_len, pool.device, pool.dtype
|
||||
pool.max_batch_size,
|
||||
pool.max_seq_len,
|
||||
max_q_heads=2,
|
||||
head_dim=64,
|
||||
device=pool.device,
|
||||
dtype=pool.dtype,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user