Skip to content

Commit f60dea8

Browse files
author
Aegis AI Assistant
committed
Reapply "fix(ssd_streamer): remove obsolete buffer bounds check causing GLM-5.1 MoE crash" (#8)
This reverts commit 9b95713.
1 parent 9b95713 commit f60dea8

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

.github/workflows/downstream_integration.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,10 @@ jobs:
3232
working-directory: SwiftLM
3333

3434
- name: Override mlx-swift dependency with PR checkout
35-
# SwiftLM uses mlx-swift as a local path dependency (./mlx-swift submodule).
36-
# SPM `package edit` cannot edit path dependencies, so we directly overwrite
37-
# the submodule directory with our PR branch content.
35+
# SPM `package edit` puts a local editable copy of the package in
36+
# .build/checkouts; we then replace its contents with our PR branch.
3837
run: |
39-
rsync -a --delete $GITHUB_WORKSPACE/mlx-swift-pr/ $GITHUB_WORKSPACE/SwiftLM/mlx-swift/
38+
swift package edit mlx-swift --path $GITHUB_WORKSPACE/mlx-swift-pr
4039
working-directory: SwiftLM
4140

4241
- name: Install MLX Metal library

Source/Cmlx/mlx/mlx/backend/metal/ssd_streamer.mm

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@
3939
}
4040

4141
void SSDStreamer::load_sync(off_t byte_offset, size_t length, void* dst_ptr) {
42-
if (length > buffer_size_bytes_) {
43-
throw std::invalid_argument("[SSDStreamer] Load length exceeds Pinned Buffer capacity.");
44-
}
42+
// The StreamBuffer pool was removed in favor of caller-provided unified memory,
43+
// so we no longer bounds-check the length against an initial buffer size.
4544

4645
// Synchronously read exactly byte_offset into the MLX allocator CPU mapped pointer.
4746
// By blocking the MLX graph evaluator thread, we implement absolute backpressure

0 commit comments

Comments
 (0)