[10b/n] Migrate custom all-reduce, DeepSeek V4 fused MLA, MiniMax reduce-RMS, and MXFP8 MoE to libtorch stable ABI - #44365
Merged
Harry-Chen merged 3 commits intoJun 3, 2026
Conversation
Signed-off-by: Chris Leonard <chleonar@redhat.com>
…d MXFP8 MoE to _C_stable_libtorch with stable torch APIs and bindings. Signed-off-by: Chris Leonard <chleonar@redhat.com>
cleonard530
marked this pull request as ready for review
June 2, 2026 22:47
cleonard530
requested review from
Harry-Chen,
LucasWilkinson and
tlrmchlsmth
as code owners
June 2, 2026 22:47
cleonard530
commented
Jun 2, 2026
| return t.is_contiguous() || | ||
| (t.storage().nbytes() - t.storage_offset() * t.element_size() == | ||
| t.numel() * t.element_size()); | ||
| bool _is_weak_contiguous(torch::stable::Tensor& t) { |
Contributor
Author
There was a problem hiding this comment.
Had to redefine _is_weak_contiguous() because the stable wrapper does not expose storage()
Signed-off-by: Shengqi Chen <harry-chen@outlook.com>
janeyx99
reviewed
Jun 3, 2026
Contributor
There was a problem hiding this comment.
how come no move for this one
Contributor
Author
There was a problem hiding this comment.
This is what I mentioned in the comments. I guess because there were too many updates the diff between this and main was too large so GitHub treated it as a deleted/created file instead of a move. If you checkout the commit linked in the description though you can see the diff better
janeyx99
reviewed
Jun 3, 2026
Harry-Chen
approved these changes
Jun 3, 2026
zyongye
added a commit
to zyongye/vllm
that referenced
this pull request
Jun 3, 2026
After rebasing onto main, vllm-project#44365 moved the DeepSeek V4 fused qnorm/rope/KV insert kernel into csrc/libtorch_stable/ and converted it to the stable ABI. The replayed FlashInfer full-cache bf16/fp8 insert ops still used the old ABI (TORCH_CHECK, torch::Tensor, at::cuda::*, VLLM_DISPATCH_HALF_TYPES, data_ptr), which don't exist there. Port them to match the migrated _quant_insert op: - kernel .cu: both full-cache ops + the shared launchFullCacheKernel sm_80 guard now use STD_TORCH_CHECK, torch::stable::Tensor, torch::headeronly::ScalarType, DeviceGuard + get_current_cuda_stream, VLLM_STABLE_DISPATCH_HALF_TYPES, const_data_ptr/mutable_data_ptr. KV byte strides computed from the literal element size (bf16=2, fp8=1) since stable::Tensor has no element_size(). - libtorch_stable/ops.h: declare the two full-cache ops (stable signatures). - libtorch_stable/torch_bindings.cpp: def + TORCH_BOX impl under _C, next to _quant_insert. - csrc/torch_bindings.cpp: drop the stranded non-stable registration. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Yongye Zhu <zyy1102000@gmail.com>
mvanhorn
pushed a commit
to mvanhorn/vllm
that referenced
this pull request
Jun 4, 2026
…uce-RMS, and MXFP8 MoE to libtorch stable ABI (vllm-project#44365) Signed-off-by: Chris Leonard <chleonar@redhat.com> Signed-off-by: Shengqi Chen <harry-chen@outlook.com> Co-authored-by: Shengqi Chen <harry-chen@outlook.com> Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
JisoLya
pushed a commit
to JisoLya/vllm
that referenced
this pull request
Jun 5, 2026
…uce-RMS, and MXFP8 MoE to libtorch stable ABI (vllm-project#44365) Signed-off-by: Chris Leonard <chleonar@redhat.com> Signed-off-by: Shengqi Chen <harry-chen@outlook.com> Co-authored-by: Shengqi Chen <harry-chen@outlook.com> Signed-off-by: JisoLya <523420504@qq.com>
knight0528
pushed a commit
to knight0528/vllm
that referenced
this pull request
Jun 8, 2026
…uce-RMS, and MXFP8 MoE to libtorch stable ABI (vllm-project#44365) Signed-off-by: Chris Leonard <chleonar@redhat.com> Signed-off-by: Shengqi Chen <harry-chen@outlook.com> Co-authored-by: Shengqi Chen <harry-chen@outlook.com>
waqahmed-amd-fi
pushed a commit
to waqahmed-amd-fi/vllm
that referenced
this pull request
Jun 10, 2026
…uce-RMS, and MXFP8 MoE to libtorch stable ABI (vllm-project#44365) Signed-off-by: Chris Leonard <chleonar@redhat.com> Signed-off-by: Shengqi Chen <harry-chen@outlook.com> Co-authored-by: Shengqi Chen <harry-chen@outlook.com> Signed-off-by: Waqar Ahmed <waqar.ahmed@amd.com>
Saddss
pushed a commit
to Saddss/vllm
that referenced
this pull request
Jun 14, 2026
…uce-RMS, and MXFP8 MoE to libtorch stable ABI (vllm-project#44365) Signed-off-by: Chris Leonard <chleonar@redhat.com> Signed-off-by: Shengqi Chen <harry-chen@outlook.com> Co-authored-by: Shengqi Chen <harry-chen@outlook.com>
divineearthly
pushed a commit
to divineearthly/vllm
that referenced
this pull request
Jun 19, 2026
…uce-RMS, and MXFP8 MoE to libtorch stable ABI (vllm-project#44365) Signed-off-by: Chris Leonard <chleonar@redhat.com> Signed-off-by: Shengqi Chen <harry-chen@outlook.com> Co-authored-by: Shengqi Chen <harry-chen@outlook.com> Signed-off-by: divineearthly <divineearthly@gmail.com>
nkzhenhua
pushed a commit
to nkzhenhua/vllm
that referenced
this pull request
Jun 24, 2026
…uce-RMS, and MXFP8 MoE to libtorch stable ABI (vllm-project#44365) Signed-off-by: Chris Leonard <chleonar@redhat.com> Signed-off-by: Shengqi Chen <harry-chen@outlook.com> Co-authored-by: Shengqi Chen <harry-chen@outlook.com>
philippesic
pushed a commit
to philippesic/vllm-semantic-cache
that referenced
this pull request
Jul 19, 2026
…uce-RMS, and MXFP8 MoE to libtorch stable ABI (vllm-project#44365) Signed-off-by: Chris Leonard <chleonar@redhat.com> Signed-off-by: Shengqi Chen <harry-chen@outlook.com> Co-authored-by: Shengqi Chen <harry-chen@outlook.com>
plasticchris
pushed a commit
to plasticchris/vllm
that referenced
this pull request
Jul 20, 2026
…uce-RMS, and MXFP8 MoE to libtorch stable ABI (vllm-project#44365) Signed-off-by: Chris Leonard <chleonar@redhat.com> Signed-off-by: Shengqi Chen <harry-chen@outlook.com> Co-authored-by: Shengqi Chen <harry-chen@outlook.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Continues the libtorch stable ABI migration by moving several kernels out of legacy _C and into _C_stable_libtorch.
This PR migrates custom all-reduce, DeepSeek V4 fused MLA, MiniMax reduce-RMS, and MXFP8 MoE kernels from legacy _C to _C_stable_libtorch, converting host code to stable torch APIs and moving CMake/bindings accordingly. QuickReduce stays on legacy _C for ROCm-only builds
cc @janeyx99 @Harry-Chen
See 7fc426c to see diffs. A few files look like created/deleted instead of moved otherwise.
Test Plan
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.Migration progress using the Audit Python extension torch-abi-audit:
main branch
This branch
No symbols removed