[Bugfix][SM70] Emit sampler stable ABI module - #320
Merged
Merged
Conversation
Match setup.py limited-API packaging and sibling extension targets so single-arch SM70 source builds produce the expected .abi3.so module. Reported-by: Andrew Leech <andrew@alelec.net> Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.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
Repair single-architecture SM70 source packaging for
vllm._sm70_sampler_C.setup.pydeclares the CMake extension withpy_limited_api=Trueand expects_sm70_sampler_C.abi3.so, but the CMake target hadWITH_SOABIwithoutUSE_SABI 3. It therefore emitted a CPython-versioned filename and the packaging copy step could not find the expected stable-ABI module.Add
USE_SABI 3, matching the sibling vLLM extension targets.Reported by Andrew Leech in #319. This signed repair preserves that attribution because the original commit did not include the repository-required DCO sign-off.
Test Plan / Result
pre-commit run --files CMakeLists.txt— all applicable hooks passed.TORCH_CUDA_ARCH_LIST=7.0— passed.cmake --build <isolated-build> --target _sm70_sampler_C -j=2— passed._sm70_sampler_C.abi3.so, 1,692,488 bytes.Py_LIMITED_API=3andTARGET_FILE = _sm70_sampler_C.abi3.so.torch.ops.load_library(_sm70_sampler_C.abi3.so)— passed; all three sampler ops registered.No GPU execution or end-to-end model test was needed; the kernel source and runtime behavior are unchanged.