mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
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#5336
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/5184
Author: @XiaoBinGan
Created: 11/4/2026
Status: 🔄 Open
Base:
main← Head:reserve/fix-integrated-gpu-vendor📝 Commits (1)
eb95fbd[TUI] engine component: an integrated GPU no longer decides this PC's engine family (#4971)📊 Changes
2 files changed (+90 additions, -7 deletions)
View changed files
📝
strata_control/engine_component.py(+31 -7)➕
tests/terminal/test_gpu_vendor_integrated.py(+59 -0)📄 Description
Problem and result
strata_control/engine_component.py::_drm_vendor_backend()decides this PC's engine family from the PCI vendors in/sys/class/drmwhen the vendor tools are not on PATH, in a fixed order (NVIDIA0x10de, AMD0x1002, Intel0x8086) and returns the first one present. An integrated GPU therefore decides the machine:xe, 24 GB) and an AMD Raphael APU iGPU (amdgpu, 512 MiBBIOS carve-out) visible in sysfs.
_drm_vendor_backend()returnedhip, so the whole PC was classified as an AMDmachine and the installed SYCL engine was refused: "This Strata is for Intel cards. Your PC has an AMD card" —
this PC linux-x86_64, hip (sysfs pci vendor).After the change a card whose own VRAM is an integrated GPU's small carve-out is skipped while another card is
present, and the report's machine answers
sycl:with the old order otherwise intact (a discrete AMD card still decides
hip; a Radeon card beside an APU keepship; NVIDIA keepscuda; an integrated card alone keeps its old answer; no sysfs tree is stillNone).Related discussion
#4971 — the report, with both broken paths named (
strata_cli/launch/catalog.pyfor the card list, andstrata_control/engine_component.py::_drm_vendor_backendfor the backend). This change fixes the backend half only;catalog.pyis owned by other work in flight, so the launcher's card-list merge is deliberately not touched here —it is the same report's other half and is named in the limits.
Approach
INTEGRATED_MAX_VRAM_MIB = 2048: the most own VRAM an integrated GPU can show. The smallest card Strata runs hasseveral GiB, so a card below 2 GiB is not a usable target (the report's APU shows 512 MiB).
_own_vram(card)readsdevice/mem_info_vram_total(amdgpu's own-VRAM size) and returnsTrueabove the bar,Falsebelow it, andNonewhen the file is absent. NVIDIA and Intel write no such file, so their cards arenot classified as integrated by a missing file — they fall back to the old order.
_drm_vendor_backend()groups the cards by vendor and skips a vendor whose every card is positively integrated(
False) while another vendor has a card that is not. A card that reports no own-VRAM size (None) counts asusable, so a missing file cannot change a vendor's rank.
Validation
Passed: the new regression test,
tests/terminal/test_gpu_vendor_integrated.py(6 tests), on a temporary/sys/class/drmtree per case:The report's case (AMD APU 512 MiB + Intel Arc with no
mem_info_vram_total) issycl; a discrete AMD card alone iship; an APU beside a discrete Radeon iship; NVIDIA keepscudabeside an AMD APU; an integrated card alone iship; a missing tree isNone.Passed: the A/B — with
strata_control/engine_component.pyreverted tomain, the report's case fails:Passed: the surrounding component tests (this checkout, Windows 11, Python 3.11.16):
Failed: none.
Not run: a real Linux PC with the report's two adapters — the sysfs tree is built in a temp directory in the
tests, not read from
/sys/class/drm. The real values quoted (vendor ids, 512 MiB carve-out, the Arc writing nomem_info_vram_total) come from the report's own/sys/class/drmexcerpt. No engine build is touched: this is thePython Control package only, and the function it changes is called only on Linux (
os.name != "nt").Limits
discrete. No such device is known, and a card that reports no size is never called integrated.
mem_info_vram_totalis read; the AMD APU is the reported case. Another vendor's integrated GPUthat writes no size keeps today's behaviour.
(
strata_cli/launch/catalog.py: the Arc is consulted only when the shared reader found no card at all) is notchanged here, so on that machine
strata launchmay still see only the APU row until that side is fixed; thereport's workaround (
STRATA_ENGINE_BACKEND=sycl) is then still needed for the launcher.about refusing the card).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.