[PR #2115] [Other] setup: the SYCL setup on an integrated Arc (xe): native launcher, a RAM fit rule, no KV streaming #3868

Open
opened 2026-11-07 15:31:19 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/2115
Author: @andersson82
Created: 10/12/2026
Status: 🔄 Open

Base: main ← Head: sycl-igpu-setup


📝 Commits (2)

  • 955658e sycl: run on an integrated Arc (Arc 140T, xe): free memory from /proc/meminfo, no prompt-slot borrowing, a native launcher
  • 887defc setup: the SYCL setup on an integrated Arc (xe): native launcher, a RAM fit rule, no KV streaming

📊 Changes

7 files changed (+439 additions, -26 deletions)

View changed files

📝 docs/INTEL.md (+80 -0)
📝 docs/INTEL_ARC.md (+3 -2)
📝 sycl/include/dpct/device.hpp (+23 -1)
➕ sycl/serve/strata-sycl-native.sh (+28 -0)
📝 sycl/setup_intel.py (+196 -22)
📝 sycl/src/program/generate.cpp (+10 -0)
📝 tools/test_setup_sycl.py (+99 -1)

📄 Description

Problem and result

./setup.sh --backend sycl on a PC whose only Intel GPU is integrated (an Intel GPU at PCI 00:02.0 on xe) stops
with "no Intel Arc found". With this change it finds the GPU, checks that oneAPI and the engine build are on the PC,
offers the sizes that fit the RAM, and writes a config for sycl/serve/strata-sycl-native.sh (no Docker). On the Arc
140T with Strata 0.2.2 that config serves 10 of 10 requests (8.4-12.7 tok/s decode).

Depends on #2114 (the launcher and the iGPU memory query): until that one is merged this diff also shows its commit;
the change of this pull request is the last commit.

None agreed in an issue; it is the setup half of #2114 (platform support for an integrated Arc, which the maintainers
have no machine to gate). Rebased on 0.2.2 and re-run; rebased again on 0.2.3 on 2026-10-23 (one conflict, see the pictures bullet below), and on 0.2.8 (main 870aedd9) on
2026-10-30 (the code applied cleanly; main rewrote docs/INTEL.md, so the docs part was redone in its new layout).

Approach

sycl/setup_intel.py:

  • intel_gpus lists the integrated GPU (on xe) with setup's unified-memory fields; i915_igpus finds one on i915,
    for which setup stops and names the kernel command line that moves it to xe.
  • sycl_engine(igpu=True) also needs /opt/intel/oneapi/setvars.sh (or ONEAPI_ROOT) and says how to build natively.
  • to_sycl_igpu: the PC's paths, the launcher as exe, --stream-experts (written once, also when a hand-made config
    already had it), no --kv-resident (the KV is in the same RAM either way), the reserve as on a card (1,024 MiB up to
    32K, 2,048 above; a given one is kept), SYCL_CACHE_PERSISTENT=1 on the 140T only (it crashed on Xe2),
    STRATA_SYCL_BIN for an AOT build.
  • New since the first version, found in today's run on 0.2.2: setup's new --ple-io ram rule read the 1024 GB stand-in
    RAM the Intel path gives setup and wrote --ple-io ram, which on a 62 GB iGPU would put the 29 GB n-gram table in
    the GPU's own memory beside the 36.5 GiB expert file. to_sycl_igpu leaves it out (one in the user's user_args is
    kept) and the "1024 GB of RAM" line is replaced by a plain one. Also: in --check, Gyro sizes say they are not tested
    on an integrated GPU, and pictures stay off on an integrated GPU with a line that says why (see the next bullet).
  • New with the rebase on 0.2.3: main now has pictures on for every Arc and prints the B-series line for any xe id that
    is not an Alchemist one (is_b_series), which includes the 140T (7d51). On an integrated GPU setup instead keeps
    pictures off unless --vision is given ("nobody has run them on one yet (--vision yes turns them on)") and does not
    print the B-series line. A card takes main's path unchanged. Main's test that no --vision none is left in
    setup_intel.py now checks that the one left is in the integrated-GPU branch only.
  • The fit rule: shard 1 + 20 GiB <= RAM (measured on 0.1.40: 10-13 GiB left with a 36.5 GiB shard 1, 3-4 GiB left with
    43.8 GiB did not run well). The size menu marks the sizes that need more and recommends the first that fits; a size
    that does not fit is asked about (--model X --yes installs it anyway); --check says the same per model.
  • setup's AMD wording (BIOS carve-out, "this AMD card") is rewritten for an iGPU.

tools/test_setup_sycl.py: 8 new tests (detection on xe and i915, the config, the fit rule, the persistent cache, the
launcher's binary path, --ple-io, --stream-experts once). docs/INTEL.md: a row in the Setup table and a "With setup"
table in "Integrated Arc".

Compatibility: discrete cards are unchanged. Every new branch needs the GPU at 00:02.0, where a card behind a PCIe port
never is. setup.py is not touched.

Validation

Revision for the tests: main 870aedd9 (v0.2.8) + #2114 + this commit (2026-10-30). The runs on the 140T are from 2026-10-22 on
main 011c9e60 (v0.2.2) + #2114 + this commit. Hardware: Arc 140T (8086:7d51), Core Ultra 9 285H, 62 GiB RAM,
Fedora 44 (kernel 7.2.11, xe), oneAPI 2026.0, Python 3.14.

Passed:

  • python tools/test_setup_sycl.py: 33 of 33.
  • All 54 tools/test_setup_*.py on this branch (v0.2.8): 50 pass; the other 4 fail on clean main 870aedd9 too (see Failed).
  • Engine build, main 870aedd9 + #2110 + #2114 + this commit: BUILD EXIT 0, 0 errors.
  • On the 140T, 2026-10-22: ./setup.sh --backend sycl --family coder --model IQ1_M --context 98304 --no-start --yes
    (run in a checkout whose sycl/setup_intel.py is this branch's) exit 0. Step 1 shows "Intel Arc 140T, shared memory:
    56 GB of the RAM usable by the GPU, xe driver" and "RAM: 62 GB (the integrated GPU's memory is this RAM)". Run twice
    from the hand-made config of #2114's docs: both wrote the same args. These are that config's arguments plus setup's
    --pool-workers 10, with one --stream-experts and no --ple-io.
  • That config served by sycl/serve/server_intel.py with engine 0.1.47 (+ #2110): 10 of 10 requests, 8.4-12.7 tok/s,
    0 stall reports. Without --pool-workers 8.5-13.3 tok/s, so that option makes no measurable difference here.

Failed:

  • On v0.2.8 (2026-10-30): tools/test_setup_download_length.py, test_setup_dsv41.py, test_setup_golden.py and
    test_setup_unsloth.py exit 1 on this branch and on clean main 870aedd9 alike (one run each). The older notes below are
    from v0.2.3.
  • tools/test_setup_golden.py (48 failures) and tools/test_setup_unsloth.py (4 failures) fail with the same counts on
    main 5c8dd322 without this branch (on 011c9e60 they were CUDA multi-GPU expectations, for example cfg["gpu"] [0, 1]
    vs [1, 0]).
  • tools/test_setup_download.py is flaky on main too. On v0.2.3 it failed 5 of 6 runs on main 5c8dd322 and 5 of 8 on this
    branch (test_a_killed_download_continues and the two NoRangeSupport tests; a SYCL build ran on the same PC during
    most of these runs). This branch does not touch the download code.

Not run:

  • The real ./setup.sh run and the served requests on 0.2.3 or 0.2.8: they are from 0.2.2 (above).
  • Pictures on the 140T.
  • A discrete Intel card with this branch (I have none); the unit tests for the card path pass.
  • A PC with a discrete card and an iGPU together (setup should pick the card; unit-tested only).
  • Another integrated GPU than the 140T, an iGPU on i915 on real hardware (the message is unit-tested only), Windows.
  • The interactive size menu by hand (unit-tested; the real run used --model IQ1_M --yes).

Limits

  • From reading the code only (unconfirmed static analysis, not run): the same stand-in RAM reaches setup's --ple-io ram
    rule on a discrete Intel card too, and to_sycl keeps what setup wrote. That is a separate problem from this pull
    request and I did not change it.
  • setup's hybrid-CPU rule writes --pool-workers 10 here, and the engine warns the process can run only 10 CPU threads
    ("Recommended: --pool-workers 9"). It made no measurable difference, so it is left as setup writes it.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/2115 **Author:** [@andersson82](https://github.com/andersson82) **Created:** 10/12/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `sycl-igpu-setup` --- ### 📝 Commits (2) - [`955658e`](https://github.com/Niko1221/Strata/commit/955658efa4bdf85f2e62db5b0a874ea3d0b48eed) sycl: run on an integrated Arc (Arc 140T, xe): free memory from /proc/meminfo, no prompt-slot borrowing, a native launcher - [`887defc`](https://github.com/Niko1221/Strata/commit/887defca17ea8fa7323ce2b97e7c4d748a18c2ec) setup: the SYCL setup on an integrated Arc (xe): native launcher, a RAM fit rule, no KV streaming ### 📊 Changes **7 files changed** (+439 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `docs/INTEL.md` (+80 -0) 📝 `docs/INTEL_ARC.md` (+3 -2) 📝 `sycl/include/dpct/device.hpp` (+23 -1) ➕ `sycl/serve/strata-sycl-native.sh` (+28 -0) 📝 `sycl/setup_intel.py` (+196 -22) 📝 `sycl/src/program/generate.cpp` (+10 -0) 📝 `tools/test_setup_sycl.py` (+99 -1) </details> ### 📄 Description ## Problem and result `./setup.sh --backend sycl` on a PC whose only Intel GPU is integrated (an Intel GPU at PCI `00:02.0` on `xe`) stops with "no Intel Arc found". With this change it finds the GPU, checks that oneAPI and the engine build are on the PC, offers the sizes that fit the RAM, and writes a config for `sycl/serve/strata-sycl-native.sh` (no Docker). On the Arc 140T with Strata 0.2.2 that config serves 10 of 10 requests (8.4-12.7 tok/s decode). **Depends on #2114** (the launcher and the iGPU memory query): until that one is merged this diff also shows its commit; the change of this pull request is the last commit. ## Related discussion None agreed in an issue; it is the setup half of #2114 (platform support for an integrated Arc, which the maintainers have no machine to gate). Rebased on 0.2.2 and re-run; rebased again on 0.2.3 on 2026-10-23 (one conflict, see the pictures bullet below), and on 0.2.8 (main 870aedd9) on 2026-10-30 (the code applied cleanly; main rewrote `docs/INTEL.md`, so the docs part was redone in its new layout). ## Approach `sycl/setup_intel.py`: - `intel_gpus` lists the integrated GPU (on `xe`) with setup's unified-memory fields; `i915_igpus` finds one on `i915`, for which setup stops and names the kernel command line that moves it to `xe`. - `sycl_engine(igpu=True)` also needs `/opt/intel/oneapi/setvars.sh` (or `ONEAPI_ROOT`) and says how to build natively. - `to_sycl_igpu`: the PC's paths, the launcher as `exe`, `--stream-experts` (written once, also when a hand-made config already had it), no `--kv-resident` (the KV is in the same RAM either way), the reserve as on a card (1,024 MiB up to 32K, 2,048 above; a given one is kept), `SYCL_CACHE_PERSISTENT=1` on the 140T only (it crashed on Xe2), `STRATA_SYCL_BIN` for an AOT build. - New since the first version, found in today's run on 0.2.2: setup's new `--ple-io ram` rule read the 1024 GB stand-in RAM the Intel path gives setup and wrote `--ple-io ram`, which on a 62 GB iGPU would put the 29 GB n-gram table in the GPU's own memory beside the 36.5 GiB expert file. `to_sycl_igpu` leaves it out (one in the user's `user_args` is kept) and the "1024 GB of RAM" line is replaced by a plain one. Also: in `--check`, Gyro sizes say they are not tested on an integrated GPU, and pictures stay off on an integrated GPU with a line that says why (see the next bullet). - New with the rebase on 0.2.3: main now has pictures on for every Arc and prints the B-series line for any `xe` id that is not an Alchemist one (`is_b_series`), which includes the 140T (`7d51`). On an integrated GPU setup instead keeps pictures off unless `--vision` is given ("nobody has run them on one yet (--vision yes turns them on)") and does not print the B-series line. A card takes main's path unchanged. Main's test that no `--vision none` is left in `setup_intel.py` now checks that the one left is in the integrated-GPU branch only. - The fit rule: shard 1 + 20 GiB <= RAM (measured on 0.1.40: 10-13 GiB left with a 36.5 GiB shard 1, 3-4 GiB left with 43.8 GiB did not run well). The size menu marks the sizes that need more and recommends the first that fits; a size that does not fit is asked about (`--model X --yes` installs it anyway); `--check` says the same per model. - setup's AMD wording (BIOS carve-out, "this AMD card") is rewritten for an iGPU. `tools/test_setup_sycl.py`: 8 new tests (detection on xe and i915, the config, the fit rule, the persistent cache, the launcher's binary path, `--ple-io`, `--stream-experts` once). `docs/INTEL.md`: a row in the Setup table and a "With setup" table in "Integrated Arc". Compatibility: discrete cards are unchanged. Every new branch needs the GPU at `00:02.0`, where a card behind a PCIe port never is. `setup.py` is not touched. ## Validation Revision for the tests: main 870aedd9 (v0.2.8) + #2114 + this commit (2026-10-30). The runs on the 140T are from 2026-10-22 on main 011c9e60 (v0.2.2) + #2114 + this commit. Hardware: Arc 140T (8086:7d51), Core Ultra 9 285H, 62 GiB RAM, Fedora 44 (kernel 7.2.11, `xe`), oneAPI 2026.0, Python 3.14. **Passed:** - `python tools/test_setup_sycl.py`: 33 of 33. - All 54 `tools/test_setup_*.py` on this branch (v0.2.8): 50 pass; the other 4 fail on clean main 870aedd9 too (see Failed). - Engine build, main 870aedd9 + #2110 + #2114 + this commit: `BUILD EXIT 0`, 0 errors. - On the 140T, 2026-10-22: `./setup.sh --backend sycl --family coder --model IQ1_M --context 98304 --no-start --yes` (run in a checkout whose `sycl/setup_intel.py` is this branch's) exit 0. Step 1 shows "Intel Arc 140T, shared memory: 56 GB of the RAM usable by the GPU, xe driver" and "RAM: 62 GB (the integrated GPU's memory is this RAM)". Run twice from the hand-made config of #2114's docs: both wrote the same `args`. These are that config's arguments plus setup's `--pool-workers 10`, with one `--stream-experts` and no `--ple-io`. - That config served by `sycl/serve/server_intel.py` with engine 0.1.47 (+ #2110): 10 of 10 requests, 8.4-12.7 tok/s, 0 stall reports. Without `--pool-workers` 8.5-13.3 tok/s, so that option makes no measurable difference here. **Failed:** - On v0.2.8 (2026-10-30): `tools/test_setup_download_length.py`, `test_setup_dsv41.py`, `test_setup_golden.py` and `test_setup_unsloth.py` exit 1 on this branch and on clean main 870aedd9 alike (one run each). The older notes below are from v0.2.3. - `tools/test_setup_golden.py` (48 failures) and `tools/test_setup_unsloth.py` (4 failures) fail with the same counts on main 5c8dd322 without this branch (on 011c9e60 they were CUDA multi-GPU expectations, for example `cfg["gpu"]` `[0, 1]` vs `[1, 0]`). - `tools/test_setup_download.py` is flaky on main too. On v0.2.3 it failed 5 of 6 runs on main 5c8dd322 and 5 of 8 on this branch (`test_a_killed_download_continues` and the two `NoRangeSupport` tests; a SYCL build ran on the same PC during most of these runs). This branch does not touch the download code. **Not run:** - The real `./setup.sh` run and the served requests on 0.2.3 or 0.2.8: they are from 0.2.2 (above). - Pictures on the 140T. - A discrete Intel card with this branch (I have none); the unit tests for the card path pass. - A PC with a discrete card and an iGPU together (setup should pick the card; unit-tested only). - Another integrated GPU than the 140T, an iGPU on `i915` on real hardware (the message is unit-tested only), Windows. - The interactive size menu by hand (unit-tested; the real run used `--model IQ1_M --yes`). ## Limits - From reading the code only (unconfirmed static analysis, not run): the same stand-in RAM reaches setup's `--ple-io ram` rule on a discrete Intel card too, and `to_sycl` keeps what setup wrote. That is a separate problem from this pull request and I did not change it. - setup's hybrid-CPU rule writes `--pool-workers 10` here, and the engine warns the process can run only 10 CPU threads ("Recommended: --pool-workers 9"). It made no measurable difference, so it is left as setup writes it. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#3868
No description provided.