Repository navigation
chore(marlin): drop the sm_75 (Turing) path; require sm_80+ - #5200
Merged
Merged
Conversation
Remove the Turing support added with the upstream Marlin sync (#2717): * marlin_mma.h: the m16n8k8 MMA paths and the FP16-accumulate variant; mma() and mma_trans() lose the use_fp16_accum template parameter. * marlin_template.h: the sm_75 use_fp16_accum epilogue conversion and the bf16 early return. Kernels compile to stubs below sm_80 again, so a mixed TORCH_CUDA_ARCH_LIST that includes 7.5 still builds. * gptq_marlin.cu: the 2-stage Turing pipeline, its kernel selection and tile-validity rules, and the Turing capability branch. The host now requires compute capability >= 8.0. * generate_kernels.py: no more stage-2 instantiations (fp16 instantiations go from 616 to 330). * GPTQ MarlinLinear and the Marlin runtime check require sm_80, matching AWQ Marlin; the fp16-only sm_75 dtype gate is gone. The cp.async fallbacks in marlin.cuh predate the Turing work. They stay, so the repack kernels keep building for any arch list. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Qubitium
marked this pull request as ready for review
November 18, 2026 11:03
This was referenced Nov 18, 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
Drops Marlin's sm_75 (Turing) path. Marlin now requires compute capability 8.0+ for GPTQ, which AWQ Marlin already required.
Turing support came in with the upstream Marlin sync (#2717). It added an m16n8k8 MMA path, an FP16-accumulate variant, a 2-stage pipeline with its own kernel instantiations and tile rules, and an fp16-only dtype gate in Python. This PR removes all of it and restores the
< 800kernel stubs.What Changed
gptqmodel_ext/marlin/marlin_mma.h: remove the__CUDA_ARCH__ == 750m16n8k8 MMA paths and the FP16-accumulate branch.mma<scalar_t>()andmma_trans<scalar_t>()no longer takeuse_fp16_accum.gptqmodel_ext/marlin/marlin_template.h:__CUDA_ARCH__ < 800(was< 750).use_fp16_accumconstant, the half→float epilogue conversion and the sm_75 bf16 early return.gptqmodel_ext/marlin/gptq_marlin.cu:< 800, with the messagerequires CUDA_ARCH >= 8.0.major_capability >= 8("Ampere or newer").stages = 2branch and the fp16-only check, allstages == 2kernel selection, the stage-2 tile filter in_GET_IF, and the stage-2 rule inis_valid_config.gptqmodel_ext/marlin/generate_kernels.py: no stage-2 instantiations. fp16 kernel instantiations drop from 616 to 330, so fp16 JIT builds are faster.gptqmodel_ext/marlin/kernel_fp16_ku8.cu: regenerated. It is one of the two generated kernel files tracked in git.gptqmodel/nn_modules/qlinear/marlin.py:_MARLIN_MIN_CAPABILITY = (8, 0). Remove_MARLIN_SM75_CAPABILITYand the "compute capability 7.5 requires dtype=torch.float16" gates in_validate/post_init.gptqmodel/utils/marlin.py:_marlin_capability_supportedismajor >= 8; the error message says>= 8.0.cp.asyncfallbacks inmarlin.cuh(__CUDA_ARCH__ < 800). They predate the Turing work and keep the repack kernels compiling whenTORCH_CUDA_ARCH_LISTincludes an older arch.docs/support-matrix.mdlists Marlin undersm_80+.Tests
Test changes:
test_marlin_capability_checks_allow_sm75_but_reject_sm70becomestest_marlin_capability_checks_require_sm80...._validate_device_allows_sm75/..._rejects_pre_turingbecome..._allows_sm80/..._rejects_turing.test_sm75_turing_contract_is_present_in_marlin_sourcesandtest_stage2_dense_four_bit_tiles_...are replaced bytest_marlin_sources_have_no_turing_path. It asserts that no== 750path,use_fp16_accum,m16n8k8orstages == 2remains, and that no generated kernel instantiates stage 2.test_marlin_scratch_cuda.py: the skip rule ismajor < 8.test_marlin_scratch_cuda.pycases need two CUDA devices visible, and one needs a built Machete extension.TORCH_CUDA_ARCH_LIST="7.5;8.9", both Marlin fp16 and bf16 extensions build (sm_75gets the stub kernels).ruff check gptqmodel docs/eora tests setup.py(0.14.2): all checks passed.Model Support / Module Plan
Not applicable.
AWQ onboarding safety
Not applicable.
Logic Flow Documentation
Kernel selection simply loses its sm_75 branch; no new mechanism.
Review Requirements
Kernel Accuracy Requirements
Notes
🤖 Generated with Claude Code