Skip to content

[Bugfix][SM70] Emit sampler stable ABI module - #320

Merged
yangzhuxinyzx merged 1 commit into
mainfrom
codex/v100-sm70-sampler-sabi-20260826-043510
Aug 26, 2026
Merged

yangzhuxinyzx merged 1 commit into
mainfrom
codex/v100-sm70-sampler-sabi-20260826-043510

Conversation

@yangzhuxinyzx

Copy link
Copy Markdown
Contributor

Purpose

Repair single-architecture SM70 source packaging for vllm._sm70_sampler_C.

setup.py declares the CMake extension with py_limited_api=True and expects _sm70_sampler_C.abi3.so, but the CMake target had WITH_SOABI without USE_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.
  • Isolated CMake configure with CUDA 12.8, Torch 2.10, Python 3.12, and TORCH_CUDA_ARCH_LIST=7.0 — passed.
  • cmake --build <isolated-build> --target _sm70_sampler_C -j=2 — passed.
  • Output: _sm70_sampler_C.abi3.so, 1,692,488 bytes.
  • Generated build rules contain Py_LIMITED_API=3 and TARGET_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.

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>
@yangzhuxinyzx
yangzhuxinyzx marked this pull request as ready for review August 26, 2026 04:44
@yangzhuxinyzx
yangzhuxinyzx merged commit 5245946 into main Aug 26, 2026
4 checks passed
@yangzhuxinyzx
yangzhuxinyzx deleted the codex/v100-sm70-sampler-sabi-20260826-043510 branch August 26, 2026 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant