refactor(linked): migrate gptq_marlin_repack provider - #857
Merged
voltjia merged 4 commits intoAug 7, 2026
Merged
Conversation
voltjia
force-pushed
the
refactor/source-gptq-marlin-repack
branch
from
July 29, 2026 10:46
6ea84ce to
c753381
Compare
voltjia
force-pushed
the
refactor/source-gptq-marlin-repack
branch
from
July 31, 2026 12:24
c753381 to
2f5391b
Compare
gptq_marlin_repack
voltjia
force-pushed
the
refactor/source-gptq-marlin-repack
branch
from
August 7, 2026 02:18
2f5391b to
c53489f
Compare
gptq_marlin_repack
voltjia
changed the base branch from
master
to
refactor/linked-flash-attn-with-kvcache
August 7, 2026 02:19
voltjia
marked this pull request as ready for review
August 7, 2026 03:36
gptq_marlin_repack provider
Ziminli
approved these changes
Aug 7, 2026
whjthu
approved these changes
Aug 7, 2026
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.
Summary
src/linkedcontract for operators exposed through the PyTorch Dispatcher while retaining the existing direct-symbol contract.gptq_marlin_repackCUDA kernel with a thin linked adapter to the installed vLLM_Cbinary.out, tests, and implementation slot.Motivation
The previous NVIDIA implementation adapted vLLM's GPTQ Marlin repack kernel into InfiniOps. Repeating that pattern transfers source ownership, license review, regeneration, and upstream maintenance into this repository.
vLLM already exposes this operator through a typed PyTorch Dispatcher schema. This PR uses that stable host-side boundary instead of copying kernel source or binding an implementation-specific mangled symbol. It is the second representative
src/linkedoperator and exercises a different binary contract from the direct-symbolflash_attn_with_kvcacheprovider in the preceding stacked PR.Upstream implementation: vLLM
gptq_marlin_repack.cuatbc150f50.N/A - no linked issue.
Linked Contracts
Each linked binding declares exactly one of these contracts:
required_symbols)operator_schema+dispatch_key)All selected Dispatcher libraries are loaded together in one isolated configure-time process before their schemas and dispatch keys are checked. This matches the final runtime load set and catches duplicate or conflicting static registrations before compilation.
For this operator:
gptq_marlin_repack(b_q_weight, perm, size_k, size_n, num_bits, is_a_8bit, out)_C::gptq_marlin_repack(Tensor b_q_weight, Tensor perm, SymInt size_k, SymInt size_n, int num_bits, bool is_a_8bit) -> TensoroutTensorvllm, exact library globvllm/_C.*.soThe adapter installs the caller's stream before ATen tensor construction, Dispatcher execution, and the output copy. The vLLM binary must be ABI-compatible with the active PyTorch and CUDA installation.
Type of Change
feat- new feature / new operator / new platformfix- bug fixperf- performance improvement (no behavioral change)refactor- code restructuring without behavior changetest- adding or fixing tests onlydocs- documentation onlybuild/ci- build system or CI configurationchore- tooling, formatting, or other non-code changes!in the Conventional Commits prefix or aBREAKING CHANGE:footer)Platforms Affected
WITH_CPU)WITH_NVIDIA)WITH_ILUVATAR)WITH_METAX)WITH_CAMBRICON)WITH_MOORE)WITH_ASCEND)WITH_TORCH)The focused linked build uses
WITH_TORCH=OFF: this provider depends on PyTorch's C++ ABI and Dispatcher, but it is not a generatedsrc/torchbackend.Smoke Test Result
Remote environment:
ssh nvidia,docker.1ms.run/verlai/verl:vllm020.dev2, NVIDIA A100, PyTorch2.11.0+cu130, vLLM0.20.2, CUDA13.0.The existing smoke operator list was not expanded. The smoke configuration resolved
0linked operators, so the new Dispatcher contract does not make an unrelated pruned build depend on vLLM.Test Results on Supported Platforms
tests/test_gptq_marlin_repack.py --devices nvidia -q:13 passedAdditional validation output
The manual remote build used the current InfiniRT integration prefix. Two pre-existing stacked-base metadata compatibility patches were applied only to the remote validation copy; neither touches this PR's diff. GitHub CI validates the unmodified branch. No full test suite was run, following the agreed pruned-build, focused-test, and smoke-test scope.
Benchmark / Performance Impact
N/A - this PR changes kernel source ownership and linkage, not the public operator contract, and makes no performance claim. The adapter performs one device-to-device copy from the vLLM-returned Tensor into the existing trailing
outTensor.Notes for Reviewers
f375d69dadds the generic Dispatcher contract; commitc53489f1migrates onlygptq_marlin_repack; commit60b72868applies CI's Ruff formatting; commit9bed36a5renames the public binding field tooperator_schema.--push-state,--no-as-neededlinker scope.c10::SymInt, and the trailing-output copy.