fix(kernel): drop Triton vendored CUDA include path from nvcc -I - #247
Merged
Merged
Conversation
``_resolve_include_dirs`` adds ``tokenspeed_triton/backends/nvidia/include``
and ``triton/backends/nvidia/include`` to nvcc's ``-I`` whenever the
matching ``cuda_runtime.h`` exists. Those Triton bundles ship a
CUDA-12-era ``crt/host_runtime.h`` whose ``__cudaLaunch`` is a 1-arg
macro; nvcc 13.0's generated ``cudafe1.stub.c`` calls it with 2 args.
When the host's system CUDA install is on nvcc's implicit search path
(e.g. a baked-in image) the system ``crt/host_runtime.h`` wins and
nothing breaks. On hosts where the system layout doesn't get
auto-picked (e.g. apt-installed CUDA 13 SDK exposed via a
``/usr/local/cuda`` symlink, observed downstream in smg CI), nvcc
falls through to the Triton bundles and the build fails with:
error: macro "__cudaLaunch" passed 2 arguments, but takes just 1
The CUDA runtime headers nvcc needs are already covered by
``CUDA_HOME/include`` (from ``_cuda_toolkit_roots``) and the
``nvidia/cu*/include`` PyPI packages — folding the Triton bundles in
is gratuitous and unsafe, so drop the block entirely.
Signed-off-by: zhyncs <46627482+zhyncs@users.noreply.github.com>
zhyncs
force-pushed
the
zhyncs/kernel-drop-triton-include-path
branch
from
May 25, 2026 09:40
1e2d274 to
ce9d989
Compare
lightseek-bot
approved these changes
May 25, 2026
zhyncs
added a commit
to chenht2022/smg
that referenced
this pull request
May 25, 2026
- Drop the per-requirements-file installs and the wheel-cache scaffolding; let ``uv pip install -e ./python | tokenspeed-kernel/python | tokenspeed-scheduler/`` resolve their own dependency metadata. - Preseed ``setuptools wheel pybind11`` so the two ``--no-build-isolation`` builds find their backend in the venv. - Bump ``TOKENSPEED_REF`` to ``5e145afa`` (post lightseekorg/tokenspeed#247) so kernel build no longer fails on the stale Triton-bundled ``__cudaLaunch`` macro. Signed-off-by: zhyncs <46627482+zhyncs@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.
_resolve_include_dirsfoldstokenspeed_triton/backends/nvidia/includeandtriton/backends/nvidia/includeinto nvcc's-I. Those bundles ship a CUDA-12-eracrt/host_runtime.hwhose__cudaLaunchis a 1-arg macro; nvcc 13.0's generated stubs call it with 2 args. On hosts where the system CUDA'scrt/host_runtime.hisn't on nvcc's implicit search path (e.g. apt-installed CUDA 13 SDK behind a/usr/local/cudasymlink, observed in smg CI), the build dies witherror: macro "__cudaLaunch" passed 2 arguments, but takes just 1.CUDA_HOME/includeand thenvidia/cu*/includeblock already cover what nvcc needs, so drop the Triton block.Verified inline-patched in smg-project/smg#1515 — once that CI is green the same change is safe to merge here.