Skip to content

GetStaticPath 与 Multipod

本页所有地址均适用于 libtpu-0.0.40-cp314-cp314-manylinux_2_31_x86_64 wheel 中的 libtpu.so(build libtpu_lts_20260413_b_RC00,build-id 89edbbe81c5b328a958fe628a9f2207d)。该二进制带有完整 C++ 符号(.text VMA == file offset);下文所有地址都是 VMA。其他版本会不同。

摘要

GetStaticPath 是确定性的单路径生成器,单播 ICI 路由表发射器在每个 (src,dst) 路由尚未位于 RouteTargetCache 中时会使用它。给定两个环面坐标后,它会生成恰好一条按维度顺序路由(DOR)的路径:每个轴一个 DirectionHops 条目,按 (hop_count<<6 | polarity<<3 | orientation) 打包。它通过计算每个轴的带符号距离,并在每个轴上在每个 (src,dst) 跳数上限内选择 wrap-around(torus)距离和 direct(mesh)距离中较短者来完成。这是具备弹性、避故障能力的 RandomizedToroidalWildFirstPaths 的生产同级实现:输出同样打包的 DirectionHops,使用同一个 CreateRoutePathFromDistance 打包器,但没有多路径搜索,也没有故障规避;每次调用只生成一条 DOR 路径。

本页还记录了 GetStaticPath 所供给的 VC-balance 分配规则。静态路径会逐跳决定路由是否 转弯(改变轴/极性)、是否 跨越 dateline(环面 wrap 边),以及沿每个轴行进多远。这三个属性驱动 GetNextHopAction 中无死锁的虚拟通道级联:转弯强制 VC1,跨越 dateline 或触发负载均衡则强制 VC2,普通直行跳保持在 VC0。“VC 只能在跨越 wrap 时单调增加”的规则是经典的维度顺序环面死锁破除方法;每轴均衡阈值(~0.2 · axis_size)会把一部分短 dateline 流量引到高 VC 上,以均衡每个 VC 的链路负载。专门的 VC-Balance Allocation 页面负责完整的无死锁论证和阈值构造数学;本页记录的是路由生成器下游消费者如何根据路径形状使用该规则。

最后,本页涵盖 multipod 跨 pod 路由发射multipod::RoutingTableGenerator,独立翻译单元 dragonfish/multipod/routing_table_generator.cc)。multipod 层把整个 fabric 建模为沿 X 轴串接的 num_pods 份单 pod mesh,为每个芯片基于以 multipod 坐标重新表达的每 pod 本地目的地构建一张 egress 表和一张 next-hop 路由表,用“torus 仅在更短时使用,否则 mesh”的 DOR 规则路由跨 pod 跳,把 next-hop VC 固定为 1(跨 pod 链路是点到点的;没有需要跨 pod 破除的环面环),并在高延迟(光)跨 pod 链路上添加通道合并。它的 GeneratesDeadlockFreeTables 返回 false:multipod 层把 pod 内无死锁性交给上面的 VC 级联构建出的每 pod 表。

对于重新实现,契约是:

  • 静态路径遍历use_limited_ici 模式门控、在 max_hop 上限下每轴 torus-vs-mesh 的最短距离选择,以及 CreateRoutePathFromDistance 发射的 (hop_count<<6 | polarity<<3 | orientation) DirectionHops 打包。
  • VC-balance 分配规则:每跳三路级联(turn ⇒ VC1;straight + dateline ⇒ VC2;straight + balance ⇒ VC2;否则 VC0)、dateline 谓词,以及基于每轴跳数阈值的 balance 门控。
  • multipod 跨 pod 发射:沿 X 的 N-pod 模型、GetMultipodCoordinate、跨 pod GetRoutingDistance/GetNextRoutingDirection DOR 规则、固定 VC=1 的 egress/next-hop 条目写入器,以及高延迟链路通道合并。
GetStaticPathRoutingTableGenerator::GetStaticPath @ 0x1fbdbd00
路径打包器slice_builder::CreateRoutePathFromDistance @ 0x20c02040
VC 级联RoutingTableGenerator::GetNextHopAction @ 0x1fbda6a0(VC 字段 @ result +0x10
Balance 门控RoutingTableGenerator::GetVcBalanceUsage @ 0x1fbdb4c0
Multipod 发射multipod::RoutingTableGenerator::Generate @ 0x1fbf03a0
源码(slice_builder)platforms/accel_ssw/deepsea/slice_builder/friends/routing_table_generator.cc
源码(multipod)platforms/accel_ssw/deepsea/dragonfish/multipod/routing_table_generator.cc
源码(打包器)platforms/accel_ssw/deepsea/slice_builder/internal/routing_path.cc
打包的 DirectionHops 代码(hop_count<<6) | (polarity<<3) | (orientation & 7),≤ 7 个轴

GetStaticPath:确定性的单路径生成器

目的

GetStaticPath(src, dst) 返回一个 IciRoutePathDirectionHops 向量 + 曼哈顿范数代价),描述从 srcdst 的 DOR 路径。单播发射器在 RouteTargetCache 未命中时调用它(缓存快路径见 Route-Table Generation)。它有两种模式,由一个配置字节选择;有意思的是内联的“limited-ICI”生成器,它会逐轴选择 torus 与 mesh 距离中较短者。

入口点

text
RoutingTableGenerator::GetStaticPath (0x1fbdbd00)         ── deterministic path gen
  ├─ if !use_limited_ici (gen+0x14): vtable[+0xe8] GetStaticPath ── delegate to topology
  │     └─ e.g. TwistedTorusTopology::GetStaticPath (0x20b407c0) ── plain torus DOR
  ├─ topo[gen+0x20]->GetDistances (vtable+0xb8)           ── torus (wrap) distance
  ├─ topo[gen+0x28]->GetDistances (vtable+0xb8)           ── mesh (direct) distance
  └─ slice_builder::CreateRoutePathFromDistance (0x20c02040) ── pack DirectionHops

算法

c
function GetStaticPath(gen, src, dst):                   // 0x1fbdbd00
    if (gen.use_limited_ici == 0):                       // BYTE[src+0x14], line 0x1fbdbd1a
        // limited-routing off: hand the whole decision to the topology's
        // own generator (plain torus shortest-DOR path).
        return gen.topo->vtable[0xe8](gen, dst)           // delegate, line 0x1fbdbd2x..ed5

    // limited-ICI on: compute a bounded path inline.
    dist_torus = gen.topo->GetDistances(src, dst)         // vtable+0xb8 (gen+0x20)  [routing_table_generator.cc:697]
    dist_mesh  = gen.mesh->GetDistances(src, dst)         // vtable+0xb8 (gen+0x28)  [:698]
    n          = gen.topo->num_dimensions()               // vtable+0x48
    chosen     = new int[n]                               // [:702] on alloc failure
    for i in 0 .. n-1:                                    // [:703] per-axis loop
        t = dist_torus[i]                                 // signed wrap distance
        m = dist_mesh[i]                                  // signed direct distance
        if abs(t) >= abs(m):                              // 0x1fbdbe43: torus not strictly shorter
            chosen[i] = m                                 //   take mesh (also wins ties)
        else if abs(t) <= gen.max_hop:                    // 0x1fbdbe52: torus within hop cap (gen+0x10)
            chosen[i] = t                                 //   take torus (the wrap path)
        else:
            chosen[i] = m                                 //   torus too long → mesh
    dim_order = gen.topo->GetDimensionOrder()             // vtable+0x70, line 0x1fbdbf02
    return CreateRoutePathFromDistance(dst, chosen, dim_order)   // 0x20c02040, line 0x1fbdbf2d

**注意:**每轴选择是 最短距离,不是笼统地“偏好 mesh”。torus(wrap)距离只有在它 严格短于 mesh 距离且其幅值 <= max_hopgen+0x10,每个 (src,dst) 的边界)时才会胜出。若打平,或 wrap 超过上限,则采用 mesh(非 wrap)距离。因为 wrap 跳会跨越 dateline,所以在某个轴上选择 torus 正是下游启用 VC2“Crossed a dateline”分支的条件(见 VC 级联);mesh 路径绝不会跨越 dateline。

