refactor(dflash): rename namespace dflash27b → dflash::common#241
Merged
davide221 merged 1 commit intoMay 21, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
No issues found across 141 files
Note: This PR contains a large number of files. cubic only reviews up to 100 files per PR, so some files may not have been reviewed. cubic prioritizes the most important files to review.
On a pro plan you can use ultrareview for larger PRs.
Re-trigger cubic
howard0su
suggested changes
May 21, 2026
3961197 to
92d3647
Compare
Contributor
There was a problem hiding this comment.
No issues found across 138 files
Note: This PR contains a large number of files. cubic only reviews up to 100 files per PR, so some files may not have been reviewed. cubic prioritizes the most important files to review.
On a pro plan you can use ultrareview for larger PRs.
Re-trigger cubic
Mechanical rename per @weicj's review on Luce-Org#237. Renames the legacy backend-baked namespace to a neutral one so future backends plug into shared code without name leakage. Scope: - namespace dflash27b → namespace dflash::common (sources + tests) - dflash27b::* → dflash::common::* - CMake static lib dflash27b → dflash_common - CMake project(dflash27b) → project(dflash) - Private CMake vars _dflash27b_* → _dflash_* - Stale comment references Out of scope (deferred to a follow-up): - Public C header dflash/include/dflash27b.h - C symbol dflash27b_last_error() - Preprocessor macros DFLASH27B_* - Env vars DFLASH27B_* Build note: CUDA 12.6 + GCC 13.3 has a known _Float128 conflict during CUDA host-compiler ID detection. Workaround: -DCMAKE_CUDA_HOST_COMPILER=/usr/bin/g++-11 No behavior change. Symbol mangling confirmed via nm as N6dflash6common*; no residual dflash27b mangled symbols outside the deferred public C ABI.
92d3647 to
fa34d31
Compare
dusterbloom
added a commit
to dusterbloom/lucebox-hub
that referenced
this pull request
May 21, 2026
Per @howard0su's review on Luce-Org#237: gguf_mmap.h/.cpp are platform abstraction (POSIX mmap / Windows MapViewOfFile) that will be reused by multiple loaders. Extracting into a standalone PR ahead of the loader refactor (target/draft/MTP heads all benefit). Includes the cubic P1 fixes from f6e8e94: - open() is now idempotent (releases prior mapping before re-opening, leaves object in default state on any failure path) - Windows release() now calls CloseHandle() before clearing handle_ New: test_gguf_mmap unit test covers open/close, idempotency, missing-file path, RAII destructor. Stacked on Luce-Org#241 (uses dflash::common namespace from the start).
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.
Summary
Mechanical rename of namespace
dflash27b→dflash::commonper @weicj's review on #237. The legacy name baked the first backend (Qwen3-27B) into shared code; renaming removes the backend leak so future backends plug into a neutral namespace.Scope
In:
namespace dflash27b→namespace dflash::common(all source + tests)dflash27b::*qualified uses →dflash::common::*dflash27b→dflash_commonproject(dflash27b)→project(dflash)_dflash27b_*→_dflash_*Out (deferred to a follow-up PR with backward-compat shims):
dflash/include/dflash27b.h(filename + header guardDFLASH27B_H)dflash27b_last_error()DFLASH27B_*(build flags + compile-time switches)DFLASH27B_*(runtime config)These all sit on the public surface — renaming them in this PR would be an ABI break without a deprecation cycle. They get a dedicated follow-up.
Verification
rg 'dflash27b::'→ zero hits outside the deferred public headerrg 'namespace dflash27b'→ zero hitsrg 'using namespace dflash27b'→ zero hitsdflash/build/)nm libdflash_common.a→ onlyN6dflash6common*mangling, nodflash27bsymbols (apart from the intentionaldflash27b_last_errorC ABI)smoke_qwen3_forward+ Qwen3-0.6B pass,test_flashprefill_kernelspass (4/4),test_kv_quantpass (T1–T4)Build note for reviewers
CUDA 12.6 + GCC 13.3 has a known
_Float128conflict during CUDA host-compiler ID detection. If you hit it, add: