Repository navigation
[Kernel] Reject unsupported layouts in CUTLASS 3.x scaled_mm - #55537
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughThe CUTLASS 3.x scaled matrix multiplication callers now preserve runtime leading strides for supported padded views. Entry points validate A-stride alignment. Tests cover int8, FP8, strided views, and invalid alignment. ChangesCUTLASS stride propagation
Estimated code review effort: 2 (Simple) | ~15 minutes Sequence Diagram(s)sequenceDiagram
participant Test
participant ScaledMMEntry
participant GEMMCaller
participant CUTLASS
Test->>ScaledMMEntry: submit aligned or padded tensors
ScaledMMEntry->>ScaledMMEntry: validate A, B, and output strides
ScaledMMEntry->>GEMMCaller: dispatch scaled matrix multiplication
GEMMCaller->>CUTLASS: pass runtime leading strides
CUTLASS-->>Test: write strided output
Merge Risk: ⚪ Minimal · up to
|
1084637 to
20917ae
Compare
|
@mgoin @tlrmchlsmth, could one of you please take a look at this PR when convenient?
|
78321ee to
4c9d129
Compare
Assisted-by: OpenAI Codex <codex@openai.com> Signed-off-by: jackLei0901 <42642542+jackLei0901@users.noreply.github.com>
4c9d129 to
7b054ac
Compare
|
@tlrmchlsmth Following our Slack discussion, I rewrote this PR around the reject-only contract and force-pushed the revised version as a single commit (7b054ac). |
|
i read the revised contract in #55537. it changes the integration plan for #56480: the shared entry guard would reject its sm100 padded-layout cases before they reach the callers, so a rebase would not make the two approaches work together my b300 runs show the sm100 callers can honor padded strides, including a deliberately padded qwen weight view. i haven't found an in-tree serving path that needs that layout. @tlrmchlsmth is reject-only the intended contract for sm100 too? if so i'll close #56480 and keep the regression evidence available. holding off on rebase and more gpu work meanwhile |
Signed-off-by: jackLei0901 <42642542+jackLei0901@users.noreply.github.com>
|
/ci run |
|
✅ Triggered Buildkite CI #94797 for commit |
|
@yewentao256, a quick update on 94797 (a4a6bcf): all three B200 kernel shards passed, including test_cutlass_subset. The earlier failures have cleared. |
Signed-off-by: jackLei0901 <42642542+jackLei0901@users.noreply.github.com>
Signed-off-by: jackLei0901 <42642542+jackLei0901@users.noreply.github.com>
|
/ci run |
|
✅ Triggered Buildkite CI #95028 for commit |
|
/ci retry |
|
✅ Queued 2 failed job(s) for retry in Buildkite CI #95028. |
A final update on build 95028 (de68d85): build 95028 on de68d85 has finished. All three B200 kernel shards passed, the queued jobs completed successfully, and MI355 mono-decode passed on retry. |
|
/ci retry |
|
✅ Queued 1 failed job(s) for retry in Buildkite CI #95028. |
Bring in the upstream hadacore partial-warp fix. The CUTLASS guard and subset regression are unchanged. No new local GPU validation was run; validation of the updated base is pending CI. Assisted-by: OpenAI Codex Signed-off-by: jackLei0901 <42642542+jackLei0901@users.noreply.github.com>
|
/ci run --allow-stale |
|
✅ Triggered Buildkite CI #95613 for commit
|
@yewentao256 Build 95613 (b1fd28c) has finished. All three B200 kernel shards and all four H200 quantization shards passed, including the previously failing hadacore test. |
…roject#62221 Assisted-by: OpenAI Codex Signed-off-by: jackLei0901 <42642542+jackLei0901@users.noreply.github.com>
|
/ci run |
|
✅ Triggered Buildkite CI #95695 for commit |
|
/ci run |
|
✅ Triggered Buildkite CI #95726 for commit |
|
@yewentao256 Thanks for updating the branch and rerunning CI! 95726 is done. All three B200 kernel shards, all four H200 quantization shards, the Rust frontend jobs and the MI355 sampler job passed.
|
Include vllm-project#62274, vllm-project#62280, vllm-project#62286 and vllm-project#62241. The CUTLASS PR diff is unchanged; updated-base runtime validation is left to CI. Assisted-by: OpenAI Codex Signed-off-by: jackLei0901 <42642542+jackLei0901@users.noreply.github.com>
|
/ci run |
|
✅ Triggered Buildkite CI #95816 for commit |
Overview
Reject unsupported padded operands and misaligned pointers before CUTLASS 3.x scaled-mm dispatch (#55534). Packed inputs and CUTLASS 2.x behavior remain unchanged.
Claims
Validation
This PR passes the repro by rejecting the padded input, not by supporting it. Reversing the change reproduced the main failure again; the main-repeat log is included.
Raw command/output logs, including all nine benchmark runs: validation evidence.
H800 PCIe (SM90), torch 2.13.0+cu130. Main at
3e8e1364ffwas built from source, including its pinned FlashAttention. The H800 results below validate5b18e7656con base3e8e1364ff, before the source-layout refactor in #60721. The subsequent main merge follows the source rename and updates its two include paths; the operand guard and existing subset regression are unchanged. The new layout has not been built or GPU-tested locally; CUDA CI will be the first build validation of this revision. Only the scaled-mm entry object and stable extension were rebuilt when switching between main and this change; every other native library stayed byte-identical.Historical H800 validation passed 7 boundary cases (the existing subset case plus 6 dedicated cases), 36 packed/output-dtype/CUDA-graph cases, and 11 offline INT8/AZP/size-one/pointer cases. The six dedicated cases were removed from the committed tests at yewentao256's request; their raw logs remain in the linked gist. Every serving run logged
Selected CutlassFP8ScaledMMLinearKernel. Only SM90 was tested locally. The B200 selector is now-k 'fp8 or cutlass_subset': it retains the existing FP8 tests and adds the one existing subset regression. This CI result is pending.Accuracy command and raw lm_eval output
The server command was the same on main and this PR:
The output directory changed between main and this PR; all other evaluation arguments stayed fixed. All 1,319 GSM8K examples completed. The full sample JSONL files were byte-identical (SHA-256
08078a7d51736f125add194b827000344c7c6fc5a1bef0a3ca21aa1cbbbc0e0d); the large sample files are retained privately. The API harness used its default 2,047-token context limit.Benchmark command and raw output from repetition 2
Three repetitions were run on main, then this PR, then main again. All nine command/output logs are included. The first repetition in each group was slower (about 3.0k output tok/s); later repetitions were 6.47-6.66k tok/s. The cause of this warm-state difference was not isolated. Corresponding repetition 2 outputs are shown here; these are not a speedup claim. Benchmark sampling temperature was not explicitly set.
Details
C3x callers reconstruct packed strides from shapes, so incompatible operands can silently address the wrong elements. This change rejects them at dispatch rather than adding stride support. No current in-tree serving caller requiring padded operands has been identified; the model runs check normal packed serving for regressions.
This revises the existing #55537, not a parallel fix. #56248 and #56659 remain open stride-support alternatives. The author closed #56480 on October 8 because its SM100 stride support conflicts with this shared reject-only contract; that is not a maintainer approval of this PR. The architecture-wide contract still needs agreement. INT8/AZP/size-one cases removed from the committed test matrix remain in the offline evidence; the implementation still checks those inputs.
AI assistance was used for diagnosis, patch preparation, validation and this description.
Pull Request Checklist
/pr-checklistskill. (Mandatory for agents, optional for humans).BEFORE SUBMITTING, PLEASE READ https://docs.vllm.ai/en/latest/contributing (anything written below this line will be removed by GitHub Actions)