Skip to content

TEMP baseline: integrate #131 GGUF CPU/hybrid fix - #39

Merged
nekomario28 merged 1 commit into
work/rocm-qwen35moe-plus-pr131-cpu-20260826from
donor/pr131-gguf-cpu-fix-20260826
Aug 26, 2026
Merged

TEMP baseline: integrate #131 GGUF CPU/hybrid fix#39
nekomario28 merged 1 commit into
work/rocm-qwen35moe-plus-pr131-cpu-20260826from
donor/pr131-gguf-cpu-fix-20260826

Conversation

@nekomario28

Copy link
Copy Markdown
Owner

Synthetic baseline only. Adds upstream FlashML-org#131 commit 3178a59 to the existing ROCm+qwen35moe integration branch so the split-JIT review PR can exclude unrelated CPU/hybrid reachability changes. Preserve donor history; do not use as a product PR.

Three defects with one root: "gguf" is a container tag, not a weight layout.
The checkpoint picks a ggml type per tensor and the concrete CPU format has to
be recovered from the bank types, but two call sites tested the tag directly.

_cpu_moe_executor_viable compared expert_quant against _WFMT_IDS, which answers
False for EVERY GGUF checkpoint. That silently disabled the automatic residency
split on hosts where CUDA pinning is quota-capped -- WSL caps it near 40% of RAM
(measured: 81.78 GiB of 204). The symptom was not a clear refusal but
cudaHostRegister failing partway through the banks, which reads as a memory
shortage rather than a dispatch gap.

gemm1_dot handled bf16 and q4_0 and then FELL THROUGH to the NVFP4 path, which
dereferences scale/global pointers that are null for GGUF banks. An unhandled
format therefore segfaulted inside a worker thread with no Python traceback.
It now raises through TORCH_CHECK naming the format, same reasoning as the
kernel default: guards in FlashML-org#138: an unhandled case that reads null or
uninitialised memory is far worse than one that errors.

GGUFEmbedding dequantized unconditionally, but the unquantized types are raw
value bytes with no dequant kernel at all (ggml_dequantize rejects type 1
outright). DeepSeek-V4 ships token_embd as F16 and died on the first lookup.
The gathered rows are now reinterpreted for those types, matching the fix
already applied to fused_mul_mat_gguf.
@nekomario28
nekomario28 marked this pull request as ready for review August 26, 2026 09:28
@nekomario28
nekomario28 merged commit ae7eafa into work/rocm-qwen35moe-plus-pr131-cpu-20260826 Aug 26, 2026
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