Skip to content

feat(ipc): add DeepSeek4 DSpark shared worker#505

Draft
davide221 wants to merge 1 commit into
codex/deepseek4-dspark-draftfrom
codex/deepseek4-dspark-ipc
Draft

feat(ipc): add DeepSeek4 DSpark shared worker#505
davide221 wants to merge 1 commit into
codex/deepseek4-dspark-draftfrom
codex/deepseek4-dspark-ipc

Conversation

@davide221

@davide221 davide221 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a deepseek4-dspark-draft backend IPC worker that runs the DSpark proposal graph on a selected HIP GPU
  • keep the complete DeepSeek4 target, KV cache, tied head, confidence policy, and sampler in the parent process
  • batch all captured target layers into one token-major feature transfer and one acknowledgement
  • default DSpark to the existing POSIX shared payload transport, with bidirectional proposal input/output reuse and a stream fallback
  • fail initialization when the worker is required but unavailable, and disable incompatible decode-graph reuse while feature capture hooks are active

Stack

#502 ROCmFPX ggml -> #503 DeepSeek4 target -> #496 DSpark runtime -> #505 IPC

The #496 and #505 branches were rebuilt directly on their immediate bases so each pull request contains only its own changes.

Placement

This is stacked on #496. On the tested Strix Halo + R9700 host, the target runs on hip:1 and the DSpark proposal worker runs on hip:0.

The shared transport is host memfd IPC. It is not yet direct hipIpcMemHandle or peer-device memory, and drafting and target verification remain serial.

Validation

  • Release HIP build for gfx1151;gfx1201: dflash_server, backend_ipc_daemon, test_server_unit, and test_ds4_dspark_load
  • R9700 DSpark load + forward at context 42: 20,480 finite floats, RMS 0.2820
  • required shared worker starts on the R9700 and reports transport=shared
  • end-to-end greedy requests return coherent output (Paris; 120-token Roman Empire response)
  • fix/feat(ds4): ROCmFPX byte-safe decode + fused-decode path + ds4 optimizations #503 fused AR path remains active with the complete stack
  • fixed-q3 shared-worker and confidence-adaptive paths both complete coherent generation
  • the best recorded shared-worker run remains 23.6 tok/s; throughput varies materially with acceptance rate and device clocks
  • IPC mode assertions pass; the full unit binary retains the base branch's unrelated empty-chat-template failure (1 failure across 2,044 assertions)

Follow-ups

  • pinned host staging and asynchronous copies
  • capability-gated direct HIP IPC / peer-memory handles
  • overlap drafting with target verification
  • overlap-aware adaptive-width tuning on the reconciled stack

@davide221 davide221 force-pushed the codex/deepseek4-dspark-draft branch from 1fc4f00 to 867c9b8 Compare July 10, 2026 20:27
@davide221 davide221 force-pushed the codex/deepseek4-dspark-ipc branch from 07886eb to 609e123 Compare July 10, 2026 20:28
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