Skip to content

[Chore] deps: Add nvidia-cuda-tileiras for the optional cuTile router - #45290

Draft
Jiminator wants to merge 99 commits into
mainfrom
beam-stack-deps-tileiras
Draft

Jiminator wants to merge 99 commits into
mainfrom
beam-stack-deps-tileiras

Conversation

@Jiminator

@Jiminator Jiminator commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

#45361 makes the cuTile BF16x3 router GEMM Beam's default router on Hopper and SM10x Blackwell. cuda-tile comes in through flashinfer-python (cuda-tile>=1.4.0), but it compiles its kernels with the tileiras compiler. The CUDA 13.0 toolkit in the release image doesn't ship tileiras, and no current dependency installs it. Without it, a Beam server fails during prefill CUDA-graph capture on every TP rank with FileNotFoundError: 'tileiras' compiler not found.

Split out of #44747 so the dependency can be reviewed on its own. Merge it right before #45361, and only if #45361 lands.

Modifications

Adds nvidia-cuda-tileiras==13.4.92 to python/pyproject.toml. Validation used tileiras, nvidia-cuda-nvcc and nvidia-nvvm 13.4.92, which must share their major.minor.

Validation

Merge order

Each part is based on the one before it, so its diff shows only its own changes. Merge bottom-up; after each part merges, the next part is retargeted to main and main is merged into it. #44747 stays open, unchanged, as the full reference. Merge in this order:

  1. [Chore] docker: Add Beam CUDA image (1/8) #45253 — Beam CUDA Docker image (merged)
  2. [Chore] deps: Bump the OpenAI SDK to 2.8.0 for Responses shell tools (2/8) #45291 — OpenAI SDK 2.8.0, needed by the Responses shell tools in [Feat] parser: Add Beam reasoning, tool calls and response templates (5/7) #45257 (merged)
  3. [Feat] kernels: Beam model support #45254 — Kernels
  4. [Feat] beam: Add Beam model, runtime support and checkpoints (4/7) #45256 — Attention, memory and DFlash DP support, and the Beam model ([Feat] srt: Add attention, memory and DFlash DP support for Beam (4/8) #45255 folded in; also after [Fix] nccl: Disable graph buffer registration whenever a captured graph can hold a collective #43216)
  5. [Feat] parser: Add Beam reasoning, tool calls and response templates (5/7) #45257 — Beam reasoning, tool calls, response templates and the Beam E2E test (also after [Fix] parser: Accept whole-number floats for integer tool arguments #43941 and [Feat] parser: Add checkpoint-driven response-template adapters #40479; [Feat] parser: Enrich chat_parsing streaming events #40478 is merged)
  6. [Chore] deps: Add nvidia-cuda-tileiras for the optional cuTile router #45290 — nvidia-cuda-tileiras, needed by [Perf] beam: Add optional cuTile BF16x3 router GEMM #45361
  7. [Perf] beam: Add optional cuTile BF16x3 router GEMM #45361 — cuTile BF16x3 router GEMM (optional: without it Beam uses the cuBLAS router)

#45292 (Dynamo and grpcio-tools pins for the Beam image) is not in the merge order for now.


CI States

Latest PR Test (Base): ❌ Run #39665206721
Latest PR Test (Extra): ❌ Run #39665206514
Latest PR Test (AMD ROCm 10): ❌ Run #39665206582

yonigozlan and others added 30 commits September 27, 2026 15:51
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
A `repeats` field appends into the default list object owned by the
compiled template (and, through the shallow copy, into the caller's
spec dict), so one parse's tool calls leak into every later parse
sharing the template. Deep-copy defaults at template load and at
parser init, and add a regression test.
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Delimiter text comes from the input offsets, and open events keep named
captures. Unmatched text around XML tags no longer fails the parse.
Keep the event contract to what adapters need: open, close and malformed
events carry the span of input_text they consumed, explicit opens carry
their captures, and malformed events carry the original error.

- Drop per-chunk offsets, prefix_end, close_start and closed; the prefix
  boundary is len(input_text) before the first feed().
- parse_response re-raises the original exception, like Transformers.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
`parse_response` only checked events from the generated text, so a
region the prefix left malformed was silently ignored. Include
`initial_events` in the check.

Co-authored-by: Cursor <cursoragent@cursor.com>
Connect checkpoint `response_template` metadata to SGLang reasoning and
tool parsing through the `chat_parsing` streaming events.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Configure response-template detokenization in `_process_messages`, so
  the Responses API gets the same special-token settings as Chat and no
  longer inspects `ResponsesRequest` as a chat request.
