mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #100] [CLOSED] fix: honor native per-layer layouts in file-backed expert loading #2455
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#2455
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/100
Author: @midhatn
Created: 9/29/2026
Status: ❌ Closed
Base:
main← Head:fix/native-mmap-layout📝 Commits (1)
b758e8ffix: honor native per-layer layouts in file-backed expert loading📊 Changes
4 files changed (+107 additions, -7 deletions)
View changed files
📝
CMakeLists.txt(+5 -0)📝
include/strata/core/expert_source.hpp(+3 -1)📝
src/core/expert_source.cpp(+39 -6)➕
src/core/native_mmap_test.cpp(+60 -0)📄 Description
Native expert packs can have different blob sizes in different layers.
FileExpertSourcestill sizesexperts.binand addresses every blob using the canonical fixed stride, so--mmap-expertsrejects these native packs or uses the wrong layout.This uses the already-loaded native layout's per-layer offsets, strides and total size. It validates geometry and extents, retains the canonical path, and unmaps the actual mapping length on POSIX. The pinned-arena path is unchanged.
Validation on Windows/MSVC, against current main (
c1e9033, v0.1.20):native_mmap_test.native mapping opens, and passes with this patch.This is a loader correctness fix, not a throughput claim. The POSIX path has not been run locally. It is related to #80's memory goal, but does not add tiering or change its policy; keeping native file addressing correct should be useful independently.
Reproduce with a CUDA-enabled build: build target
native_mmap_test, then run the resulting executable. It uses synthetic files and requires no model download.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.