swift bindings - #30
Merged
Merged
Conversation
The committed family.rs was not `cargo fmt --all --check` clean, failing the rust-gates rustfmt step on PR #30. No semantic change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The swift-{gates,macos,ios} jobs ran on GitHub-hosted runners
(ubuntu-latest / macos-15) and were blocked by the account's GitHub Actions
spending limit ("the job was not started because recent account payments
have failed..."), the same posture the rest of the repo already avoids.
Move them onto the existing fleet: the abihash gate to Blacksmith
(blacksmith-2vcpu-ubuntu-2404) and the macOS build/test + iOS cross-compile
to the self-hosted M4 Mac mini ([self-hosted, macOS, ARM64]).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
On macOS 15+ ggml-metal uses residency sets and asserts every GPU resource is
released before its device teardown (ggml-metal-device.m:612). The examples held
the model/session in top-level `let` bindings, which outlive `main`, so the
model was still alive at process exit and the assert aborted with SIGABRT (exit
134) — after transcribing correctly. `swift test` passes because tests scope
their models in methods (freed mid-process); only the examples leaked to exit.
Wrap each example's model/session/stream in a `do {}` so ARC frees the native
resources before the process exits. backend-select is unaffected (CPU-only, no
residency sets). Verified locally on macOS 26.5.1 / real Metal: all five exit 0,
no abort, transcription unchanged.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Document the macOS 15+/iOS 18+ ggml-metal residency-set teardown: a Model held
in a top-level/global `let` that outlives `main` is still alive at the backend's
process-exit teardown, which asserts all GPU resources were released first and
aborts. Normal object lifetimes are unaffected; the examples scope their work in
a `do {}` block. We keep residency sets on (real perf benefit, PR ggml-org/
llama.cpp#11427) and ggml unpatched; this is the documented contract.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
No description provided.