mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #5101] [Engine] ExpertSource::prefetch has two overloads and each source overrides one, so the other call form is a silent no-op (#611-D) #2380
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#2380
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?
Originally created by @ackalker on GitHub (Nov 3, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5101
Area
Engine
Desktop app, Terminal or source?
Source (START-HERE.bat, setup.sh or a build) — a build from
./update.shWhat happened
ExpertSourcehas twoprefetchoverloads, and each of the two real sources overrides only one of them. nvcc says sofour times a build:
Reading it, both sides look like they miss the other half:
include/strata/core/expert_source.hpp:226virtual void prefetch(int64_t layer, int64_t expert)— bodyis a
(void)no-op; andinclude/strata/core/expert_source.hpp:262virtual void prefetch(int64_t layer, const int64_t* experts, int64_t n)— also a no-op.prefetch_begin's default (:268-269) delegates to the batch form.FileExpertSource(:710) overrides only the batch one (:929, implemented atsrc/core/expert_source.cpp:2140).ArenaExpertSource(:1261) overrides only the single-expert one (:1288, implemented atsrc/core/expert_source.cpp:6254, anmadvise(..., MADV_WILLNEED)).Which call sites then land on the base no-op:
src/program/generate.cpp:9104,:12585,:12600,:12984,:19919— for example:12600srcp->prefetch(s.layer, s.out); // a file-backed arena released its pages: read them back ahead.srcpis&srcwhen the file source is on (src/program/generate.cpp:6989declaresstrata::core::FileExpertSource src;,:7203srcp = &src;) or&arena_srcwhen the arena is on (:7065declaresstrata::core::ArenaExpertSource arena_src;,:7387srcp = &arena_src;). So with the file source those fivecalls do nothing.
src/core/expert_source.cpp:5122d.src->prefetch(d.layers, miss.data(), (int64_t) miss.size());(CS-T,d.cold_mode == 0), withdrive.d.src = srcpat
src/program/generate.cpp:8448. So with the arena source that call, andprefetch_begin's default at:268-269, do nothing.Smallest steps or command that reproduce it
The warning appears in the CUDA pass of the engine build:
The call-site reading above is from the source at
ffa80d73.Reproduction status
Unconfirmed static analysis. I read the code and the compiler warning; I did not see a runtime failure and I
measured no timing difference (no A/B of a decode with and without the missing read-ahead). It may be that the
no-op path is deliberate, or that the file source's own read-ahead elsewhere covers those five call sites — I did not
check that.
Suggested smallest fix
One line per class, delegating to the half that exists, and
#611-Dgoes away:If a no-op is intended for one of them,
overrideon the missing overload with a one-line comment saying so wouldalso silence the warning and make the intent readable.
Strata version
Strata 0.2.10 · engine 0.1.56 · source checkout at
ffa80d73Graphics card, memory and system
RTX 5080 16 GB · 96 GB RAM · Linux (Arch), gcc 16.2.1, CMake 4.4.3, ninja 1.13.2, CUDA/nvcc 13.4
(
-DSTRATA_ENABLE_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=120)@github-actions[bot] commented on GitHub (Nov 3, 2026):
Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:
Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment
/reopen.Details: CONTRIBUTING.md
@github-actions[bot] commented on GitHub (Nov 3, 2026):
Thanks, this follows the format now.