Skip to content

UPSTREAM PR #17799: metal : fix build#457

Open
loci-dev wants to merge 1 commit intomainfrom
upstream-PR17799-branch_ggml-org-gg/metal-fix-build-2
Open

UPSTREAM PR #17799: metal : fix build#457
loci-dev wants to merge 1 commit intomainfrom
upstream-PR17799-branch_ggml-org-gg/metal-fix-build-2

Conversation

@loci-dev
Copy link
Copy Markdown

@loci-dev loci-dev commented Dec 5, 2025

Mirrored from ggml-org/llama.cpp#17799

cont #17766

@loci-review
Copy link
Copy Markdown

loci-review bot commented Dec 5, 2025

Explore the complete analysis inside the Version Insights

Performance Analysis Summary: PR #457

Overview

PR #457 introduces build compatibility guards for Metal residency set API usage in ggml-metal-device.m. The change wraps the background thread residency request loop with compile-time and runtime availability checks for macOS 15.0+, iOS 18.0+, tvOS 18.0+, and visionOS 2.0+.

Performance Impact

Analysis shows zero measurable performance impact across all binaries and functions. Power consumption remains stable at 0.0% change for all 16 analyzed binaries including libllama.so, libggml-cpu.so, llama-run, and llama-bench. No function-level changes were detected in response time or throughput metrics.

The modification affects only the Metal backend's GPU memory management initialization path (ggml_metal_rsets_init). The actual residency request logic remains identical when the feature is available. On unsupported platforms, the background thread executes an empty loop, consuming negligible resources.

Inference Performance

No impact on tokens per second. Core inference functions (llama_decode, llama_encode, llama_tokenize) show no response time or throughput changes. The modification is isolated to Metal device initialization and does not affect the inference execution path or tokenization pipeline.

This is a defensive build fix that maintains functional equivalence on supported platforms while preventing compilation errors on older systems. The change follows existing guard patterns in the codebase and introduces no runtime overhead on platforms where residency sets are available.

@loci-dev loci-dev force-pushed the main branch 27 times, most recently from 3f5e1ff to 6f5d23d Compare December 9, 2025 04:14
@loci-dev loci-dev force-pushed the main branch 30 times, most recently from c05b224 to e70bc15 Compare December 14, 2025 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants