Skip to content

train 1126234500: #4127 #5165 (CI only) - #5276

Closed
ashhart wants to merge 27 commits into
mainfrom
lead/train-1126234500
Closed

ashhart wants to merge 27 commits into
mainfrom
lead/train-1126234500

Conversation

@ashhart

@ashhart ashhart commented Nov 27, 2026

Copy link
Copy Markdown
Owner

CI for a landing train: #4127 #5165 stacked on main in that order. Nothing merges from this PR: each PR above lands on its own once this tip is green, and this PR is then closed.

ajensenwaud and others added 27 commits November 26, 2026 23:45
The family's attention was a copy of prefill_attention.cu's
vision_kernel, so the tower now calls vit.Attention.full at head dim 64,
the instance and record Qwen3-ASR already brought to main.
grouped_body takes the member tiles a program as a template parameter.
tf_exl3_grouped_wide_2 runs 32 members by 64 columns for prompt chunks;
the existing instantiations compile to the same SASS on every SM.
nvcc 13.3 changed tf_exl3_grouped_2's sm_120 and sm_121 SASS when the
wide instance followed it; defined first, every existing kernel compiles
as before under 13.0 and 13.3.
The item plan was limited to mcg and slot rows written to ey. It now
takes every codebook, writes scratch y when ey is 0, picks the wide
kernel for 32-member items and the capped epilogue for act_mode 3.
The family's grouper and grouped projections were copies of core's.
Inkling now runs exl3_experts.runWith on grouped.Router's item plan,
16-member items below 512 rows and the wide kernel from there; outputs
are bit-equal to the kernels this replaces. Expert widths up to 8 bits
are admitted, as core decodes them.
tf_ink2_gateup duplicated core's gate/up epilogue apart from the
softcaps, which core now runs as act_mode 3. Its registration moves to
tf_exl3_gateup_capped, with the swapped-caps control kept.
RADIO, MiniMax M3, Qwen 27 and Inkling 2 each kept their own copy of
the placeholder span and the cut that maps a prompt pass onto it. They
now share core.image_rows, started from RADIO's copy, and each family
keeps only its own splice.

The cut now works in usize and takes the offset before adding the
buffer row, as RADIO's did. MiniMax M3 and Inkling 2 already cut in
usize, so their results are unchanged. RADIO and Qwen 27 no longer
overflow u32 on a span that ends past 2^32; nothing else changes.
Inkling 2's tf_ink2v_scale_add was a layer-scaled residual add, which
is tf_vit_pointwise with a per-column scale between the activation and
the add. vit.cu now has tf_vit_pointwise_gamma for that, and the tower
calls it through vit.Kernels.pointwiseGamma. Its fp32 multiply, bf16
rounding and add are the same round-to-nearest steps the family kernel
took, so the tower's results are unchanged.

Every existing function in vit.cu and inkling2/vision.cu compiles to
the same SASS on sm_80, 86, 89, 120 and 121 under nvcc 13.0 and 13.3.
The contract now registers the core kernel, with the late-gamma control
retargeted to it; its records come from cuobjdump -res-usage, and 13.2
stays pending.
The Metal and residency builds give qwen27 its own core roots, which
lacked image_rows after the shared module moved into core.
Core builds exl3_experts.cu with contraction on, so the soft-capped
SwiGLU's products and sum fused into FMAs, and Inkling 2 Small's tokens
no longer matched the build it was validated on. Explicitly rounded
operations give the SASS the old text has at the glue kernels' flags.
…ls, bit for bit

With #4127, Inkling 2's softcapped gate/up epilogue and vision layer scale
come from core (tf_exl3_gateup_capped, tf_vit_pointwise_gamma) in place of
main's family kernels (tf_ink2_gateup, built at --fmad=false, and
tf_ink2v_scale_add). A host test writes both kernels' arithmetic at their
rounding points: every product and sum on its own, the same order, the shared
rotation and the fp16 or bf16 store. Over 512 random 128-column blocks with
saturating and non-finite inputs, and 65,536 layer-scale values, the old and
new forms give the same bits. A control contracts one product into the
rotation's first sum, as core's fmad=true flags would without the explicit
_rn operations, and it differs, so the comparison can see one fused rounding.
Main added layer_norm_eps to the shared vision config, and the CUDA
tower's test config no longer compiled. The tower now reads eps from
the config instead of a constant; the release's 1e-5 is unchanged.
Unset keeps the driver's auto schedule, which spins one host core per server
on a GB10. The setting is registered in platform/environment.zig (auto, spin,
yield or blocking, refused by name otherwise) and applied to the primary
context before the shared CUDA open and the MOSS image host create it.
Qwen3, Qwen4, LFM2, Drama and ZONOS3 open their own CUDA contexts before the
shared open, so a valid TF_CUDA_SCHED was accepted and then ignored for them.
Qwen4, LFM2 and Drama's device limit apply it on their own driver; Qwen3 and
ZONOS3, whose engines open the driver inside their family modules, hold one
with the setting until the engine's context starts.
…F_CUDA_SCHED is off

An ordinal past c_int is refused (NoSuchCudaDevice) only when the setting is on, before a driver opens; unset and
blank return null whatever the ordinal. The Qwen3 and ZONOS3 call sites pass the ordinal unchanged. Host regression
for both.
@ashhart ashhart closed this Nov 27, 2026
@ashhart ashhart reopened this Nov 27, 2026
@ashhart

ashhart commented Nov 27, 2026

Copy link
Copy Markdown
Owner Author

Stopped at #4127.

@ashhart ashhart closed this Nov 27, 2026
@ashhart
ashhart deleted the lead/train-1126234500 branch November 27, 2026 01:41
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.

3 participants