Skip to content

Rebase nm-shared patches onto antirez/ds4 main (0a7ad77) - #2

Open
salekseev wants to merge 25 commits into
NimbleMarkets:nm-sharedfrom
salekseev:nm-shared
Open

Rebase nm-shared patches onto antirez/ds4 main (0a7ad77)#2
salekseev wants to merge 25 commits into
NimbleMarkets:nm-sharedfrom
salekseev:nm-shared

Conversation

@salekseev

@salekseev salekseev commented Jul 25, 2026

Copy link
Copy Markdown

Rebases the nm-shared shared-library patch set onto upstream antirez/ds4 main at antirez/ds4@0a7ad77 ("Fix batched server session recovery race") — 15 upstream commits since the previous base (antirez/ds4@80ebbc3). The result is the full upstream history with the 9 nm-shared patches as a clean linear series on top.

Brings in: Metal prefill/decode kernel optimizations, CUDA tensor parallelism + session batching, ROCm GLM 5.2 support, DSpark speculative decoding, distributed CLI unification, warning-free release builds.

(Replaces the earlier merge-commit PR #1, which was auto-closed by the history rewrite; the final tree here is bit-identical to that already-reviewed result.)

Patch updates during the rebase

  • build: Add shared library targets now compiles upstream's new sources into the shared libraries as PIC objects: ds4_tp, ds4_layer_pack, ds4_gpu_args (plus a -DDS4_NO_GPU variant for shared-cpu, since ds4_gpu_args.c is GPU-define-sensitive).
  • logging: add ds4_set_stderr ... additionally adds ds4_stderr.o to upstream's new explicit test link rules (they list objects directly instead of using $(CORE_OBJS)).
  • Add ROCM shared library support gains ds4_rocm_compat/ds4_rocm_unavailable PIC objects for shared-rocm.
  • No new .metal files upstream, so the #embed manifest (ds4_metal_sources.inc) is unchanged; make check-metal passes.

Validation

  • Final tree verified bit-identical to the previously validated merge result, so all of the following applies to this exact content:
  • macOS/Metal (M5 Max): warning-free static build of all five binaries; libds4.dylib links cleanly with 417 exported ds4_* symbols including the new ds4_tp_*/ds4_layer_pack_* APIs.
  • Full make test green against the real DeepSeek-V4-Flash model, including upstream's new DSpark coverage; test-metal-session-batch green.
  • DSpark verified reachable through the shared library (options fields round-trip via ds4.h against the dylib).
  • CI on the fork: all 4 jobs green (macOS Metal arm64, Linux CUDA arm64/sbsa + x86_64, Linux ROCm x86_64).

ABI note

ds4_engine_options grew and ds4_tp_options is new — an ABI break for existing shared-library consumers. The soname is unversioned, so consumers must rebuild against the new headers.

🤖 Generated with Claude Code

Mergeability

The tip commit is an -s ours merge of the previous nm-shared line: it ties the old history in as an ancestor so this PR merges without conflicts, while the tree remains exactly the rebased result. git log --first-parent stays readable: upstream history, the 9 patches, one knot-tying merge.

antirez and others added 25 commits July 18, 2026 18:46
Requires C23 extension
Add check-metal target to ensure they exist.

Signed-off-by: Evan Wies <evan@neomantra.net>
Signed-off-by: Evan Wies <evan@neomantra.net>
Signed-off-by: Evan Wies <evan@neomantra.net>
Signed-off-by: Evan Wies <evan@neomantra.net>
This is a hack, but a clean one.  We rename stderr via preprocessor
macros in a well-scoped way.  There is a small trampoline injected
which either provides stderr, or the client-assigned file.

Signed-off-by: Evan Wies <evan@neomantra.net>
…lushing

Signed-off-by: Evan Wies <evan@neomantra.net>
Signed-off-by: Evan Wies <evan@neomantra.net>
Signed-off-by: Evan Wies <evan@neomantra.net>
Signed-off-by: Evan Wies <evan@neomantra.net>
The nm-shared patches were rebased onto antirez/ds4 main (0a7ad77); this
merge ties in the previous branch line so the rebased series can be adopted
by fast-forward/merge without conflicts. Strategy 'ours': the tree is
exactly the rebased result, unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

4 participants