Skip to content

Separate graph TIDs from backend UIDs in JSON repros - #383

Closed
hwanseoc wants to merge 12 commits into
NVIDIA:developfrom
hwanseoc:hwanseoc/graph-json-tid-schema
Closed

Separate graph TIDs from backend UIDs in JSON repros#383
hwanseoc wants to merge 12 commits into
NVIDIA:developfrom
hwanseoc:hwanseoc/graph-json-tid-schema

Conversation

@hwanseoc

@hwanseoc hwanseoc commented Jul 12, 2026

Copy link
Copy Markdown
Member

@coderabbitai ignore

Why

Graph JSON v1 uses tensor names as references. Duplicate and anonymous names can collapse distinct tensors and make extracted repros incorrect.

This draft is the hybrid-identity alternative to #280:

  • tid: graph-local structural identity used by graph JSON and repro extraction
  • uid: user/backend identity used by variant packs and execution plans

Architecture

  • emit graph JSON 2.0
  • assign graph-local TIDs at tensor creation
  • reference node ports and ragged offsets by TID
  • preserve UID and whether it was explicitly assigned
  • emit both TID and UID in tensor dumps; join repro dumps by TID
  • use process-local gid to correlate serialized graphs with executions
  • leave backend UID assignment behavior unchanged

Behavior shared with #280

  • tensor-list graph schema with optional names
  • typed rejection of malformed versions, tensor tables, duplicate identities, and dangling references
  • versioned plan-only serialization without gid or graph structure
  • per-execution repro correlation
  • simple, FP8, and MXFP8 SDPA extraction, including sequence lengths and ragged offsets
  • migrated XLA serialization sample and native lowered-JSON consumers
  • canonicalization of shared ragged-offset objects during deserialization

Intentional difference from #280

TID and UID are explicit, non-interchangeable namespaces. Structural serialization does not assign missing backend UIDs. #280 instead uses UID for both structure and execution identity.

Compatibility

  • Structural graph JSON v1 is rejected; no ambiguous upgrade is attempted.
  • Plan/backend consumers remain UID-based.
  • gid is process-local execution correlation, not persistent identity.

Dependencies

#386 contains the architecture-independent runtime tensor-dump and FP8/MXFP8 tester fixes.

Verification

Based on develop 526020e; B200, CUDA 13.1, cuDNN backend 9.30:

  • C++ graph/serialization suite: 75 assertions in 10 cases passed
  • chained two-operation TID allocation torture test: 11 assertions passed
  • shared ragged-offset canonicalization: 5 assertions passed
  • native lowered-JSON regression: 1 passed
  • deviceless deserialize API-contract regression: 1 passed
  • complete repro-tool suite: 71 passed, 2 MXFP8 target skips
  • live parity against Use UID-based graph JSON v2 for repro extraction #280 after normalizing only UID/TID identity: forward, ragged forward, backward, and FP8 payloads match

Draft question

Should graph-local TID allocation remain at tensor creation sites, or move to a centralized graph-owned allocator before merge?

@hwanseoc

Copy link
Copy Markdown
Member Author

@cudnn-ci-bot run

@cudnn-ci-bot

Copy link
Copy Markdown

🚀 Running mirror pipeline

Branch: cudnn-gh/pr-383-a7b38d3
Pipeline: 57833052

@hwanseoc
hwanseoc force-pushed the hwanseoc/graph-json-tid-schema branch from a7b38d3 to 2ca4806 Compare July 14, 2026 20:19
@hwanseoc hwanseoc closed this Jul 16, 2026
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