Skip to content

unsloth: pin #149 so GGML_CUDA_ENABLE_UNIFIED_MEMORY=0 actually disables it - #162

Merged
danielhanchen merged 1 commit into
masterfrom
unsloth/pin-149
Aug 31, 2026
Merged

unsloth: pin #149 so GGML_CUDA_ENABLE_UNIFIED_MEMORY=0 actually disables it#162
danielhanchen merged 1 commit into
masterfrom
unsloth/pin-149

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Overview

Pins #149, one line. Completes the AMD set: #158 and #157 are already pinned and green in the master preflight.

Why

ggml tests getenv("GGML_CUDA_ENABLE_UNIFIED_MEMORY") != nullptr, so =0 enables managed allocation. The variable is spelled as a positive, so writing =0 to 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:

So a user who sets =0 to 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 onto b10705 alongside #157 and #158 for a net +79/-5 across 4 files; #149 and #158 both touch ggml-cuda.cu and merge cleanly together.

Comes out once a base tag carries the work upstream.

…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.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-31T09:32:10.639167Z 044d2f7 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@danielhanchen
danielhanchen merged commit 5daeb02 into master Aug 31, 2026
4 of 5 checks passed
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.

1 participant