mesh 距离视图

gen+0x28 是一个 slice_builder::Mesh,即同样维度的非 wrap 距离视图,它在 InitializeGenerator @ 0x1fbd78f7 中由主拓扑序列化出的 proto::Topology 构造一次(拓扑 vtable[+0x38] Serialize → Mesh ctor;Mesh vtable 安装于 0x1fbd78fe,在 0x1fbd7909 存到 [gen+0x28])。gen+0x20 是主拓扑(twisted-torus / resilient-toroidal),其 GetDistances 经过 twist 和 wrap 调整。两者共享维度,差别只在 wrap 边是否计入;这正是逐轴比较的全部意义。

函数映射

函数地址作用
RoutingTableGenerator::GetStaticPath0x1fbdbd00模式门控 + 每轴 torus-vs-mesh 选择
slice_builder::CreateRoutePathFromDistance0x20c02040打包 DirectionHops,计算代价
TwistedTorusTopology::GetStaticPath0x20b407c0委托目标(limited-ICI 关闭)
ResilientToroidalTopology::GetStaticPath0x1fbe1ce0委托目标(resilient 拓扑)
InitializeGenerator(Mesh 构建)0x1fbd78f7构建 gen+0x28 非 wrap mesh

CreateRoutePathFromDistance:DirectionHops 打包器

目的

把带符号的每轴距离向量和维度顺序转换为打包的 IciRoutePath。每个轴一个 DirectionHops 字编码跳数、极性(符号)和 orientation(轴)。这是 resilient 生成器的 AppendHopsToPath 的确定性孪生版本:两者发射同样的打包代码;下游所有逐跳解码器(CrossesDatelineGetVcBalanceUsage)都会读回这种格式。

算法

c
function CreateRoutePathFromDistance(out, dst, dist, dim_order):  // 0x20c02040
    if dist.num_dims != dst.num_dims:                    // dimensionality guard
        return MakeError("Mismatch source coordinate dimensionality %d and "
                         "routing distance dimensionality %d")    // [routing_path.cc:106]
    if dim_order.size != dst.num_dims:
        return MakeError("Mismatch source coordinate dimensionality %d and "
                         "routing order dimensionality %d")        // [:113]

    path.cost = dst.ManhattanNorm()                       // staged in the path body, copied to path+0x28 by the tail vmovups
    for idx, dim in enumerate(dim_order):                 // walk axes in dimension order
        if idx >= 7: BUG()                                // ≤ 7 axes hard cap (0x20c0212d)
        d        = dist.GetCoordinate(dim)                // signed per-axis distance
        orient   = Direction::DimensionToOrientation(dim) // 0x20c02107
        polarity = (d <= 0) ? 2 : 1                       // setle;inc (0x20c02121/24)
        path.dir_hops[idx] = (d << 6) | ((orient & 7) + 8*polarity)   // pack (0x20c0213a..41)
    return path

打包的 DirectionHops 代码

字段含义来源
orientation[2:0]code & 7轴,通过 DimensionToOrientation(dim) 得到0x20c02107
polarity[5:3](code>>3) & 7(d <= 0) ? 2 : 1,方向符号0x20c02121
hop_count[..:6]code >> 6每轴距离,读者以有符号方式(sar)使用0x20c0213a

**陷阱:**打包器把 有符号 距离移入 hop-count 字段(d << 6),而 polarity 另外、冗余地携带符号。若重新实现存储 abs(d) << 6,对于关键读者会产生相同语义,因为每个消费者都用算术右移恢复跳数(code >> 6sar),并从低位取 orientation/polarity:GetVcBalanceUsagecode >> 6 读作沿轴的有符号跳数(0x1fbdb55c),CrossesDateline(DirectionHops) 遍历 (code >> 6) - 1 跳。应匹配读者的 sar 语义,而不是打包字中的某个特定符号约定。(polarity-1/2 到 POS/NEG 的精确映射是从 resilient 打包器中相同的 (setle;inc) 模式推断的,并未重新读取 enum:HIGH confidence。)


VC-balance 分配规则

**范围:**完整的无死锁证明、CreateVcBalanceThreshold~0.2·axis_size 构造,以及 dateline 侧翻转谓词位于 VC-Balance Allocation。本节从路由生成器一侧记录该规则:静态路径形状(turn / dateline-cross / hop-count)如何在 GetNextHopAction 中选择每跳 VC。

目的

发射器解析出非终止跳的 output_link 后(通过 LinkMap::GetLink 朝下一跳),必须给该跳分配虚拟通道 vc ∈ {0,1,2}。选择是在 GetNextHopAction @ 0x1fbda6a0 中根据静态生成器构建出的路径派生的三个布尔值计算出的三路优先级级联。结果结构保存 {next_chip @ +8, output_link @ +0xc, vc @ +0x10}(写于 0x1fbdaa6a)。

算法

c
function VcForHop(gen, src, path, hop_id):               // inside GetNextHopAction 0x1fbda6a0
    // three inputs, all for the same hop:
    turned  = Direction::IsSame(this_hop_dir, next_hop_out_dir)   // 0x1fbda8fd → IsSame @0x20c025e0
              // IsSame compares the proto Direction {orient,polarity}; FALSE ⇒ the path turns
    crossed = CrossesDateline(src, path)                  // 0x1fbda8b5 → 0x1fbdb120 (per-hop)
    balance = GetVcBalanceUsage(src, this_hop_dir_hops)   // 0x1fbda921 → 0x1fbdb4c0

    if not turned:                                        // 0x1fbda9cb
        vc = 1   // VLOG "Turned, forced to low VC!" (a1b33dd, $_2 @ line 251)
    else if crossed:                                      // 0x1fbda950
        vc = 2   // VLOG "Crossed a dateline, forced to high VC!" (a1b341d, $_3 @ line 254)
    else:
        vc = 0
        if balance:                                       // 0x1fbda9ea/0x1fbda9fd
            vc = 2   // VLOG "VC load balancing, forced to high VC!" (a1b33f7, $_4 @ line 257)
    return {next_chip, output_link, vc}

**怪异点:**第一个分支在 !IsSame 时触发,却记录 "Turned, forced to low VC"IsSame 是本跳方向与下一跳输出方向之间的 同方向 测试,所以 !IsSame ⇒ 路径在下一芯片改变轴或极性 ⇒ 转弯。若重新实现者把该分支字面读成“如果同方向,则 VC1”,就会反转规则。VC0 是 未标记的 直行延续默认值;VC2 是唯一的“high”VC,有两种到达方式:dateline wrap(死锁破除)或直行跳上的 balance 溢出。

VC 表

条件(每个非终止跳)VCVLOG 标签
直行(IsSame),无 dateline,无 balance0(无标签,默认)
转弯(!IsSame this-vs-next direction)1Turned, forced to low VC!
直行,跨越 dateline(wrap 边)2Crossed a dateline, forced to high VC!
直行,无 dateline,balance 触发(hops ≤ threshold2VC load balancing, forced to high VC!
终止于 dst(src == dst,无跳)1(直接通过 SetUnicastVcControl(.,1) 设置)

balance 门控

GetVcBalanceUsage @ 0x1fbdb4c0 只有在以下条件 全部 成立时才返回 true(字节精确的门控链):

c
function GetVcBalanceUsage(gen, src, dir_hops):           // 0x1fbdb4c0
    if not CrossesDateline(src, dir_hops):  return false  // 0x1fbdb4de — only dateline hops balance
    if gen.vc_balance_enabled != 1:         return false  // BYTE[gen+0x9]==1 gate (0x1fbdb4ed)
    if (gen.flag_0x14 | crossed) != 0:      return false  // gating flag, BYTE[gen+0x14] (0x1fbdb4f4)
    orient    = dir_code & 7
    hops      = dir_code >> 6                              // signed, sar (0x1fbdb55c)
    return hops <= gen.vc_balance_threshold[orient - 1]    // setle (0x1fbdb55f/64); vector<int> @gen+0x60

阈值数组(gen+0x60,数量 gen+0x68)由 CreateVcBalanceThreshold @ 0x1fbd8320 构建,并大致随轴尺寸线性缩放(threshold ≈ round(axis_size · ~0.2 ± const)),所以只有行进 ≤ ~⅕ 个轴长度的跳会被 balance 移到 VC2。构造数学和三路轴“kind”选择器记录在 VC-Balance Allocation 页面。

注意:gen+0x14 处的字节同时被 GetVcBalanceUsage(此门控)和 GetStaticPath(其 use_limited_ici 模式位)读取。尚未厘清该同一偏移是否真的是别名,即“limited routing disables balance”,还是两个不同的相邻字段在读取中折叠成同一处。两个代码路径都读取 BYTE[+0x14]。(该字段双重角色的置信度 LOW;两个读取都指向 +0x14 是 CERTAIN。)


Multipod 跨 pod 路由发射

目的

multipod::RoutingTableGenerator::Generate @ 0x1fbf03a0(独立翻译单元 dragonfish/multipod/routing_table_generator.cc)构建位于每 pod 表 之上 的路由表层。它把整个 fabric 视为沿 X 轴(dim 0)排布的 num_pods 份单 pod mesh,并为每个芯片发射一张 egress 表和一张 next-hop 表。Pod 内无死锁性委托给每 pod 的 slice-builder 表(上面的 VC 级联);跨 pod 链路是点到点的,因此 multipod next-hop VC 固定。

入口点

text
multipod::RoutingTableGenerator::Generate (0x1fbf03a0)
  ├─ topo->TotalSize()                  (vtable+0x78)  ── total_chips  → gen+0x18
  ├─ Mesh(topo->GetDimensionSizes())    (vtable+0x50)  ── single-pod mesh
  ├─ SinglePod.TotalSize()                             ── per_pod chip count  → gen+0x90
  ├─ require total_chips % per_pod == 0                ── else "Invalid multipod topology …"
  ├─ require per_pod <= 1024 (kNumRoutingTableEntries)
  ├─ CreateDateline()                   (0x1fbf0617)
  └─ for chip in 0..total_chips-1:
        ├─ CreateEgressRoutingTable     (0x1fbf0709) ──┐ one RoutingTable each
        └─ CreateNextHopRoutingTable    (0x1fbf07a9) ──┘  (egress gen+0xb8/0xc0, nexthop gen+0xd0/0xd8)
     SetChannelMerges                   (0x1fbf2100) ── AddChannelMerge on high-latency links

模型:沿 X 串接的 N 个单 pod

c
function Generate(gen, topo, linkmap, opts):              // 0x1fbf03a0
    total_chips = topo->TotalSize()                       // vtable+0x78, line 0x1fbf03f2  → gen+0x18
    pod_mesh    = Mesh(topo->GetDimensionSizes())         // vtable+0x50, line 0x1fbf040a  → gen+0xb0
    per_pod     = pod_mesh.TotalSize()                    // line 0x1fbf0512               → gen+0x90
    if total_chips % per_pod != 0:                        // line 0x1fbf051e (idiv)
        return MakeError("Invalid multipod topology %s. Must be multiple %s "
                         "single pod concatenated along X dimension.")  // @0xa053c08
    if per_pod > 1024:                                    // kNumRoutingTableEntries, line 0x1fbf0608
        RetCheckFail("num_entries <= kNumRoutingTableEntries")
    CreateDateline()                                      // 0x1fbf0617
    for chip in 0 .. total_chips-1:
        coord = topo->GetCoordinate(chip)                 // vtable+0x88
        CreateEgressRoutingTable(coord, &egress[chip])    // 0x1fbf11e0
        CreateNextHopRoutingTable(coord, &nexthop[chip])  // 0x1fbf1360
    SetChannelMerges(...)                                 // 0x1fbf2100

陷阱:1024 硬上限作用于 per_pod,也就是 每 pod 芯片数(路由表 num_entrieskNumRoutingTableEntries),在 0x1fbf0608 处检查为 num_entries <= 1024。它不是 pod 数量上限。整除要求(total_chips % per_pod == 00x1fbf051e)是唯一把 num_pods = total_chips / per_pod 与拓扑绑定的约束。0xa053c08 处的错误字符串明确命名了串接轴:"concatenated along X dimension."

GetMultipodCoordinate:chip → pod 对齐的 multipod 坐标

CreateEgressRoutingTable / CreateNextHopRoutingTable 迭代 dst = 0 .. per_pod-1(每 pod 数量,不是总数),把每个本地目的地映射到其 multipod 坐标,并为每个本地 dst 写入一个条目;跨 pod 跳由由 multipod 坐标差隐含表示。

c
function GetMultipodCoordinate(gen, pod_index, global):   // 0x1fbf14a0
    pod_coord = SinglePod.GetCoordinate(pod_index)        // line 0x1fbf14cc
    pod_x0    = SinglePod.GetDimensionSize(0)             // line 0x1fbf14fb (per-pod X extent)
    local_x   = global.x % pod_x0                         // intra-pod X offset (idiv 0x1fbf153a)
    result.x  = global.x - local_x + pod_coord.x          // snap to pod boundary + pod identity
                                                          //   (v12 + v9 - v10, line 0x1fbf1572)
    result.y  = pod_coord.y                               // line 0x1fbf1588
    return {result.x, result.y}                           // a 2-tuple — concat axis is X (dim 0)

结果会剥离芯片的 pod 内 X 偏移,并替换为 pod 的 mesh-X 位置:一个 {pod-aligned-X, pod-Y} 二元组,用 mesh 坐标命名该芯片所属的 pod。

跨 pod DOR 路由

c
function GetRoutingDistance(gen, src, dst):               // 0x1fbf2e60
    dist_torus = gen.topo->GetDistances(src, dst)         // vtable+0xb8 (gen+0x8)
    dist_mesh  = gen.pod->GetDistances(src, dst)          // vtable+0xb8 (gen+0xb0)
    for i in 0 .. num_dims-1:
        t = dist_torus[i];  m = dist_mesh[i]
        if abs(t) < abs(m) and abs(t) < 3:                // 0x1fbf2f94/97 (setb; setb; and)
            chosen[i] = t                                 //   short torus wrap allowed
        else:
            chosen[i] = m                                 //   else the direct (cross-pod) mesh
    return chosen

function GetNextRoutingDirection(gen, src, dst):          // 0x1fbf26e0
    dist = GetRoutingDistance(src, dst)
    for i in 1 .. num_dims:                               // 1-based axis index
        if dist[i-1] != 0:                                // first non-zero axis (0x1fbf2771)
            return Direction{orient = i, polarity = (dist[i-1] <= 0) ? 2 : 1}  // 0x1fbf278a
    // strict lowest-index-axis-first DOR

**注意:**跨 pod 距离只在 torus wrap 同时严格短于 mesh 距离且 < 3 跳(0x1fbf2f97)时才允许使用。这个 < 3 窗口是 pod 内短 wrap(保留)与跨 pod 跳(强制使用直接、非 wrap 的 mesh 距离)之间的分界线。源代码行 392399 位于 multipod/routing_table_generator.cc

条目写入器、固定 VC 与通道合并

c
function SetEgressRoutingTableEntry(this, src, dst, idx, table):    // 0x1fbf17c0
    if src == dst:  table.SetUnicastTerminal(idx, false)            // line 0x1fbf17fd / :147
    else:
        dir  = GetNextRoutingDirection(src)                        // line 0x1fbf184e / :39
        link = LinkMap.GetLink(this.chip_id, dir)                  // line 0x1fbf1914 / :76
        table.SetUnicastTarget(idx, link, false)                   // line 0x1fbf1936 / :80
        // NO SetUnicastVcControl on the egress hop

function SetNextHopRoutingTableEntry(this, src, dst, idx, table):  // 0x1fbf1a80
    if src == dst:
        table.SetUnicastTerminal(idx, 1)                           // line 0x1fbf1ac0 / :296
        table.SetUnicastVcControl(idx, /*vc=*/1, true)             // FIXED VC=1, line 0x1fbf1adf
    else:
        next = topo.Walk(coord, GetNextRoutingDirection(src))      // vtable+0xa0, line 0x1fbf1c00
        link = LinkMap.GetLink(...)                                // line 0x1fbf1de2
        table.SetUnicastTarget(idx, link, 1)                       // line :210
        table.SetUnicastVcControl(idx, /*vc=*/1, true)             // FIXED VC=1, line :213 / 0x1fbf1c6e

**怪异点:**multipod next-hop 表在每一跳上都使用 固定 VC = 1,终止和非终止都一样;它 使用 VC 规则 中 slice-builder 的 dateline/turn/balance 级联。跨 pod 链路是点到点光跳,没有需要跨 pod 破除的环面通道环,因此单个 VC 足够。egress 表完全 SetUnicastVcControl(egress 是进入 next-hop 机制的本地跳)。VC 立即数 1 已按字节确认(调用点处 mov ecx,1);IDA 反编译器把该立即数折进 SetUnicastVcControl(a5) 调用而不打印。

SetChannelMerges @ 0x1fbf2100LinkMap::GetHighLatencyLinks0x1fbf220f)上应用 AddChannelMerge(MergeBehavior)0x1fbf24c3),并结合 GetDirection0x1fbf2270)与 GetLinks0x1fbf238c)。因此通道合并专门针对高延迟跨 pod fabric(OCS / optical)。

GeneratesDeadlockFreeTables @ 0x1fbf2e40xor eax,eax; ret,返回 false。multipod 层本身不保证无死锁:pod 内无死锁来自每 pod slice-builder VC 级联,跨 pod 无死锁来自非循环的点到点光链路。

函数映射

函数地址作用
multipod::Generate0x1fbf03a0Pod 模型、每芯片表构建、整除/上限检查
multipod::GetMultipodCoordinate0x1fbf14a0Chip → pod 对齐的 {X,Y} multipod 坐标
multipod::GetRoutingDistance0x1fbf2e60每轴 torus-if-<3-else-mesh 距离
multipod::GetNextRoutingDirection0x1fbf26e0第一个非零轴 DOR 方向
multipod::CreateEgressRoutingTable0x1fbf11e0循环 dst < per_pod,填充 egress 条目
multipod::CreateNextHopRoutingTable0x1fbf1360相同循环,next-hop 条目
multipod::SetEgressRoutingTableEntry0x1fbf17c0终止 / target 写入器(无 VC)
multipod::SetNextHopRoutingTableEntry0x1fbf1a80终止 / target 写入器 + 固定 VC=1
multipod::SetChannelMerges0x1fbf2100在高延迟链路上 AddChannelMerge
multipod::GeneratesDeadlockFreeTables0x1fbf2e40返回 false(委托给每 pod)
multipod::CreateDateline0x1fbf0b20构建 multipod dateline(仅调用点)

注意:CreateDateline @ 0x1fbf0b20 已追踪到 Generate 中的调用点(0x1fbf0617),但其函数体未按字节解码。考虑到跨 pod next-hop 使用固定 VC=1,multipod dateline 大概只针对每 pod(pod 内 wrap);跨 pod mesh 跳按构造是非循环的。置信度:LOW,直到函数体被解码。


与同级生成器的关系

生成器路径搜索故障处理VC 规则页面
GetStaticPath(本页)单条 DOR 路径每跳三路级联
RandomizedToroidalWildFirstPaths随机化多路径避故障(wild-first)相同级联,相同打包器链接
multipod::Generate(本页)跨 pod DOR固定 VC=1

GetStaticPathRandomizedToroidalWildFirstPaths 通过同一个 CreateRoutePathFromDistance 打包器发射完全相同的打包 DirectionHops 格式;静态生成器是确定性的、无搜索的 slice-builder 类似物。multipod 生成器复用 DOR 思想(GetNextRoutingDirection 是它的最低索引轴优先 DOR),但在 multipod 坐标和一条独立、更简单的 VC 规则上运行。

交叉引用