mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2486] [CLOSED] sycl: Alchemist expert cache in segments, so borrowed prompt GEMM operands are not staged (A770 prompt +8-12%, output identical) #4069
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#4069
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/2486
Author: @aslater3
Created: 10/14/2026
Status: ❌ Closed
Base:
main← Head:a770/up-arena-segmented📝 Commits (1)
9734b8esycl: Alchemist expert cache in segments, so borrowed prompt GEMM operands are not staged📊 Changes
4 files changed (+161 additions, -1 deletions)
View changed files
📝
sycl/include/strata/sycl_queue.hpp(+96 -0)➕
sycl/probe/a770/gemm_far_probe.cpp(+57 -0)📝
sycl/src/core/expert_cache.cpp(+6 -0)📝
sycl/src/prefill/gemm.dp.cpp(+2 -1)📄 Description
Title
sycl: Alchemist expert cache in segments, so borrowed prompt GEMM operands are not staged (A770 prompt +8-12%, output identical)
Summary
The prompt path borrows the top expert-cache slots, 5.4-7.6 GiB into the ~8.6 GiB arena. oneMKL misreads a GEMM operand that lies more than 4 GiB into one allocation, so
staged_gemmcopied nearly every expert GEMM operand first. In an 8K prompt that is 24,576 staged GEMMs and about 200 GB of device copies.On Alchemist, the arena is now allocated as equal physical segments behind one reserved address range (
sycl_ext_oneapi_virtual_mem). The rest of the engine still sees one contiguous range. The arena is not registered for staging, because the same GEMMs read right in a segmented range at any offset.What changed
sycl/include/strata/sycl_queue.hpp:malloc_device_segmented/free_device_segmentedandarena_segmented_wanted. Segments are 512 MiB (whole 2 MiB pages, all equal: Level Zero refused a smaller last segment).sycl/src/core/expert_cache.cpp:ExpertCache::opentakes that path on Alchemist, andclose()frees it.sycl/src/prefill/gemm.dp.cpp: a comment.sycl/probe/a770/gemm_far_probe.cpp: the probe that places the misread.STRATA_ARENA_SEGMENTED=0gives one allocation as before;=1opts in other devices.STRATA_ARENA_SEGMENT_MIBsets the segment size.Extra Notes
Probe (
gemm_far_probe, A770, xe, compute runtime 26.05, oneAPI 2026.1):malloc_device, T = 7987: X past 4 GiB gives a wrong last partial tile; W and X past 4 GiB gives nearly every element wrong.Engine (Coder IQ1_M,
--resident-experts, learned24,--prefill-borrow, spec 4, greedy,STRATA_PF_XMX=2), same-day A/B against itself withSTRATA_ARENA_SEGMENTED=0:Default path elsewhere. Battlemage and every other device are byte-identical. The gate is
intel_gpu_gen(dev) == IntelGpuGen::Alchemist.Not tested: A750 / A580 (i915), Windows,
--vram-elastic, a layer split, prompts without borrowing.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.