Repository navigation
Conversation
bf16_gemm_act_weight_t created a matmul descriptor, three layouts and a preference, ran cublasLtMatmulAlgoGetHeuristic, launched, and destroyed all of it on every call. None of that depends on a data pointer; it is a pure function of (m, n, k, op) and the fixed workspace. Plans are now cached per shape (bf16_plan.rs), bounded at 4096 and cleared on overflow (prefill m follows the chunk length). The heuristic is deterministic for identical inputs, so the cached pick is the algorithm the per-call path chose: same kernel, same output, minus the host setup that made ATLAS_CUBLAS_GEMM=1 measure slower than the tile kernels. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Lets a serve prove the plan-cache path actually fires (RUST_LOG=spark_runtime::cublaslt=debug); one line per new shape. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Validation, attempt 1 (reiner job 255): did not exercise this PR. It is not evidence either way.
Attempt 2 (job 262), on
|
|
Attempt 2 (job 262): the route is confirmed, and a pre-existing OOM hazard showed up.
Cause (not this PR). Anyone enabling Attempt 3 (job 266): same job at util 0.70, which leaves ~36 GB for the copies. |
|
Result (job 266, util 0.70,
Why there is no gain:
What this validation did produce: the OOM hazard (lazily cached BF16 copies of FP8 weights outside the KV budget under |
|
Closing, per the result of job 266. The change is correct but has no measurable effect.
The real finding here is the hazard this validation exposed. |
bf16_gemm_act_weight_tbuilt a matmul descriptor, three matrix layouts and a preference, rancublasLtMatmulAlgoGetHeuristic, launched, then destroyed everything — on every call. None of it depends on a data pointer; it is a pure function of(m, n, k, op)and the fixed workspace. This is the per-call cost that madeATLAS_CUBLAS_GEMM=1measure marginally slower than the tile kernels it replaces (0.4858 vs 0.4797 s at ctx~124, qwen4_exp), and it now sits on hot paths: 27B GDN projections routed by machine fill, and (#68) the mHC skinny GEMMs on every Flash-Next prefill layer.cublaslt/bf16_plan.rs: plans cached per shape behind aMutex<HashMap>, bounded at 4096 and cleared on overflow (prefillmfollows the chunk length).Validation (queued on reiner, job 255)
clippy -D warningson spark-runtime (CUDA; the macOS check compiles the stub)cutlass::tests::bf16GPU tests — CUTLASS vs cuBLASLt on repeated shapes (cache hits)🤖 Generated with Claude Code