Skip to content

fix(dsv41): configure RDMA GID and negotiate endpoint MTU - #12

Merged
bertholomus merged 1 commit into
bertholomus:deepseek-v41-zigfrom
sayyidfareed:fix/dsv41-rdma-gid-mtu
Oct 12, 2026
Merged

bertholomus merged 1 commit into
bertholomus:deepseek-v41-zigfrom
sayyidfareed:fix/dsv41-rdma-gid-mtu

Conversation

@sayyidfareed

@sayyidfareed sayyidfareed commented Oct 11, 2026 •

Copy link
Copy Markdown

What this changes

Read TF_RDMA_GID_INDEX on both native ranks (default 5, strict 0–255 validation). Exchange each rail's active port MTU and program the smaller endpoint value after validating metadata. This addresses recipe #11's native GID mismatch and recipe #1's endpoint MTU issue. Both ranks must use this patch: the peer metadata struct grows from 128 to 144 bytes. Endpoint negotiation does not prove switched path MTU.

Receipt

  • Environment: native base 4e80f05ecba89a4e90d16375ade2eddbdc0a10c4, Zig 0.17.0, Ubuntu 24.04.5 LTS, kernel 7.0.0-1019-nvidia, NVIDIA driver 580.178.04; Linux ARM64 CUDA environment; two NVIDIA GB10 nodes for historical live tests, SM121, Mia EXL3 2.9 bpw revision 64ba41b6c916a587db06eae2e19b7845f7be6e6b, recipe v0.6.1 kit. Container ARM64 image sha256:1ad8c1382c09861dee9c342b59f6e5e3e65fe7fde4a07b5e379bc985b66902dd.
  • Exact standalone source tested: ad126072e921c0e3ba20418985662283a79fb46d; command zig build test -j1 --summary all with a shared Zig cache.
  • Host result: Build Summary: 17/19 steps succeeded (1 failed); 137/138 tests passed (1 failed). Cached groups are additional; this count is executed tests, not an invented full-suite total.
  • Host tests cover strict/default GID parsing, 25 endpoint MTU combinations, invalid metadata, QP arguments and peer layout. The combined deployed pair works with GID 3 and negotiated MTU enum 3. Hardware tests cover that pair only, not all fabrics.
  • Lean checker: pinned baseline 1,420 findings; this branch 1420; zero new findings. Existing oversized family modules are inherited. zig fmt --check passes changed Zig files.
  • The sole host failure is the independently reproduced upstream direct_io buffered-reference bug, submitted separately; this PR does not suppress it.
  • Exactness: full drafted/plain, resumed/fresh, concurrent/solo and tensor seam gates on this standalone commit remain unrun; historical combined-device checks are not claimed as substitutes.
  • Decode/prefill: no fresh prescribed benchmark matrix for this standalone commit; no prompt-speed non-regression claim.
  • Not run: Metal M1–M5 and a clean-machine release installation. test-golden was attempted on the pinned source but that step does not exist, despite CONTRIBUTING.md naming it.
  • Public recipe and evidence and qualification limits. Draft pending remaining device/release gates and maintainer review.

Checklist

  • Every token still goes through lane rounds; no serial bypass (test-only N/A where applicable).
  • Drafted equals plain, resumed equals fresh, concurrent equals solo (test-only N/A).
  • No precision reduction is introduced; any unverified output equivalence is disclosed above.
  • Prompt processing is no slower than the last release (test-only N/A).
  • Tested and untested platforms are named.
  • Red/green regression evidence is available; other missing device gates remain disclosed.
  • Added comments are single lines; measurements/history remain in receipts.
  • Outgoing commits use the public GitHub noreply identity; no private hosts, paths, credentials or tool attribution.

Merge considerations

Two-way source revert. Preserve both ranks at the same source/runtime identity. This PR has not changed the default deployed upstream recipe.

@bertholomus

Copy link
Copy Markdown
Owner

Thank you @sayyidfareed — this addresses a real pain for single-rail and mixed-MTU fabrics (recipe issue #11 and the 4x thread both), and the strict GID parsing plus 25 MTU combinations of host tests are thorough.

We're not merging it now: the peer metadata struct grows from 128 to 144 bytes, so it's a wire-format change — both ranks must move together and mixed-version pairs can't talk. That needs a coordinated engine release, and the repo is in maintenance mode. Leaving it open as the prepared fix for the next window; until then, the local env-override patches from the issue threads are the working route. Thanks again.

@bertholomus
bertholomus marked this pull request as ready for review October 12, 2026 14:52
@bertholomus
bertholomus merged commit 6a1af41 into bertholomus:deepseek-v41-zig Oct 12, 2026
bertholomus added a commit to bertholomus/deepseek-v4.1-tensorfold-tp2-2xgb10 that referenced this pull request Oct 12, 2026
Docs only: documents the knob from bertholomus/TensorFold#12 (default 5 unchanged; ibv_devinfo -v / show_gids; both ranks must run the same engine build, peer description 128 -> 144 bytes).
MiaAI-Lab pushed a commit to MiaAI-Lab/DeepSeek-V4.1-Flash-1017-4x-DGX-Sparks-TensorFold that referenced this pull request Oct 26, 2026
Patch 0001 sets every RDMA queue pair's path MTU to a fixed 4096. On a switched
fabric whose Ethernet MTU is 1500 the RoCE active MTU is 1024 and RDMA=1 fails every
request. 0026 reads the port's active MTU with ibv_query_port (capped at 4096) and
uses it as path_mtu; on a 4096 fabric the value is unchanged. The idea is
bertholomus/TensorFold#12 (negotiated endpoint MTU), local endpoint only.
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