unsloth: pin #149 so GGML_CUDA_ENABLE_UNIFIED_MEMORY=0 actually disables it - #162
Merged
Conversation
…les it ggml tests getenv(...) != nullptr, so =0 enables managed allocation. With #157 pinned this is no longer a correctness bug, but it still costs about 15% throughput and can lower the ceiling: managed draws host RAM instead of the device carve-out rather than adding to it, so a model that loads without the variable can be OOM-killed with it. Verified locally to co-merge onto b10705 with #157 and #158, net +79/-5 across 4 files.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Overview
Pins #149, one line. Completes the AMD set: #158 and #157 are already pinned and green in the master preflight.
Why
ggmltestsgetenv("GGML_CUDA_ENABLE_UNIFIED_MEMORY") != nullptr, so=0enables managed allocation. The variable is spelled as a positive, so writing=0to turn it off does the opposite.With #157 pinned this is no longer a correctness bug. It is a cost bug, and still worth fixing:
GGML_CUDA_ENABLE_UNIFIED_MEMORYonly where it gains memory unsloth#9884 a 28 GiB model loaded in 10 s without the variable and was OOM-killed with itSo a user who sets
=0to escape that still doesn't.#149 also carries a HIP
WARN_ONCE, rewritten for this: it no longer claims corrupted output or links ggml-org#26148, because shipping that alongside #157 would tell users to chase a defect their build does not have.Scope
This changes behaviour for every CUDA and HIP user who sets
=0, not only AMD. That is the intended fix, but it is not a no-op.Verification
The pinned commit is branched from
11cd98842874, an upstream ancestor of both master and the base tag, per the rule that a pin cut from fork master drags master's divergence into the merge. Verified locally to co-merge ontob10705alongside #157 and #158 for a net +79/-5 across 4 files; #149 and #158 both touchggml-cuda.cuand merge cleanly together.Comes out once a base tag carries the work upstream.