Repository navigation
loader: validate GPU split sidecars before applying them - #288
Open
dandan20031031 wants to merge 1 commit into
Open
dandan20031031 wants to merge 1 commit into
dandan20031031 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #284.
The GPU split sidecar loader currently accepts negative and out-of-range bucket indices, installs them in model layers, and later uses them for host row selection. Validate the complete sidecar before publishing layer state or uploading bucket data, and keep an independent check immediately before row copies.
The validation covers tensor names, I32 vector layout, FFN row counts, file-contained tensor data, binary masks, bucket bounds, uniqueness, and agreement with the selected mask rows. Valid empty/full splits and unsorted bucket indices remain supported.
Related: #286 was closed without merging. This patch addresses the same underlying defect and additionally checks serialized sidecar data ranges, named tensor pairing, and mask/bucket consistency.
Validated locally on Windows, RTX 5080, CUDA 13.3.73, and MSVC 19.44:
-1, the row-count upper bound, andINT32_MAX; the patched loader rejects all three without changing model-layer state.The serialized loader probe is retained with the local investigation materials. The repository regression test is model-free and can be run with
ctest -R '^test-gpu-split$'after building its target. Full-model inference, Linux, multi-GPU operation, and general GGUF parser hardening are outside the validation scope.