[GH-ISSUE #3313] [Engine] the sm_86 table is skipped when a card of another architecture is visible (2x RTX 3090 + RTX 5060 Ti) #1343

Open
opened 2026-11-04 01:50:30 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @txiki739 on GitHub (Oct 20, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3313

Area

Engine

Desktop app, Terminal or source?

Source: the engine built from v0.2.0-beta (3d1fb480, engine 0.1.45.3) for 86;120, started with serve/server.py --engine strata.

What happened

0.2.0-beta turns the sm_86 table on (apply_nv_defaults, src/program/generate.cpp) only when every visible card has the same compute capability. On a PC with two RTX 3090 (sm_86) and an RTX 5060 Ti (sm_120) - the layers split over the two 3090s, the 5060 Ti a helper expert cache (--layer-split auto --split-device 1 --expert-cache-device1 auto --remote-expert-opt) - no table is applied, and the start says nothing about it. With CUDA_VISIBLE_DEVICES=0,1 (the two 3090s only) the same engine prints sm_86 (Ampere): 9 exact speed switches on by default; with 0,1,2 it prints no such line.

With the table's nine switches set by hand in the config's env (UD-IQ4_XS):

default sm_86 table by hand
strata_bench, short chat decode (median of 9) 122.5 126.3 (+3.1%)
strata_bench, agent turns decode (median of 15) 118.0 123.9 (+5.0%)
strata_bench, 32K prompt tok/s 1,917 1,913
six fixed prompts, greedy, decode geomean (2 runs each) 135.2 150.8 (+11.5%)

The strata_bench runs are in the benchmark PR #3314. The six-prompt numbers are from my own harness (Spanish chat and thinking, an 18K document, code, a 3K-token edit, a 5K prompt; 256-2,600 new tokens each, longer answers than strata_bench's). Of its +11.5%, the four kernel switches (CPU_IQ_ALL_EXACT1, ATTN_DAILY, GR_UP75, GU_SWIGLU) gave +5.3% on their own and ADAPT_NOWAIT + ADAPT_LAG +1.7%. On UD-Q4_K_XL the four kernel switches gave +1.7%.

Suggestion: the switches are bitwise and process-wide, so with them set the helper card computes the same values (here they ran on all three cards and were faster). Either pick the table from the cards that run the dense layers (a split's stages, or the main card) and leave helper-only cards out of the "same compute capability" check, or at least print one line when the table is skipped because the visible cards differ and let STRATA_SM86_PERF=1 force it (today only =0 is read).

Reproduction status

Every start: the table line appears with the two 3090s visible and never with the 5060 Ti visible too.

Strata version

0.2.0-beta (engine 0.1.45.3, 3d1fb480)

Graphics card, memory and system

2x RTX 3090 24 GB + RTX 5060 Ti 16 GB (PCIe 4.0 x8 each, one 3090 behind the chipset), Ryzen 9 5950X, 128 GB DDR4, Linux (CachyOS, kernel 7.2), driver 615.78.08, CUDA 13.4, GCC 16.2.1.

Originally created by @txiki739 on GitHub (Oct 20, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/3313 ### Area Engine ### Desktop app, Terminal or source? Source: the engine built from v0.2.0-beta (3d1fb480, engine 0.1.45.3) for `86;120`, started with `serve/server.py --engine strata`. ### What happened 0.2.0-beta turns the sm_86 table on (`apply_nv_defaults`, src/program/generate.cpp) only when every visible card has the same compute capability. On a PC with two RTX 3090 (sm_86) and an RTX 5060 Ti (sm_120) - the layers split over the two 3090s, the 5060 Ti a helper expert cache (`--layer-split auto --split-device 1 --expert-cache-device1 auto --remote-expert-opt`) - no table is applied, and the start says nothing about it. With `CUDA_VISIBLE_DEVICES=0,1` (the two 3090s only) the same engine prints `sm_86 (Ampere): 9 exact speed switches on by default`; with `0,1,2` it prints no such line. With the table's nine switches set by hand in the config's `env` (UD-IQ4_XS): | | default | sm_86 table by hand | |---|---:|---:| | `strata_bench`, short chat decode (median of 9) | 122.5 | 126.3 (+3.1%) | | `strata_bench`, agent turns decode (median of 15) | 118.0 | 123.9 (+5.0%) | | `strata_bench`, 32K prompt tok/s | 1,917 | 1,913 | | six fixed prompts, greedy, decode geomean (2 runs each) | 135.2 | 150.8 (+11.5%) | The `strata_bench` runs are in the benchmark PR #3314. The six-prompt numbers are from my own harness (Spanish chat and thinking, an 18K document, code, a 3K-token edit, a 5K prompt; 256-2,600 new tokens each, longer answers than `strata_bench`'s). Of its +11.5%, the four kernel switches (`CPU_IQ_ALL_EXACT1`, `ATTN_DAILY`, `GR_UP75`, `GU_SWIGLU`) gave +5.3% on their own and `ADAPT_NOWAIT` + `ADAPT_LAG` +1.7%. On UD-Q4_K_XL the four kernel switches gave +1.7%. Suggestion: the switches are bitwise and process-wide, so with them set the helper card computes the same values (here they ran on all three cards and were faster). Either pick the table from the cards that run the dense layers (a split's stages, or the main card) and leave helper-only cards out of the "same compute capability" check, or at least print one line when the table is skipped because the visible cards differ and let `STRATA_SM86_PERF=1` force it (today only `=0` is read). ### Reproduction status Every start: the table line appears with the two 3090s visible and never with the 5060 Ti visible too. ### Strata version 0.2.0-beta (engine 0.1.45.3, 3d1fb480) ### Graphics card, memory and system 2x RTX 3090 24 GB + RTX 5060 Ti 16 GB (PCIe 4.0 x8 each, one 3090 behind the chipset), Ryzen 9 5950X, 128 GB DDR4, Linux (CachyOS, kernel 7.2), driver 615.78.08, CUDA 13.4, GCC 16.2.1.
Author
Owner

@alphastorm commented on GitHub (Oct 31, 2026):

Another mixed-capability data point, a different shape: an RTX 3090 (sm_86, PCIe Gen3 x8) + RTX 4090 (sm_89, Gen3 x16) layer split (--layer-split auto, K=24), Windows 11, Strata v0.2.8 (engine 0.1.54), CUDA 13, Qwen3.8-Flash-Next IQ3_S, 262144 context, --kv int8 --kv-resident 32768 --spec 4 --spec-min-p 0.5 --pipeline-windows 2 --ple-io direct. As here, the start applies no table and says nothing; the 3090 is the slow stage (layer split auto: CUDA0 82 SMs at 1.75 GHz -> 0.50 ms per layer against CUDA1 128 SMs at 2.52 GHz -> 0.22 ms per layer).

The nine switches set in the server's environment (process-wide, so the 4090 got them too; see #3659 for sm_89 on its own). Same install, fresh server per arm, back to back, one 512-token greedy answer per depth:

arm (in run order) decode tok/s at 60 / 8K / 100K tokens TTFT s at 32K / 64K / 100K MTP acceptance at 60 / 100K
default (first) 144.5 / 169.9 / 168.0 11.4 / 20.4 / 31.7 0.82 / 0.86
the nine sm_86 switches 159.2 / 178.7 / 186.4 11.3 / 20.1 / 31.0 0.85 / 0.85
default (last) 143.0 / 169.2 / 168.3 11.4 / 20.1 / 31.0 0.79 / 0.85

Decode +10.7% / +5.4% / +10.8% against the mean of the two default starts, whose spread is 0.2-1.0%; prompt reading unchanged. We can run a build that applies the table per device on this pair with the same arms.

<!-- gh-comment-id:6545697264 --> @alphastorm commented on GitHub (Oct 31, 2026): Another mixed-capability data point, a different shape: an **RTX 3090 (sm_86, PCIe Gen3 x8) + RTX 4090 (sm_89, Gen3 x16)** layer split (`--layer-split auto`, K=24), Windows 11, Strata v0.2.8 (engine 0.1.54), CUDA 13, Qwen3.8-Flash-Next IQ3_S, 262144 context, `--kv int8 --kv-resident 32768 --spec 4 --spec-min-p 0.5 --pipeline-windows 2 --ple-io direct`. As here, the start applies no table and says nothing; the 3090 is the slow stage (`layer split auto: CUDA0 82 SMs at 1.75 GHz -> 0.50 ms per layer` against `CUDA1 128 SMs at 2.52 GHz -> 0.22 ms per layer`). The nine switches set in the server's environment (process-wide, so the 4090 got them too; see #3659 for sm_89 on its own). Same install, fresh server per arm, back to back, one 512-token greedy answer per depth: | arm (in run order) | decode tok/s at 60 / 8K / 100K tokens | TTFT s at 32K / 64K / 100K | MTP acceptance at 60 / 100K | |---|---|---|---| | default (first) | 144.5 / 169.9 / 168.0 | 11.4 / 20.4 / 31.7 | 0.82 / 0.86 | | the nine sm_86 switches | **159.2 / 178.7 / 186.4** | 11.3 / 20.1 / 31.0 | 0.85 / 0.85 | | default (last) | 143.0 / 169.2 / 168.3 | 11.4 / 20.1 / 31.0 | 0.79 / 0.85 | Decode +10.7% / +5.4% / +10.8% against the mean of the two default starts, whose spread is 0.2-1.0%; prompt reading unchanged. We can run a build that applies the table per device on this pair with the same arms.
Author
Owner

@Songokou1983 commented on GitHub (Nov 6, 2026):

Three-card mixed sm_86/sm_89 follow-up (0.2.9, engine 0.1.55)

Hardware: 2× RTX 3080 20 GB (sm_86) + RTX 2000 Ada 16 GB (sm_89), Qwen3.8 IQ3_S,
48 layers, 123 GiB RAM. Production: gpu [0,2,1], layer_split "19,38",
--parallel 2, STRATA_STAGE_TRIM=1.

I ran a small A/B/C/D to check #3313 and the Ada defaults. Medians of 3 runs; each run
starts with a unique prefix so the prompt cache cannot hide the full prefill.

Arm Cards / order Split Decode tok/s 8K prefill 32K prefill
A production 0,2,1 19,38 61.9 1,060.7 1,958.7
B 2×3080 0,2 auto → 23 60.4 596.3 1,077.4
C 3-card auto reordered 1,0,2 auto → Ada 0-2 78.4 674.4 936.5
D 3-card manual 0,2,1 (as_given) 24,45 → Ada 45-47 59.2 937.1 1,319.4

What I saw:

  • The engine's STRATA_* environment was identical in all four arms. I could not reproduce
    the sm_86-table difference through the environment on this box.
  • The 2×3080 arm did not gain decode (60.4 vs 61.9), so this machine does not support a
    simple "mixed cards cost decode" claim either.
  • Auto on three cards reordered the cards to 1,0,2 and gave the Ada layers 0-2. Decode rose
    to 78.4, but prefill fell to 674 / 936 and the Ada cache was only 1,536 slots.
  • Giving the Ada layers 45-47 manually (D) did not reproduce the decode gain; A stayed the
    best balance.

Suggestion: when Auto chooses a split for a mixed 3-card set, it may be worth weighing each
card's expert cache and prefill cost together with decode, or exposing an opt-in guard. I am
not claiming a bug; this is the data from one machine. I can attach configs and logs.

<!-- gh-comment-id:6681285796 --> @Songokou1983 commented on GitHub (Nov 6, 2026): ## Three-card mixed sm_86/sm_89 follow-up (0.2.9, engine 0.1.55) Hardware: 2× RTX 3080 20 GB (sm_86) + RTX 2000 Ada 16 GB (sm_89), Qwen3.8 IQ3_S, 48 layers, 123 GiB RAM. Production: `gpu [0,2,1]`, `layer_split "19,38"`, `--parallel 2`, `STRATA_STAGE_TRIM=1`. I ran a small A/B/C/D to check #3313 and the Ada defaults. Medians of 3 runs; each run starts with a unique prefix so the prompt cache cannot hide the full prefill. | Arm | Cards / order | Split | Decode tok/s | 8K prefill | 32K prefill | |---|---|---|---:|---:|---:| | A production | 0,2,1 | 19,38 | 61.9 | 1,060.7 | 1,958.7 | | B 2×3080 | 0,2 | auto → 23 | 60.4 | 596.3 | 1,077.4 | | C 3-card auto | reordered 1,0,2 | auto → Ada 0-2 | 78.4 | 674.4 | 936.5 | | D 3-card manual | 0,2,1 (`as_given`) | 24,45 → Ada 45-47 | 59.2 | 937.1 | 1,319.4 | What I saw: - The engine's `STRATA_*` environment was identical in all four arms. I could not reproduce the sm_86-table difference through the environment on this box. - The 2×3080 arm did not gain decode (60.4 vs 61.9), so this machine does not support a simple "mixed cards cost decode" claim either. - Auto on three cards reordered the cards to 1,0,2 and gave the Ada layers 0-2. Decode rose to 78.4, but prefill fell to 674 / 936 and the Ada cache was only 1,536 slots. - Giving the Ada layers 45-47 manually (D) did not reproduce the decode gain; A stayed the best balance. Suggestion: when Auto chooses a split for a mixed 3-card set, it may be worth weighing each card's expert cache and prefill cost together with decode, or exposing an opt-in guard. I am not claiming a bug; this is the data from one machine. I can attach configs and logs.
Author
Owner

@Songokou1983 commented on GitHub (Nov 6, 2026):

Follow-up: head/draft placement may explain the C decode gain

The A/C/D numbers in my previous comment point at something more specific than the Ada layer
count. C and D gave the same per-card layer counts (Ada 3 layers; the two 3080s 24/21),
but different head/draft placement:

Arm Stage order / head card Ada layers Decode 8K / 32K prefill
C auto 1,0,2 — head/draft on a 3080 3 78.4 674 / 936
D manual 0,2,1 — head/draft on the Ada 3 59.2 937 / 1,319

So putting the head/draft on the fastest card may buy decode and cost prefill; putting it on
the Ada does the reverse. C vs D is consistent with that, though they also differ in the
explicit split values (auto vs 24,45), so a run that keeps the per-card layer counts and
changes only the head card would confirm it.

Suggestion for mixed 3-card Auto:

  • expose the goal (decode / prefill / balanced), or at least document that gpu_order
    moves the head/draft card;
  • consider letting the head/draft live on the fastest card while the slow card keeps a small
    layer share;
  • weigh the head card's compute and the per-card expert cache together, not free VRAM alone.

This is a tuning hypothesis from one machine, not a bug claim. I can run the isolating arm if
it would help.

<!-- gh-comment-id:6681353897 --> @Songokou1983 commented on GitHub (Nov 6, 2026): ## Follow-up: head/draft placement may explain the C decode gain The A/C/D numbers in my previous comment point at something more specific than the Ada layer count. C and D gave the **same per-card layer counts** (Ada 3 layers; the two 3080s 24/21), but different head/draft placement: | Arm | Stage order / head card | Ada layers | Decode | 8K / 32K prefill | |---|---|---|---:|---:| | C auto | 1,0,2 — head/draft on a 3080 | 3 | 78.4 | 674 / 936 | | D manual | 0,2,1 — head/draft on the Ada | 3 | 59.2 | 937 / 1,319 | So putting the head/draft on the fastest card may buy decode and cost prefill; putting it on the Ada does the reverse. C vs D is consistent with that, though they also differ in the explicit split values (`auto` vs `24,45`), so a run that keeps the per-card layer counts and changes only the head card would confirm it. Suggestion for mixed 3-card Auto: - expose the goal (`decode` / `prefill` / `balanced`), or at least document that `gpu_order` moves the head/draft card; - consider letting the head/draft live on the fastest card while the slow card keeps a small layer share; - weigh the head card's compute and the per-card expert cache together, not free VRAM alone. This is a tuning hypothesis from one machine, not a bug claim. I can run the isolating arm if it would help.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#1343
No description provided.