Skip to content

[FEA] Resolve DynamicEmb row indices in input_dist (RFC prototype) - #551

Draft
WEIXILIN0307 wants to merge 93 commits into
NVIDIA:mainfrom
WEIXILIN0307:fea-row-wise-input-dist-indices
Draft

WEIXILIN0307 wants to merge 93 commits into
NVIDIA:mainfrom
WEIXILIN0307:fea-row-wise-input-dist-indices

Conversation

@WEIXILIN0307

@WEIXILIN0307 WEIXILIN0307 commented Nov 13, 2026 •

Copy link
Copy Markdown

Summary

Resolve DynamicEmb keys after receiver completion and reuse TorchRec forward while retaining DynamicEmb optimizer/state ownership. This remains the integrated reference Draft; small review units are linked below. Original 8518edd is preserved in merge history.

Problem

459 requires receiver resolution, correct replacement/state handling and eventual backend coverage. The original integrated diff was difficult to review. Current main also adds548 FP8/gradient/offset behavior and 557 refusal/counter semantics that must be preserved.

Changes

  • Preserve native/split-fused completion, original-key output context and explicit slot/physical/compact identity.
  • Keep leases through final backward/cancellation and coherent full-row Storage publication. Route refused HBM inserts through initialized temporary rows.
  • Decode FP8 embedding values without converting optimizer bytes; retain current gradient precision/offsets.
  • Preserve raw/FIFO gather where receiver resolution is absent; separately fix dirty-cache/refused-insert recovery.

Scope / Out of Scope

Review independent 559, 560, 563 and 562, then the HBM/backend/layout previews. Cache has an actual HBM+563 prerequisite base; raw compatibility is independent of extra layouts. 557 supersedes558.

This source is integrated with main 2995c41; the earlier semantic conflict is resolved. Historical raw JSON is outside feature diffs and preserved at immutable8518 links/archives. Real fabric/network PS and complete version/application combinations remain outside local validation.

Validation

Evidence Local result
Integrated 5d9a5052a4 676 passed per rank on two PCIe GPUs
HBM safety Partial FP32 and complete BF16 refusal, pin ownership, no persisted update for refused rows, and retry
HBM dual-GPU entry 3 passed per rank
Dependent previews Targeted Cache, Storage, pooled, TW-RW, hierarchical contract and raw/FIFO checks passed on their own heads

The integration consolidates two aggregate test files into the registered receiver, row-state and raw/FIFO suites. The GPU reference run collects 676 cases per rank, down from 849. Production sources are unchanged. Scope audit and current test commands. Changed-file pre-commit passed. Earlier results keep their original commits. HBM refusal and previous split validation.

Performance

Isolated raw compatibility improves raw 11–12.7%, Host 5.4–6.7%, Hybrid 3.7–4.1%. Measured functional24116cad80 still trails main:1.846→2.013ms raw,2.293→2.595ms Host,2.845→3.240ms Hybrid,17.034→17.643ms SparseDist. Small SparseDist shifts vary. The follow-up below measures the added HBM insertion check on an all-miss workload. Full evidence retains adverse results.

The HBM safety check adds a host wait when inserting new rows. The second alternating single-GPU all-miss raw training comparison measured 2.511 → 2.724 ms (+8.5%) against the previous #551 head on the shared host. See the follow-up results for both comparisons and workload details.

Dependencies / Follow-ups

Keep Draft pending maintainer review/CI, representative performance acceptance and unavailable deployment checks. See RFC552 and merge plan. No automatic merge, Ready transition, review request, comment or issue closure;459 remains open.

Carry explicit row lifetime and optimizer metadata from receiver-side resolution into TorchRec lookup. Cover HBM/cache, opaque storage, evaluation, scores and native training pipelines while retaining the fused DynamicEmb optimizer.

Refs NVIDIA#459.

Signed-off-by: WEIXILIN <[email protected]>
…baselines

Reuse cached JT offsets and frozen scratch parameters, and return single resolved groups directly. Add reproducible lookup and complete-checkout pipeline measurements; retain the observed overhead relative to main in the results.

Signed-off-by: WEIXILIN <[email protected]>
Integrate main d53b9c8, including native and hierarchical receiver completion and output-window gradient routing. Preserve batch lifetimes across cancellation, retained backward and mode transitions; keep optimizer tracker keys intact. Add real GPU regressions and profileable benchmark paths.

Signed-off-by: WEIXILIN <[email protected]>
Add executable hierarchical receiver/status/window and real topology fallback contracts. Cover low precision persistent rows, cross-stream retained graph cancellation, partial-group failure and rejected cache reservations. Skip empty active-row matching and identity persisted-row copies. Extend benchmarks with backend overlap and CPU/CUDA profiles; register lifetime tests in CI.

Signed-off-by: WEIXILIN <[email protected]>
…mance gates

Rewrite RFC paragraphs and before/after flow against main 8accb87. Distinguish fixed defects, compatibility choices and unsupported-topology diagnostics. Record actual target/older-stack GPU results, full table controls, CPU/CUDA profiler samples and source manifests. Keep issue completion and merge acceptance open.

Signed-off-by: WEIXILIN <[email protected]>
Signed-off-by: WEIXILIN <[email protected]>

# Conflicts:
#	corelib/dynamicemb/test/unit_tests/test_hbm_row_state.py
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