mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2817] [CLOSED] sycl: setup --vision cpu reads images on the Intel port (the CPU encoder, as on AMD) #4279
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4279
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/2817
Author: @hotschmoe
Created: 10/16/2026
Status: ❌ Closed
Base:
main← Head:pr/sycl-images📝 Commits (1)
fb655absycl: setup --vision cpu reads images on the Intel port (the CPU encoder, as on AMD)📊 Changes
3 files changed (+211 additions, -18 deletions)
View changed files
📝
docs/INTEL.md(+41 -4)📝
sycl/setup_intel.py(+61 -14)📝
tools/test_setup_sycl.py(+109 -0)📄 Description
Title
sycl: setup --vision cpu reads images on the Intel port (the CPU encoder, as on AMD)
Issue: Resolves #2816
Summary
Images on the Intel (SYCL) port, the way the AMD (HIP) path has them since #304: the image encoder built for the
CPU by setup, the engine started with
--vision. docs/INTEL.md's comparison table said "not yet" for images onthe SYCL port, but the engine side has been there since the port (
--vision, the GENI request with the encoder'sembeddings, the per-cell M-RoPE position table in
sycl/src/program/generate.cpp); what was missing was the setupwiring.
sycl/setup_intel.pyforced--vision none, mapped every--visionto "none" and dropped the config's"vision"section. The encoder itself (tools/vision, llama.cpp's mtmd + the mmproj file) needs no SYCL: theCPU build the AMD path uses runs on the PC, outside the container, and
serve/server.pyhands the engine theembeddings.
With this change
./setup.sh --backend sycl --vision cpucompiles the encoder for the CPU intoengine-sycl/(setup's own
build_vision_cpu:tools/visionagainst the pinned llama.cpp,-DSTRATA_VISION_CUDA=OFF -DSTRATA_PORTABLE=OFF, once, again whentools/visionchanges), downloads the mmproj file as setup does, keepsthe config's
"vision"section (exe,mmproj,model,threads: host paths, since the encoder runs on thehost) and
--vision, and applies the port's own VRAM reserve rule (1,024 MiB up to 32K, ...) instead of the700 MiB setup writes for the CUDA engine's GPU encoder: the CPU encoder takes no VRAM. A
--vram-reserve-mibthe user gives is kept.
--vision yes/gpuleave images off with a note saying to use--vision cpu, aship_visiondoes on AMD (there is no SYCL encoder build). Without--vision cpunothing changes: thethrow-away engine folder and the config are as before.
Measured, 2x Intel Arc Pro B70 32 GB (kernel 7.1, Compute Runtime 26.22.38646.4, oneAPI 2026.1, AOT bmg-g31),
AMD Threadripper 1950X, Qwen3.8-Flash-Next ISTA GSQ-RCO IQ3_XXS,
--layer-split 30 --kv int8 --spec 4 --mtp <BF16 draft layer> --mtp-max-t 4, the encoder fromtools/visionbuilt with gcc 13 (native,-DSTRATA_PORTABLE=OFF),mmproj-Qwen3.8-Flash-Next-BF16.gguf, 8 threads:threads, no VRAM.
/v1/chat/completionson a development tree with the sameserve/and vision path asmain: all fournamed correctly ("Top-left: red, top-right: green, bottom-left: blue, bottom-right: yellow"; 280 prompt
tokens, 4.8 s to the first token including the encode), also while a code request ran on the other slot; a
512-token text reply decoded at 140.9 and 140.5 tok/s with
--vision(about the 141 measured without it) on that tree.main296b59d2(upstream's own engine build, this branch's config: the vision section and--vision):the four colours right ("Red, Green, Blue, Yellow" to "in the order top-left, top-right, bottom-left,
bottom-right"), 246 prompt tokens with the picture read in 1.48 s including the encode; a 512-token greedy
text reply at 81.7 / 79.4 tok/s with
--visionagainst 81.8 / 79.4 without (an earlier run of the same binaryand config), with identical text and draft counts:
--visionchanges nothing for text.python -m unittest tools.test_setup_sycl: 24 tests pass (6 new). Everytools/test_setup_*.pymodule runwith and without this change gives the same result (the same 10 pre-existing failures on
main: thetest_setup_goldenUD-Q4_K_XL cases and twotest_setup_engine_hashcases; none in the SYCL, AMD, config orbench-tip modules).
What changed
sycl/setup_intel.py:sycl_vision(asked)replacesS.hip_vision(waslambda asked: "none"):cpu->cpu;yes/gpu->nonewith a warning that says--vision cpu; anything elsenone.build_engine_sycl(gpu, llama, vision)replacesS.build_engine_hip(was the stub): withvision == "none"it returns the same throw-away stub as before (
engine_stub(), the code moved out ofinstall()); withcpuit stops with the package to install when the PC has no C++ compiler, and otherwise calls setup'sbuild_vision_cpu(eng, stamp, meta, llama, vsrc)witheng = engine-sycl/(new folder next to thecheckout's
engine/, which the SYCL setup never used): that compilestools/visionintobuild-vision/,copies
strata-visionbeside the stamp and recordsvision: cpuand thetools/visionsource hash inengine-sycl/BUILD.json, so a rerun compiles nothing.build_vision_cpuis added to the namesinstall()checks setup.py still has.to_sycl: the"vision"key is no longer dropped from the config;--visionwas already passed through.The reserve: when
--visionis in the args and the reserve is setup's vision default (VISION["cpu"] ["reserve_mib"], 700) it is treated as not given, which is what setup's ownchoices_from_configdoeswith that value (#493), so the port's rule applies.
say_intelrewritesbuild_vision_cpu's "engine: engine-sycl/strata, image encoder (CPU): ..." line to"image encoder (CPU): ..." (there is no engine in that folder).
install()still appends--vision nonewhen--visionis not given: images stay opt-in.tools/test_setup_sycl.py:ToSycl.test_the_vision_section_is_kept_and_the_cpu_encoder_takes_no_reserveand a new
Imagesclass (the vision choice; no images -> the stub and nocmake_buildcall;cpu-> onecmake_buildoftools/visionwith the AMD path's definitions, the copied encoder, the stamp, no secondbuild on a rerun, a build again when
tools/visionchanges; no compiler -> a stop namingbuild-essential;the source still forces
--vision nonewhen not asked). No GPU, no network, no compiler:cmake_buildisreplaced.
docs/INTEL.md: the comparison table's images row, an "Images" bullet in the setup section, the "Images: theencoder on the CPU" section with the measurements above, and the "Not done" entry narrowed to the llama.cpp
configuration.
Not changed:
setup.py(git diff main -- setup.pyis empty; the CUDA and HIP paths run the same code), theengine (
sycl/src,src,include: no compiled file is touched, the binary ismain's),serve/,sycl/serve/strata-sycl.sh,tools/vision. A SYCL build of the encoder (GPU encode) is not part of this: the CPUencoder is what runs on AMD too.
Extra Notes
strata-sycl-devcontainer, so the PC needs a C++ compiler(
build-essential); setup's pip-installed cmake and ninja do the rest. A PC without one gets a message withthe package and the
--vision noway out. The measured encoder above was built with the dev image's gcc 13and run inside the same image (our serving setup keeps the server in the container); the setup path builds it
with the host's compiler - the same CMake definitions.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.