- Honor `force_nonempty_content` in the reasoning detector.
- Define `think_excluded_tokens` and `get_think_end_token_ids`, which
  strict thinking and scheduler startup read from every reasoning
  detector.
- Register `response_template` in the CLI parser name lists.

Co-authored-by: Cursor <cursoragent@cursor.com>
With tool_choice "required" or a named tool, a response-template tool
parser has no native constraint, so serving uses the generic JSON schema
and parses the JSON array the model writes after its reasoning. Two things
broke that path:

- When every field of the template has an opener, the reasoning parser has
  no field for text outside them, so it dropped the JSON.
- Detokenization keeps a tool-call closer that stops generation, so a JSON
  array ended by one failed to parse, or streamed the closer as content.

Serving now records on the request whether a grammar governs the output
(tool JSON schema, response_format, regex, ebnf or structural tag). Only
then does the reasoning parser pass text outside the template's fields
through, and a kept closer is trimmed like any other matched stop. This
covers Chat and Responses, streaming and non-streaming.
Serving now records where an output grammar takes over from the response
template: after the reasoning when the grammar backend gates on it, or
from the first token. The response-template reasoning parser stops at the
reasoning closer, as the grammar backend does, and passes the rest through
unparsed, so a JSON string containing template delimiters is no longer
rewritten. Unconstrained requests keep the template's own parsing.

JsonArrayParser also gains finish(). An increment emits a call's name
before its arguments, so a call that arrived whole in the last chunk lost
its arguments; Chat and Responses streams now flush it at stream end like
the other tool parsers.
The grammar backend defers an output grammar until the reasoning ends only
when the reasoning parser's think_end_token encodes to token ids; otherwise
the grammar applies from the first token. A response-template thinking
field that closes with a pattern has no such token, yet a request asking
for reasoning was still marked to parse reasoning first, so the JSON the
grammar produced from the start was dropped. Check the same condition the
scheduler checks before recording where the grammar takes over.
Only JSON-schema output replaces the response template's framing. A
structural tag, regex or EBNF constraint can spell the template's own
delimiters, so its output keeps the template's parsing: content wrappers
are removed and a native tool call that ends on its kept closer is still
returned. The JSON repairs for required and named tool choice and
response_format are unchanged.

Also shorten the related comments and give the regression tests
black-box docstrings in place of assertions on private state.
The two non-streaming Gemma 4 tool-call parity tests differed only in
their input, so they are now subtests of one method, as the reasoning
parity test already is. _collect_tool_stream repeated its call
accumulation for the finish() result; one loop now covers every result.
The Gemma 4 call's expected arguments were written out three times and
are now named once next to the call.

Every input, detector and assertion is kept.
The result of feeding "}" was assigned to closed and immediately
overwritten by the "</call>" result; only the call itself matters.
`has_tool_call` streamed the text through the adapter, which holds back
an opener whose pattern could still grow. A response cut off right
after a call header was then treated as plain content and returned the
raw opener. Parse the text as complete instead, so the cut-off call is
dropped like any other malformed call.

Signed-off-by: Yoni Gozlan <yonigozlan@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@Jiminator Jiminator changed the title [Chore] deps: Add nvidia-cuda-tileiras for the cuTile router GEMM (7/8) [Chore] deps: Add nvidia-cuda-tileiras for the cuTile router GEMM (6/7) Oct 21, 2026
@mintlify

mintlify Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
sglang-doc 🟢 Ready View Preview Oct 21, 2026, 7:56 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@github-actions github-actions Bot added documentation Improvements or additions to documentation quant LLM Quantization speculative-decoding blackwell SM100/SM120 jit-kernel memory-pool labels Oct 21, 2026
@Jiminator
Jiminator changed the base branch from main to beam-stack-05-parser October 21, 2026 19:51
Base automatically changed from beam-stack-05-parser to beam-stack-04-model October 25, 2026 05:25
Base automatically changed from beam-stack-04-model to beam-stack-02-kernels October 25, 2026 22:00
Base automatically changed from beam-stack-02-kernels to main October 26, 2026 19:29
@Jiminator Jiminator changed the title [Chore] deps: Add nvidia-cuda-tileiras for the cuTile router GEMM (6/7) [Chore] deps: Add nvidia-cuda-tileiras for the optional cuTile router Oct 26, 2026

This branch was successfully deployed

1 active deployment
staging - docs — 43946adc Deployed Oct 21, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blackwell SM100/SM120 dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation jit-kernel memory-pool quant LLM Quantization speculative-decoding

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants