Skip to content

副本组势垒发射

地址适用于 libtpu-0.0.40-cp314 轮中的 libtpu.so。其他版本有所不同。

摘要

BarrierWithinReplicaGroupStartImpl @0x1c698080 是 TensorCore (TC) 执行器,它发出每个副本组交会:每个副本组中的单个核心向其每个组对等方的屏障同步标志发送信号,然后延迟连接等待所有副本。它是 REPLICA(2) 降低的叶片,并且 - 具有更广泛的同级组 - 也是 GLOBAL(1) 降低的叶片。两者都通过相同的 net_util::BarrierCoresTree @0x1c6a75c0 驱动程序到达;它们的区别仅在于树屏障选择哪个 TreeBarrierType(以及哪个对等集)。此页面拥有该叶子:GetReplicaGroupCoreInfo 对等查找、Pneg/Predicated 主核门控、ScheckGe/ScheckLt/ScheckNe 合法性检查和 VsyncAddRemote 每对等驱动。

读者应该已经从同级页面知道两件事。决定集体的分类器获得 REPLICA(2)(单个、非分区副本组、无调度冲突、不全局受益),位于 推断屏障配置 上。 BarrierConfig → SFLAG 编号 — REPLICA(2)/CUSTOM(3)base + idGLOBAL(1)base + count + 4 — 位于 屏障到 SFLAG 的绑定 上,GLOBAL 窗口保留以及共享的 net_util::GetBarrierSyncFlag 映射器位于全局屏障 SFLAG 窗口。此页面重新导出该号码;它以 LloValue* sflag 作为输入并记录执行器用它做什么。

信号/等待协议 — 树扇出结构、GetTreeNodeRecordSimpleLoopVWaitGe 等待端 — 位于 树屏障/vSync 上。此页面拥有 副本组发射主体BarrierCoresTree 如何咨询 GetGlobalBarrierSyncFlagNumber 的 GLOBAL slot 并将组内 TreeBarrierType 路由到 BarrierWithinReplicaGroupStartImpl,以及该实现如何解析对等点、控制对主核心的参与、验证每个对等点并发出 VsyncAddRemote(sflag, peer, +1)

重新实现,合约为:

  • BarrierCoresTree 是 GLOBAL 和 REPLICA 的同一个驱动程序。 它为所有核心臂绑定 GLOBAL sflag(通过 GetGlobalBarrierSyncFlagNumber),从 ProgramSharedRegistry 获取每种类型的 InfoTable,并对组内线程进行线程化扇出到 BarrierWithinReplicaGroupStartImplTreeBarrierType臂(kAll/REPLICATED/PARTITIONED)选择对等集; SFLAG 槽由调用者的 GetBarrierSyncFlag (§1) 提供。
  • BarrierWithinReplicaGroupStartImpl 信号; Start impl 解析该核心的组对等点 (GetReplicaGroupCoreInfo),将主体谓词为 master 核心 (Pneg/Predicated),验证每个对等点 (ScheckGe/ScheckLt/ScheckNe),并发出每个对等点 VsyncAddRemote(sflag, peer, +1)。然后,它实现延迟的 BarrierWithinReplicaGroupJoin::$_1 堆关闭(等待端),而不是发出内联等待(§2)。
  • 仅主控门是 Pneg(is_master) → Predicated 仅该组的主控核心(对等序数 0,由 GetReplicaGroupCoreInfo 解析)运行扇出主体;非主核心跳过信号循环。退化组(group_size <= 1)采用简单的单成员快速路径($_0),根本没有远程信号(§2.3)。
  • VsyncAddRemote 是驱动原语。 一种 55 字节 LloRegionBuilder 方法,它采用 (LloValue* sflag, CoreLocationBase const& peer, LloValue* delta, bool) 并向对等方的屏障槽发出一个 +1 远程同步标志添加。对等 CoreLocationBase+1 delta 是整个电线内容 (§3)。
树驱动程序net_util::BarrierCoresTree @0x1c6a75c0(4186 字节)— 全局 + 副本;绑定 GLOBAL sflag,调度 TreeBarrierType
副本组启动实现net_util::(anon)::BarrierWithinReplicaGroupStartImpl @0x1c698080(852 字节)— 每组信号扇出
加入(等待)方net_util::BarrierWithinReplicaGroupDone @0x1c6984e0(581字节);延迟 BarrierWithinReplicaGroupJoin::$_1 堆关闭
同行查找net_util::(anon)::GetReplicaGroupCoreInfo @0x1c698740(4283字节)-读取副本组InfoTable,返回主谓词+对等集
参与门LloRegionBuilder::Pneg @0x1d5208e0LloRegionBuilder::Predicated @0x1d520f00(仅主站)
每点合法性ScheckGe/ScheckLt/ScheckNe0 <= core_index < cores_per_chipScheckNe msg“非主核心与主核心具有相同的位置!”
驱动LloRegionBuilder::VsyncAddRemote @0x1d522f40 (55 字节) — (sflag, peer, delta=SimmS32(1), 0)
SFLAG 编号来源呼叫者的 net_util::GetBarrierSyncFlag (base + id);通过 GetGlobalBarrierSyncFlagNumber 的 GLOBAL 插槽 — 参见 屏障到 SFLAG 的绑定
TreeBarrierType 手臂kAll(0) GLOBAL / REPLICATED(1) / PARTITIONED(2) — 相同的实现,不同的对等集
来源 TUplatforms/xla/service/jellyfish/lowering/net_util.cc

1. BarrierCoresTree @0x1c6a75c0 — GLOBAL 和 REPLICA 的单一驱动程序

net_util::BarrierCoresTree 是密集集体发射器(通过其 BarrierStart $_3 闭合)针对全局和副本组内障碍所达到的入口。 MPI 树屏障的 TC 模拟,它在发出任何信号之前执行三件事:立即绑定 GLOBAL 同步标志、验证树信息提供程序是否存在以及选择每个 TreeBarrierType 对等集。然后,其 4186 字节主体将组内扇出线程连接到 BarrierWithinReplicaGroupStartImpl

1.1 签名和GLOBAL-slot绑定

c
// xla::jellyfish::net_util::BarrierCoresTree(
//     LloRegionBuilder b,
//     std::function<StatusOr<LloValue*>(LloRegionBuilder, TreeBarrierType)> sflag_provider,
//     TreeBarrierType barrier_type,
//     ProgramSharedRegistry const* registry,
//     LloValue* sflag,                 // caller-supplied; null → bind the GLOBAL slot
//     bool is_start)                                              // 0x1c6a75c0
```text

决定性的一行:当调用者没有传递显式的 `sflag` (全局路径)时,驱动程序会计算全局槽本身并将其包装:

```c
// 0x1c6a75c0, ~+0xa5 (decompile lines 188-191)
Target *t = b.target();
int  n     = t->GetGlobalBarrierSyncFlagNumber();         // base + count + 4
LloValue *sflag = b.SflagImmPtr(n, "global barrier sync flag", /*bits=*/24);

这是副本/全局降低链中对 GetGlobalBarrierSyncFlagNumber唯一调用 - 它位于此处,而不是在 BarrierWithinReplicaGroupStartImpl 中。对于 REPLICA(2)/CUSTOM(3),调用者已经通过 net_util::GetBarrierSyncFlag 绑定了 sflag = base + id 并将其传递为非空,因此跳过该分支(反编译第 171/178 行的 if (v6) goto LABEL_8)。数字公式归屏障到 SFLAG 的绑定所有;此页面仅记录全局绑定发生的*位置。

注意 — SflagImmPtr(n, …, 24) 产生执行器信号上的即时 LloValue"global barrier sync flag"注释字符串在正文中进行字节确认;对于每个 id 武器,调用者的 SflagImmPtr 注释为 "barrier sync flag number"(全局屏障 SFLAG 窗口 §1.2)。

1.2 TreeBarrierType 调度及其注释字符串

绑定sflag后,驱动程序检查tree_info_provider != nullptr(RetCheck,net_util.cc:3855),然后调度TreeBarrierType(v13)来标记障碍并选择其InfoTable。手臂可以直接从分配给等待区域的注释字符串中观察到:

TreeBarrierType对等集等待注释(字节确认)信息表变体
kAll0所有核心"global-barrier-wait" / "start-global-barrier-wait"(如果是 is_start)kAllCoresTreeBarrierInfoTable @0xb433290
REPLICATED1该核心的副本组(副本组等待区域)kReplicatedCoresTreeBarrierInfoTable @0xb4332c0
PARTITIONED2该核心的分区组"cross-partition-barrier-wait"(在等待/完成臂上发射,!a6);使用 is_start 设置断言它是 "!start_barrier" RetCheck 错误 (net_util.cc:3908)kPartitionedCoresTreeBarrierInfoTable @0xb4332f0

kAll 臂是 GLOBAL 屏障; REPLICATED/PARTITIONEDREPLICA(2) 配置选择的副本组内臂。 InfoTable 变体是通过 GetOrCreateTreeBarrierInfoTable @0x1c6b60e0ProgramSharedRegistry 获取的,它通过其标记的注册表名称注释来选择每个臂 - "<all-cores-tree-barrier-info-table>" (len 35) for kAll, "<replicated-cores-tree-barrier-info-table>" (len 42)对于 REPLICATED"<partitioned-cores-tree-barrier-info-table>" (len 43) 对于 PARTITIONED — 并且这些表由 RegisterTreeBarrierInfoTables @0x1c6a8620 每个程序预注册一次。然后,树扇出通过 GetTreeNodeRecord + SimpleLoop(树屏障/vSync 上的协议)下降到组内叶子。

QUIRK — 未启动上的跨组武器门。对于 PARTITIONED(2)if (v13 == 2 && !a6) 发出 "cross-partition-barrier-wait" 区域(等待/完成臂); a6 (is-start) 分支反而落入 "!start_barrier" RetCheck (net_util.cc:3908) — start 跨分区屏障是结构错误,而不是非启动错误。 REPLICATED(1) 反映了这一点:!a6 发出 "cross-replica-barrier-wait"a6 命中相同的 "!start_barrier" RetCheck (net_util.cc:3904)。只有 kAll(0) GLOBAL 臂具有两种形式 - "global-barrier-wait" (!a6) 和 "start-global-barrier-wait" (a6)。重新实现者必须通过调度线程化开始/完成标志,而不仅仅是 TreeBarrierType

1.3 REPLICA(2) 如何到达此驱动程序

具有 BarrierConfig.type == 2 的 TC 密集集合通过其发射器的 BarrierStart 进入(例如 AllGatherEmitter::BarrierStart @0x13809520)。类型分派 (r15d == 2) 使用 TreeBarrierType = (target_predicate ^ 1) 调用 $_3 闭包 — 即 REPLICATED(1)PARTITIONED(2),具体取决于分区谓词。 sflag 本身是 net_util::GetBarrierSyncFlag(bc) = base + id(§1.1,非空路径)。 $_3 @0x1380a0e0 然后调用 GetRegistryTreeBarrierInfoProvider @0x1c6a7480,然后调用 BarrierCoresTree。生成 type=2, id=key_id 配置的分类位于 推断屏障配置 上。

text
BarrierConfig{type=2, id} ──GetBarrierSyncFlag──▶ sflag = base + id   (caller binds, passes in)
                          ──$_3(TreeBarrierType = predicate^1)──▶ BarrierCoresTree
                                                                    │  (sflag non-null → skip GLOBAL bind)
   GetOrCreateTreeBarrierInfoTable @0x1c6b60e0:                     ▼
     REPLICATED(1)  → kReplicatedCoresTreeBarrierInfoTable  @0xb4332c0
     PARTITIONED(2) → kPartitionedCoresTreeBarrierInfoTable @0xb4332f0
                                                                    │  (tree fan-out, §Tree-Barrier/vSync)
   BarrierWithinReplicaGroupStartImpl @0x1c698080:                  ▼
     GetReplicaGroupCoreInfo  → this core's master predicate + peers
     Pneg + Predicated        → run body on master core only
     ScheckGe/Lt/Ne           → validate each peer location
     VsyncAddRemote(sflag, peer, +1)  → signal each peer's barrier slot
   + deferred BarrierWithinReplicaGroupJoin::$_1 → the wait side
```text

---

## 2. `BarrierWithinReplicaGroupStartImpl` @`0x1c698080` — 每组信号扇出

`net_util` 匿名命名空间中的这个 852 字节函数是实际发出信号的叶子。它由 GLOBAL(在所有核心上)和 REPLICA(在副本/分区组上)逐字共享;唯一的区别是调用者传递的 `InfoTable`,它决定了解析的对等集 `GetReplicaGroupCoreInfo`。

### 2.1 签名

```c
// xla::jellyfish::net_util::(anon)::BarrierWithinReplicaGroupStartImpl(
//     LloRegionBuilder b,            // a1 — out: builds a deferred Join closure into b
//     LloValue *sflag,               // a2 — the barrier sync-flag immediate (base+id or global slot)
//     InfoTable const& replica_tbl,  // a3 — the replica/partition membership table
//     InfoTable const& core_tbl,     // a4 — the per-core location table
//     std::optional<InfoTable const>,// a8/a9 — optional second-level (partition) table
//     long, long,                    // a5/a6 — replica/partition counts (ints in regs)
//     bool,                          // a10
//     long,                          // a11
//     bool master_check)             // a12 — emit the ScheckNe master-identity guard
//                                                                 // 0x1c698080

匹配的拆开符号确认了形状:BarrierWithinReplicaGroupStartImpl(LloRegionBuilder, LloValue*, InfoTable const&, InfoTable const&, optional<InfoTable const>, long, long, bool, long, bool)

2.2算法

c
function BarrierWithinReplicaGroupStartImpl(b, sflag, replica_tbl, core_tbl, part_tbl,
                                            rcount, pcount, a10, a11, master_check):   // 0x1c698080
    // --- degenerate group: <= 1 member, nothing to signal (decompile line 45) ---
    if (part_tbl.count /* *((long*)&a9 + 1) */ <= 1):
        b.deferred = BarrierWithinReplicaGroupStartImpl::$_0;   // trivial single-member closure
        return                                                  // no GetReplicaGroupCoreInfo, no signal

    // --- read cores-per-chip bound for the per-peer ScheckLt (decompile line 49) ---
    cores_per_chip = *(int*)(*(Target+952) + 112);              // Target+0x3b8 deref, +0x70

    // --- resolve this core's group peers + master predicate ---
    // GetReplicaGroupCoreInfo reads the replica_tbl/core_tbl/part_tbl InfoTables and
    // returns: peer_set (vector<CoreLocationBase>) + a "is this core the master?" predicate.
    info = GetReplicaGroupCoreInfo(replica_tbl, core_tbl, part_tbl,
                                   rcount, pcount, a10, a11);    // 0x1c698740

    // --- MASTER-ONLY GATE: run the fan-out body only on the group's master core ---
    pred = b.Pneg(info.is_master);                              // 0x1d5208e0 — negate-into-predicate
    region = b.Predicated(pred);                                // 0x1d520f00 — open a predicated region
    b2 = LloRegionBuilder(region);                              // build inside the predicated region

    peer = info.peer_set[0];        // the (single) target this core signals (master → peer)

    // --- PER-PEER LEGALITY (only when master_check / a12 set) ---
    if (master_check):
        b2.ScheckGe(peer.core_index, SimmS32(0));               // 0 <= core_index
        b2.ScheckLt(peer.core_index, SimmS32(cores_per_chip));  // core_index < cores_per_chip
        gid_self = b2.ToGlobalCoreId();                         // 0x1d517240
        gid_peer = b2.GlobalCoreId();                           // 0x1d51b4c0
        b2.ScheckNe(gid_self, gid_peer,
                    "Non-master core has same location as master core!", 49);

    // --- ACTUATE: signal +1 to the peer's barrier sflag ---
    one = b2.SimmS32(1);
    b2.VsyncAddRemote(sflag, peer, one, /*flag=*/0);            // 0x1d522f40

    // --- defer the WAIT side as a heap closure (NOT emitted inline) ---
    join = operator new(0x48);                                 // 72-byte closure object
    join.call  = BarrierWithinReplicaGroupJoin::$_1;           // the wait callback
    join.peer  = peer; join.sflag = sflag; join.count = part_tbl.count; ...
    b.deferred = join;                                          // run by the Done side
```text

主体在结构上是“在主核心上:验证对等点,将其屏障标志加 1,然后注册延迟等待”。等待本身是复制到 72 字节 (`0x48`) 堆对象中的 `BarrierWithinReplicaGroupJoin::$_1` 闭包 — Done 端 ([§2.4](#24-the-join-wait-side)) 调用它。 `VsyncAddRemote` 增量是常数 `SimmS32(1)`:每个集合点都会使对等方的计数器恰好增加 1

> **明白了 —** 等待**不是**内联发出的。 `BarrierWithinReplicaGroupStartImpl` 仅发出*信号*(并为等待构建延迟关闭)。一起发出信号+等待的重新实现者将为任何大于树扇出宽度的组串行化屏障和死锁——将“开始”与“完成”分开的全部目的是让集体主体在它们之间运行。 Done 端运行延迟关闭;参见 [树屏障/vSync](tree-barrier-vsync.md)。

### 2.3 退化单成员快速路径(`$_0`)

当组中有 `<= 1` 成员(`part_tbl.count <= 1`,反编译第 45 行)时,该函数完全跳过 `GetReplicaGroupCoreInfo`、谓词、检查和 `VsyncAddRemote`,并将 `BarrierWithinReplicaGroupStartImpl::$_0` 安装为延迟闭包(反编译行156-157)。单核组没有人可以发出信号,因此屏障退化为无操作等待。这与生产者匹配:`IsGlobalBarrierBeneficial`([推断屏障配置](infer-barrier-config.md))将单维集合路由到 GLOBAL 而不是 REPLICA,因此 `REPLICA(2)` 配置永远不应该“本身”与 `count==1` 一起使用这条路径 - 但防护是无条件的,并且也可以保护单核目标上的 GLOBAL 全核情况。

### 2.4 Join(等待)端 {#24-the-join-wait-side}

`net_util::BarrierWithinReplicaGroupDone` @`0x1c6984e0`(581 字节)带有与 Start impl 相同的 10 参数签名,并且是消耗延迟的 `BarrierWithinReplicaGroupJoin::$_1` 闭包的条目:它重新解析对等集,对主设备进行谓词,并等待( `VWaitGe`-class op) 使每个对等方的 sflag 在释放前达到预期计数。信号/等待阈值算法和等待原语记录在 [树屏障/vSync](tree-barrier-vsync.md) 上;此页仅指出 Start 发出 `+1` 添加,而 Done 消耗它。

---

## 3. `VsyncAddRemote` @`0x1d522f40` — 驱动原语

`LloRegionBuilder::VsyncAddRemote` 是一种 55 字节方法 — 每个对等方发出的单个操作 `BarrierWithinReplicaGroupStartImpl`。其签名为`(LloValue* sflag, CoreLocationBase const& peer, LloValue* delta, bool)`; Start impl 使用 `delta = SimmS32(1)` 和尾随标志 `0` 来调用它。

```c
// xla::jellyfish::LloRegionBuilder::VsyncAddRemote(
//     LloValue *sflag,             // which sync-flag (the barrier slot, base+id or global)
//     CoreLocationBase const& peer,// the target core's logical location (0x18-byte POD)
//     LloValue *delta,             // amount to add (always SimmS32(1) for a barrier)
//     bool)                                                       // 0x1d522f40

语义上:它通过 ICI 结构向 peersflag 发出 delta 的远程同步标志添加。此处未形成远程地址 - 将 (peer CoreLocationBase, local sflag number) 对转换为 ICI 可路由 VMEM 地址的编码器是 EncodeRemoteSyncFlagAddress(按代号 TpuVersion 调度的编码器;请参阅 远程 SFLAG 编码器)。 VsyncAddRemote 是 SparseCore sc_tpu.sync_add 树运算的 TC 定序器 Vsync* 模拟;它添加的 +1 是完成方的等待计数。

注意 — peer 参数是 CoreLocationBase(逻辑芯片坐标 + 核心索引 POD),而不是全局核心 id。 Start impl 中的 ScheckGe/ScheckLt 在添加之前验证 0 <= peer.core_index < cores_per_chip,并且 ScheckNe ("Non-master core has same location as master core!") 确认已解析的对等点不是主机本身 - 三个硬性防护措施,防止错误解析的 InfoTable 条目发出错误的内核信号或自发信号。


4. 同行决议和成员资格 — GetReplicaGroupCoreInfo

net_util::(anon)::GetReplicaGroupCoreInfo @0x1c698740 是 4283 字节的帮助器,它将副本组 InfoTable 转换为该核心的主谓词和对等集。它读取的成员资格是预先计算的平面表,不是位掩码或每环常量片:net_util::CreateStaticReplicaInfoTable @0x1c69b780(2133字节)将HLO集合的replica_groups属性展平为由xla::Literal R1 int支持的xla::InfoTable数组 (LiteralUtil::CreateR1<int>),以全局设备 ID 为键,存储每个设备的组内 序号 (table[device_id] = k)。 master 的序数为 0; GetReplicaGroupCoreInfo 读取当前核心的序号以恢复其组以及是否为主。

这个平星成员资格是二项式 AllReduce 计划的结构对应物:CreateStaticBinomialReplicaInfoTable 构建一个由 (rank × 8 + step) 索引的 int32[N × 8] 表,存储每个等级的递归加倍蝴蝶伙伴设备 ID — 每个等级八列而不是一列,预先计算的蝴蝶计划而不是单个成员资格序数。这两个表在不同的宽度上是结构反转的,并为不同的执行器提供信号(该屏障的扁平星形与二项式发射器的蝶形);参见 二项式递归加倍

注意 — 在线索引的置信度较低。 已确认该会员资格是 replica_count × partition_count 键控平面 int InfoTable(CreateStaticReplicaInfoTableLiteralUtil::CreateR1<int> 链、device_id → ordinal 商店)。 GetReplicaGroupCoreInfo @0x1c698740 中将核心序号映射到扁平文字中的对等集条目的精确算术 - 以及每个条目的精确含义(对等全局核心 ID 与组索引与序号) - 尚未完全反汇编。填充的 2D(设备分配感知)尺寸排序与平板填充所携带的残差相同。


5. 为什么 REPLICA 在 SparseCore 上永远不会降低

REPLICA(2)TensorCore-only 屏障类型。两个 SparseCore 自定义内核屏障入口点重新检查:EmitScsBarrier @0x13352500 仅接受 GLOBAL(1)/CUSTOM(3),而 EmitAllToAllBarrierStart @0x133500e0 拒绝使用 "Only custom and global barriers are supported for all-to-all collectives on SparseCore" 的类型 2 (offload_a2a_util.cc:124)。 SparseCore 函数字面名称为 EmitReplicaGroupCustomBarrierStart @0x13353620,尽管其名称如此,但它是 SC A2A CUSTOM(3) 屏障(SMEM 缓冲区成员资格)的降低,不是 BarrierType::REPLICA全局屏障 SFLAG 窗口 §4.4 中详细介绍了三个不同的“全局屏障”来源和此 SC 名称陷阱;本页仅记录 TC 发射。


6. 验证说明

libtpu.so v0.0.40 中的字节精确:

  • BarrierCoresTree @0x1c6a75c0(4186字节):仅当调用者的sflag为空时绑定GLOBAL槽——GetGlobalBarrierSyncFlagNumber()SflagImmPtr(n, "global barrier sync flag", 24)(反编译第188-191行);重新检查"tree_info_provider != nullptr"(net_util.cc:3855); TreeBarrierType 调度注释 "global-barrier-wait" (!a6) / "start-global-barrier-wait" (a6) 为 kAll"cross-partition-barrier-wait" (PARTITIONED!a6) 和"cross-replica-barrier-wait"(REPLICATED(1)!a6);两个跨组臂的 a6/is-start 分支都会命中 "!start_barrier" RetCheck (net_util.cc:3908/3904); barrier_type == TreeBarrierType::kAll RetCheck 字符串 (net_util.cc:3843) 和 "b.target().HasLimitedIciRouting()" (net_util.cc:3836) 存在 — 准确。
  • BarrierWithinReplicaGroupStartImpl @0x1c698080(852字节):group_size <= 1→安装$_0并返回(第45、156-157行); cores_per_chip = *(int*)(*(Target+0x3b8) + 0x70)(第 49 行); GetReplicaGroupCoreInfo(第66/76/81行); PnegPredicated 主门(第 83-85 行); master_checkScheckGe(.,0) / ScheckLt(., cores_per_chip) / ToGlobalCoreId / GlobalCoreId / ScheckNe(.,., "Non-master core has same location as master core!", 49)(第 89-122 行); VsyncAddRemote(sflag, peer, SimmS32(1), 0)(第124-126行);将 BarrierWithinReplicaGroupJoin::$_1 推迟到 operator new(0x48)(第 131-150 行)——准确。
  • BarrierWithinReplicaGroupDone @0x1c6984e0(581 字节)、GetReplicaGroupCoreInfo @0x1c698740(4283 字节)、CreateStaticReplicaInfoTable @0x1c69b780(2133 字节):在功能索引。
  • VsyncAddRemote @0x1d522f40(55 字节):已确认的分解签名 (LloValue*, CoreLocationBase const&, LloValue*, bool)

[HIGH] BarrierWithinReplicaGroupStartImpl(a2 = sflaga3/a4 = InfoTable&a12 = master_check)的参数标识来自解调签名排序+反编译读取,而不是来自结构描述符。 Target+0x3b8/+0x70处的cores_per_chip读数被字节确认为ScheckLt上限;它的名字就是源于这种用途。 master = peer-ordinal-0 身份源自 GetReplicaGroupCoreInfo 返回 Pneg/Predicated 使用的谓词。

[低] GetReplicaGroupCoreInfo 内的确切 InfoTable 在线索引(扁平化 R1 int 文字中的核心序号→对等集条目,以及每个条目的含义)未完全反汇编 - 被证明是 replica_count × partition_count 键控平面int表;每个条目的含义和 2D DeviceAssignment 维度排序较低。参见 全局屏障 SFLAG 窗口 §5。


交叉引用

屏障算法(本节)

  • 屏障和同步标志 — 剖面图 — 子系统映射:BarrierType 枚举,生产者 → 标准化器 → 降低流量
  • 全局屏障 SFLAG 窗口和 REPLICA 路径 — 共享 net_util::GetBarrierSyncFlag 映射器、GLOBAL 窗口保留、三个不同的全局屏障数字空间和 SC 名称陷阱
  • 屏障到 SFLAG 的绑定base + id / base + count + 4 SFLAG 编号公式此页面的执行器消耗(在 BarrierCoresTree/GetBarrierSyncFlag 中计算,从不在此处计算)
  • 推断屏障配置 — 生成此页面降低的 REPLICA(2) 配置的分类 (DetermineBarrierConfigForKey / IsGlobalBarrierBeneficial)
  • 树屏障/vSync — signal-all-then-wait 树协议、GetTreeNodeRecord/SimpleLoop 以及此页面延迟的 Done-side 等待
  • TensorCore 屏障 — TC 信号/等待基板和着色选择的 CUSTOM id

同级子系统