Skip to content

Performance: JF / DF

地址适用于来自 libtpu-0.0.40-cp314 wheel 的 libtpu.so(BuildID md5 89edbbe81c5b328a958fe628a9f2207d,未 strip,包含完整 C++ 符号)。其他版本会有所不同。下面每个整数都是手工从 .rodata 读出,并对照 IDA 反编译重新解析;验证状态见 Confidence 列。

摘要

Jellyfish (TPU v2)Dragonfish (TPU v3) 两代通过单个 Performance 对象为每条 TensorCore 指令定价:platforms_deepsea::jellyfish::isa::Performance。不同于所有后续世代,后者会在堆上分配一个 latency[] 数组,以及一个由 GetResourceUsage 读取的二维 Instruction × Resource 预留网格(该模型从 Pufferfish 开始,见 Performance 系列概览),JF/DF 使用一个固定的 0xe00 字节(3584 字节)内联 POD 结构体,没有单独的延迟数组,没有 2D 网格,也完全没有 GetResourceUsage 方法。吞吐量单元和供延迟使用的单元都作为零散 int32 槽位存在同一个缓冲区中,并由按指令的 offset LUT 选择正确槽位。这是六个代号中最简单的成本几何结构,很适合 1-MXU 的 JF;它也是唯一一个整个下一代成本 delta 只有两个整数的模型。

扁平模型有两条进入同一结构体的读取路径:

  • 吞吐量JfCycleTable::GetCyclesForThroughput(Instruction) 读取 Performance[offsetLUT[Instruction]],并由 33 位有效指令掩码门控。33 个 CycleTable::Instruction ordinal 中有 16 个由该结构体定价;另外 17 个短路到默认值 1。7 个已定价的 MXU matprep/matmul/matrix-result 端口成本为 8 cycles;9 个已定价的 vector/EUP result 阶段成本为 1。配套的扁平 LUT CycleTable::GetResource(Instruction) 将每个 ordinal 映射到 7Resource 列之一,也就是 23 槽 ResourceVector 的前 7 个槽(MatpushMatmulXluVectorAlu0VectorAlu1VectorAluAnyVectorEup)。
  • DF deltaPerformanceDfPerformanceJf 加一次 vtable 替换和正好一个 quadword 存储:[+0x28] = 0xD00000042,它写入 [+0x28] = 0x42 = 66(matmul base)和 [+0x2c] = 0x0D = 13(matprep base)。这两个单元都不是 offsetLUT 目标,因此吞吐量网格在 JF/DF 间逐字节相同;整个 v2→v3 成本模型差异就是这两个供延迟使用的整数。

本页是 Performance 系列中的 JF/DF 部分:内联 POD 布局、完整逐指令延迟/吞吐量网格(全部 33 个 ordinal)、7 列 Resource 命名、填充结构体的预烘焙 .rodata 常量块,以及 2 单元 JF→DF delta。消耗这些单元的延迟轴,也就是 LatencyTableJellyfish 的 15 字段复制映射和 matmul/matprep base latencies,会折叠进同一个 Performance 结构体,并完整记录在 MXU Latency: JF / DF;本页链接它,而不是重新推导。

对于重新实现,契约是:

  • Performance 对象布局:一个 0xe00 字节内联 POD,vtable + DeviceIdentifiers 头部,一个覆盖 [+0x18 .. +0xdf8] 的 890-int32 成本缓冲区,默认填充哨兵 0x7fffffff
  • GetCyclesForThroughput 读取路径:< 0x21 边界、33 位有效掩码 0x19FFC0821、33 项 int64 offset LUT,以及 Performance[offset] 否则 1 的解析。
  • 完整逐指令网格:全部 33 个 CycleTable::Instruction ordinal →(Resource 列、offsetLUT 字节偏移、priced 标志、cycle 值),JF 和 DF。
  • 通过 AccumulateInstructionUsage → Acc 消费者命名的 7 个 Resource 列,即 ResourceVector 的前 7 个槽。
  • 2 单元 DF 覆盖([+0x28]/[+0x2c]),以及吞吐量网格除此之外逐字节相同的证明。
Performance classplatforms_deepsea::jellyfish::isa::Performance(一个内联 POD,无 2-D 网格)
Object size0xe00 (3584 B); 890-int32 成本缓冲区 [+0x18 .. +0xdf8]; 默认哨兵 0x7fffffff
FactoryPerformance::CreateTensorCore @0x1d4927e0new 0xe00; JF/DF device-id 分派
JF ctorPerformanceJf::PerformanceJf @0x1d4930c0 — 116 次 store op → 890 个 int32 槽中的 419 个(vtable @0x21cc74b8
DF ctorPerformanceDf::PerformanceDf @0x1d493060= Jf + vtable swap (@0x21cc7468) + 一个 qword store [+0x28]=0xD00000042
Throughput readerJfCycleTable::GetCyclesForThroughput(Instruction) @0x1c89dce0
Throughput formulavalid = (I < 0x21) && ((0x19FFC0821 >> I) & 1); valid ? Performance[offsetLUT[I]] : 1
offsetLUT@0xb438b70 (33 × int64, Instruction → Performance 字节偏移)
Resource readerCycleTable::GetResource(Instruction) @0x1c89ce20resLUT[I]
resLUT@0xb438aec (33 × int32, 值 0..6 = 前 7 个 ResourceVector 槽)
Priced ordinals33 个中的 16 个:{0x00,0x05,0x0b,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1f,0x20}
MXU throughput8 cycles/op(7 个已定价 matprep/matmul/matres 单元);vector/EUP result = 1
JF→DF delta正好 2 个 int32 单元:[+0x28] 88→66(matmul base),[+0x2c] 8→13(matprep base)

Performance 对象 — 扁平内联 POD

目的

Performance 回答调度器按指令需要的两个问题:一条指令占用每个功能单元端口多少周期(吞吐量,由 GetCyclesForThroughput 读取),以及其流水线有多深(延迟,由 LatencyTableJellyfish 从同一结构体读出)。JF/DF 从一个固定缓冲区回答这两个问题,而不是采用 Pufferfish 以后使用的堆延迟数组加 2D 网格。1-MXU JF 上需要定价的 TensorCore 指令很少,因此一个扁平的每 Instruction 单元 LUT 指向单个结构体已经足够。

布局

对象大小为 0xe00 字节。基类构造函数和 CreateTensorCore 的反编译固定了布局:

c
struct Performance {                 // 0xe00 bytes (3584 B); built by CreateTensorCore @0x1d4927e0
    void*  vtable;                   // +0x00
    u64    device_id_lo;             // +0x08  DeviceIdentifiers low qword
    u32    device_id_hi;             // +0x10  DeviceIdentifiers dword
    bool   is_tensorcore;            // +0x14  (=1, the bool ctor arg from CreateTensorCore)
    int32  buf[890];                 // +0x18 .. +0xdf8 ; default = 0x7fffffff (INT_MAX) sentinel
};
```text

`Performance::CreateTensorCore` `@0x1d4927e0` 是工厂函数:它对对象执行 `operator new(0xE00u)`,然后按 `DeviceIdentifiers` 分派,即 `kJellyfishIdentifiers` → `PerformanceJf`,`kDragonfishIdentifiers` → `PerformanceDf`,其他任何值则 `LogFatal("Don't know how to create performance for …")`。两个 device-id 记录只差一个字节(JF `…e01a4e00…`,DF `…e01a4f00…`)。单例缓存在文件作用域的 `TpuPerformanceTable(version)::table` 中,并在 `LatencyTableJellyfish` 构造函数内部通过 `_cxa_guard` 保护的惰性初始化构建一次。

基类构造函数 `Performance::Performance(DeviceIdentifiers&, bool)` `@0x1d492900` 设置 vtable + `DeviceIdentifiers` 头部,然后把整个成本缓冲区 `[+0x18 .. +0xdf8]` 用哨兵 **`0x7fffffff`** 进行 `memset` 式填充;该值从 `.rodata @0x84a2f60` 广播(按字节精确读为 `0x7fffffff`,十进制 2147483647)。这是 `INT_MAX`,**不是** `0xffffffff`,不同于堆族中 `0xff`-memset 的延迟数组。哨兵单元表示“未设置 / 使用默认 `1`”;实践中,未定价 ordinal 从不会读取它,因为有效掩码会先短路。

> **注意 —** 890 槽缓冲区远大于 33 个吞吐量 ordinal 或 15 个延迟表单元所需。JF ctor 只写入 890 个槽中的 419 个;其余 471 个保持哨兵值。在 419 个已填充单元中,这里只有约 31 个绑定到已知消费者(16 个 offset-LUT 目标 + 15 个 `LatencyTableJellyfish` 复制项);其余单元在重建映像中逐字节精确,但其逐单元成本模型角色尚未追踪(LOW — 见 [未决项](#未决项))。

### JF→DF Delta — 两个单元

`PerformanceDf` `@0x1d493060` 是 `PerformanceJf` 加一次 vtable 替换和正好一次 quadword 存储,逐字来自反编译:

```c
// platforms_deepsea::jellyfish::isa::PerformanceDf::PerformanceDf  @0x1d493060  (verified)
PerformanceJf::PerformanceJf(this, dev);          // build the full JF image first
*(uint64_t*)this        = off_21CC7478;           // PerformanceDf vtable ptr = sym @0x21cc7468 + 0x10
*((uint64_t*)this + 5)  = 0xD00000042uLL;         // store at this+0x28 (= int32[5..6])

this + 5(qword)是 Performance[+0x28]。qword 0xD00000042 写入 [+0x28] = 0x42 = 66[+0x2c] = 0x0D = 13

cellJFDFrole
Performance[+0x28]8866MXU matmul base latency(→ LatencyTable[+0x50]
Performance[+0x2c]813MXU matprep base latency(→ LatencyTable[+0x4c]

对两个重建的内存映像进行 diff 显示,正好只有这两个单元发生变化;419 个已填充槽中的其他每一个都逐字节相同。因为 +0x28+0x2c 都不是 offsetLUT 目标,GetCyclesForThroughput 在 JF 和 DF 上对全部 16 个已定价 ordinal 返回相同值;整个 v2→v3 成本差异就是这两个供延迟使用的整数,由下游 LatencyTableJellyfish 消费(见 MXU Latency: JF / DF)。

注意 — v2→v3 MXU 变化只体现在 matmul base latency 中。 Dragonfish 将 MXU 数量翻倍(1→2)并提高 TensorCore 时钟。吞吐量单元仍为 8 cycles/op;加速被编码为更低的 matmul base latency(88→66),同时 matprep base 略微更高(8→13)。若重新实现时缩放 DF 的吞吐量单元,会重复计算 v3 优势;下面的吞吐量网格由两代逐字共享。


吞吐量读取路径

GetCyclesForThroughput

JfCycleTable::GetCyclesForThroughput 是一个四行函数。它将 Instruction ordinal 限制在 < 0x21,用 33 位有效掩码测试它,命中时根据 33 项 int64 LUT 中取得的字节偏移索引 Performance 结构体(保存在 JfCycleTable+0x10)。未命中时返回默认值 1。逐字来自反编译:

c
// xla::jellyfish::JfCycleTable::GetCyclesForThroughput  @0x1c89dce0  (verified)
__int64 JfCycleTable::GetCyclesForThroughput(this, unsigned int instr) {
    if ( ((instr < 0x21) & (uint8_t)(0x19FFC0821uLL >> instr)) == 1 )
        return *(uint32_t*)( *(uint64_t*)(this + 0x10)        // Performance*
                             + qword_B438B70[instr] );         // offsetLUT[instr]
    return 1;                                                   // default
}
```text

有效掩码 `0x19FFC0821` 选择 16 个已定价 ordinal;另外 17 个短路到 `1`。每个*未定价* ordinal 的 `offsetLUT` 槽字面值都是 `0x0`,这是安全的,因为掩码测试总会在读取前失败。

> **易错点 —** 重新实现必须应用 `< 0x21` 边界** 33 位掩码。只依赖 `offsetLUT` 会对每个未定价 ordinal 读取 `Performance[0]`(vtable 指针),因为它们的 LUT 槽是 `0x0`。边界和掩码并不冗余:边界保护 33 项 LUT,掩码选择已定价子集。

### GetResource — Resource 列

`CycleTable::GetResource` 是一次扁平查找,每个 `Instruction` 映射到七列之一:

```c
// xla::jellyfish::CycleTable::GetResource  @0x1c89ce20  (verified)
__int64 CycleTable::GetResource(this, int instr) {
    return dword_B438AEC[instr];          // resLUT[instr], 33 x int32, values 0..6
}

七个不同值 0..6 不是私有 enum,而是 23 槽 ResourceVector 的槽索引。唯一消费者 AccumulateInstructionUsage @0x144fd720 调用 ResourceVector::Acc(GetResource(I), (double)GetCyclesForThroughput(I)),而 Acc @0x1c89adc0 会以硬边界 23 索引 [ResourceVector + Resource*8]

c
// xla::jellyfish::ResourceVector::Acc  @0x1c89adc0  (verified)
__int64 ResourceVector::Acc(this, unsigned int resource, double cycles) {
    if ( resource >= 0x17 ) __ud1();      // bound 0x17 = 23 ResourceVector slots
    this[resource] += cycles;             // vaddsd [rdi + resource*8]
    return resource;
}
```text

因此七个 JF/DF `Resource` 列就是 `ResourceVector` 的**前七个**槽。JF/DF 成本模型只填充 23 槽累加器中的 MXU/vector 头部;memory、ICI 和 SparseCore 槽 `R[7..22]` 由其他成本路径存入,而不是由这个扁平 LUT 存入。完整 23 槽 vector 和 `MaxResourceCycles` 归约见 [Resource Enum](resource-enum.md)。

| Res | `ResourceVector` slot | name | occupant JF `Instruction` band |
|---|---|---|---|
| r0 | `R[0]` `+0x00` | `Matpush` | matmul/latch ops(`Instr 0x05..0x10`; `GainLatchMode` 扩展) |
| r1 | `R[1]` `+0x08` | `Matmul` | matprep ops(`Instr 0x00..0x04`; `MatmulDataFormat` 扩展) |
| r2 | `R[2]` `+0x10` | `Xlu` | matrix-result / cross-lane(`Instr 0x17, 0x1b..0x1f`) |
| r3 | `R[3]` `+0x18` | `VectorAlu0` | vector ALU lane 0(`Instr 0x14`) |
| r4 | `R[4]` `+0x20` | `VectorAlu1` | vector ALU lane 1(`Instr 0x12, 0x13`) |
| r5 | `R[5]` `+0x28` | `VectorAluAny` | vector ALU "any" lane(`Instr 0x15, 0x16, 0x19, 0x20`) |
| r6 | `R[6]` `+0x30` | `VectorEup` | vector extended-precision(`Instr 0x11, 0x18, 0x1a`) |

> **易错点 —** 注意 r0/r1 配对:`resLUT` 将 matprep(`Instr 0x00`)→ `r1` `Matmul`,并将 matmul/latch ordinal(`Instr 0x05`)→ `r0` `Matpush`,这与直觉上的“r0 = matmul-issue,r1 = matprep”读法相反。上面的名称来自 `AccumulateInstructionUsage → Acc` 消费者路径,并与 `ResourceVectorToString` `@0x1c89bde0` 逐槽匹配;列索引*就是* `ResourceVector` 槽索引。

---

## 逐指令网格

这是覆盖全部 33 个 `CycleTable::Instruction` ordinal 的 JF/DF 吞吐量网格完整重建。`offsetLUT`(`@0xb438b70`)和 `resLUT`(`@0xb438aec`)列逐字节从 `.rodata` 读出;cycle 值是在重建的 `PerformanceJf` 内存映像中解析出的已定价单元。JF 和 DF 的每个单元都相同(没有任何已定价偏移是 `+0x28` 或 `+0x2c`,即仅有的两个 DF 覆盖项),因此一列同时适用于两者。

| `Instr` | `offsetLUT[I]` | `Res` | `ResourceVector` slot | priced | JF/DF cyc | source modifier (MXU band) |
|---|---|---|---|---|---|---|
| `0x00` | `0x910` | r1 | `Matmul` | yes | **8** | matprep · `MatmulDataFormat=0` |
| `0x01` | `0x000` | r1 | `Matmul` | no | 1 | matprep · fmt 1,2,3,10 |
| `0x02` | `0x000` | r1 | `Matmul` | no | 1 | matprep · fmt 8 |
| `0x03` | `0x000` | r1 | `Matmul` | no | 1 | matprep · fmt 9 |
| `0x04` | `0x000` | r1 | `Matmul` | no | 1 | matprep · fmt 4,5,6,7 |
| `0x05` | `0x92c` | r0 | `Matpush` | yes | **8** | matmul · `GainLatchMode` 0x0,0x2,0x4 |
| `0x06` | `0x000` | r0 | `Matpush` | no | 1 | matmul · latch 0xb,0xe,0x10 |
| `0x07` | `0x000` | r0 | `Matpush` | no | 1 | matmul · latch 0x30 |
| `0x08` | `0x000` | r0 | `Matpush` | no | 1 | matmul · latch 0x32 |
| `0x09` | `0x000` | r0 | `Matpush` | no | 1 | matmul · latch 0xc,0x12,0x14,0x16,0x18 |
| `0x0a` | `0x000` | r0 | `Matpush` | no | 1 | (unmapped) |
| `0x0b` | `0x92c` | r0 | `Matpush` | yes | **8** | matmul · `GainLatchMode` 0x1,0x3,0x5 |
| `0x0c` | `0x000` | r0 | `Matpush` | no | 1 | matmul · latch 0xa,0xf,0x11 |
| `0x0d` | `0x000` | r0 | `Matpush` | no | 1 | matmul · latch 0x31 |
| `0x0e` | `0x000` | r0 | `Matpush` | no | 1 | matmul · latch 0x33 |
| `0x0f` | `0x000` | r0 | `Matpush` | no | 1 | matmul · latch 0xd,0x13,0x15,0x17,0x19 |
| `0x10` | `0x000` | r0 | `Matpush` | no | 1 | (unmapped) |
| `0x11` | `0x000` | r6 | `VectorEup` | no | 1 | (non-MXU) |
| `0x12` | `0x33c` | r4 | `VectorAlu1` | yes | 1 | (non-MXU; EUP/vector-result) |
| `0x13` | `0x340` | r4 | `VectorAlu1` | yes | 1 | (non-MXU) |
| `0x14` | `0x344` | r3 | `VectorAlu0` | yes | 1 | (non-MXU; cross-lane) |
| `0x15` | `0x39c` | r5 | `VectorAluAny` | yes | 1 | (non-MXU; vector-ALU) |
| `0x16` | `0x398` | r5 | `VectorAluAny` | yes | 1 | (non-MXU) |
| `0x17` | `0x954` | r2 | `Xlu` | yes | **8** | (MXU matrix-result) |
| `0x18` | `0x3f8` | r6 | `VectorEup` | yes | 1 | (non-MXU) |
| `0x19` | `0x368` | r5 | `VectorAluAny` | yes | 1 | (non-MXU) |
| `0x1a` | `0x3f4` | r6 | `VectorEup` | yes | 1 | (non-MXU) |
| `0x1b` | `0x960` | r2 | `Xlu` | yes | **8** | (MXU matrix-result) |
| `0x1c` | `0x94c` | r2 | `Xlu` | yes | **8** | (MXU matrix-result) |
| `0x1d` | `0x000` | r2 | `Xlu` | no | 1 | (MXU-result, default) |
| `0x1e` | `0x000` | r2 | `Xlu` | no | 1 | (MXU-result, default) |
| `0x1f` | `0x958` | r2 | `Xlu` | yes | **8** | (MXU matrix-result) |
| `0x20` | `0x39c` | r5 | `VectorAluAny` | yes | 1 | (non-MXU) |

16 个已定价 ordinal 正是 `{0x00, 0x05, 0x0b, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1f, 0x20}`。7**8-cycle** 单元是 MXU matprep/matmul/matrix-result 吞吐量端口(`0x00`、`0x05`、`0x0b`、`0x17`、`0x1b`、`0x1c`、`0x1f`);9**1-cycle** 已定价单元是 vector-ALU / EUP result 阶段。

> **特例 — 两个 ordinal 共享一个单元。** `Instr 0x15` 和 `Instr 0x20` 都读取 `offsetLUT = 0x39c`(`VectorAluAny`,值 1)。扁平单元模型不要求每个 ordinal 都有不同偏移;reservation 列和吞吐量单元是解耦的。所有 78-cycle 单元同样只别名到少数不同偏移(`0x910`、`0x92c`、`0x94c`、`0x954`、`0x958`、`0x960`),且 `0x92c` 由 `Instr 0x05` 和 `0x0b` 共享。

`Instr 0x00..0x10` 频段(MXU ordinal)由 MXU 分类器 `CycleTableInstruction` `@0x1c89ca80` 产生,它通过 `GainLatchMode → Instruction` LUT(`@0xb4389f4`,有效掩码 `0xf000003fffc3f`)映射 matmul opcode `0x8d..0x96`,并通过 `MatmulDataFormat → Instruction` LUT(`@0xb438ac4`)映射 matprep/matpush opcode `0x9b..0xa5`;该分类器中所有其他 opcode 都 `LogFatal`。非 MXU 频段 `0x11..0x20` 由 HLO 级成本模型作为直接 ordinal 立即数发出(非 MXU `CycleTable` 路径;其产生 opcode 集尚未解码 — MEDIUM)。两个分类器 LUT 均逐字节转录在 [JfCycleTable](jf-cycletable.md) 上。

> **注意 — 吞吐量单元不是延迟。** 8-cycle MXU 吞吐量单元表示 matmul 端口每个 op 被占用多少周期;matmul *流水线深度*(JF 上 88,DF 上 66)是另一个单元(`+0x28`),会被复制进 `LatencyTableJellyfish`。连续 matmul 的吞吐成本各为 8 cycles(MXU 是流水化的,bundle 归约中使用 plain-MAX),但 matmul→consumer 依赖边会等待完整的 88/66 base latency。二者在此网格中从不别名。

---

## `.rodata` 常量块

`PerformanceJf` `@0x1d4930c0` 通过复制预烘焙的 16 字节 `.rodata` 块(`vmovaps → vmovups`)、穿插 `vbroadcastss` 填充(标量 `1 @0x84a2b08`、`2 @0x84a2854`、`8 @0x84a2d0c`)以及立即数存储(`movabs 0x100000001` / `0x800000001` / `0x800000008`;`mov DWORD 0x1` / `0x8`)覆盖已填充的缓冲区。存储计数完整性精确成立:17 次块复制(×4 = 68 dword)+ 81 次广播填充(×4 = 324+ 9 次 `movabs` qword(×2 = 18+ 9 次 dword 立即数(×1 = 9= **419** 个不同 `int32` 槽,无重叠。其余 471 个保持 `0x7fffffff`。

15 个不同的 16 字节块,全部逐字节从 `.rodata` 读出:

| `.rodata` block | bytes (4 × `int32`) | lands at | role |
|---|---|---|---|
| `@0xa2c8a30` | `{4, 105, 7, 92}` | `Performance[+0x18]` | RPU producer / matres-self conflict floors(latency-table head) |
| `@0xa2dcd30` | `{88, 8, 4, 1}` | `Performance[+0x28]` | matmul base(`+0x28`)、matprep base(`+0x2c`)、**EUP push→pop edge**(`+0x30`=4|
| `@0xa2db650` | `{1, 1, 2, 2}` | `Performance[+0x3c]`, `[+0x10c]` | vector-result floors |
| `@0xa2c8a40` | `{2, 1, 1, 1}` | `Performance[+0x4c]`, `[+0x178]` | vector-result floors |
| `@0xa2d2df0` | `{1, 1, 1, 2}` | `Performance[+0xbc]` | vector-result floors |
| `@0xa2cea00` | `{2, 2, 1, 1}` | `Performance[+0xcc]` | vector-result floors |
| `@0xa2c5b90` | `{1, 1, 1, 4}` | `Performance[+0x168]` | vector-result floors |
| `@0xa2d7660` | `{1, 1, 8, 1}` | `Performance[+0x410]` | branch-op cell(`[+0x418]`=8|
| `@0xa2d3c30` | `{8, 1, 1, 1}` | `Performance[+0x420]` | branch-op cell(`[+0x420]`=8|
| `@0xa2da220` | `{8, 8, 8, 1}` | `Performance[+0x910]` | MXU throughput band head(`Instr 0x00` at `+0x910`) |
| `@0xa2cf810` | `{8, 1, 1, 8}` | `Performance[+0x940]` | MXU throughput cell(`Instr 0x1c` at `+0x94c`) |
| `@0xa2c5ba0` | `{1, 1, 5, 5}` | `Performance[+0xa0c]` | deep conflict floors |
| `@0xa2c2f40` | `{5, 1, 1, 1}` | `Performance[+0xa1c]` | deep conflict floors |
| `@0xa2d2090` | `{1, 1, 4, 4}` | `Performance[+0xb08]` | deep conflict floors |
| `@0xa2daf10` | `{4, 2, 1, 1}` | `Performance[+0xb18]` | deep conflict floors |

xpose-result 单元 `[+0x71c]=8` / `[+0x720]=8` 来自一个 `movabs 0x800000001` qword(`[+0x718]=1`,`[+0x71c]=8`)加一个立即数(`[+0x720]=8`);MXU `0x920..0x98c` 和 `0x990..0x998` 连续区间来自 `8` 广播和 `movabs 0x800000008`。头部块 `@0xa2dcd30 = {88,8,4,1}` 是 DF 覆盖触及的唯一块;其前两个元素是 matmul/matprep base latencies,第三个是 EUP push→pop edge(=4),第四个是未使用的 `1`。

> **注意 — EUP edge 和 latency-table 单元存在同一批头部块中。** `Performance[+0x18..+0x24] = {4,105,7,92}` 和 `[+0x28..+0x34] = {88,8,4,1}` 是 `LatencyTableJellyfish` 读取的两个块(总计 15 个单元)。EUP push→pop edge `[+0x30]=4` 是 `{88,8,4,1}[2]`,会被复制到 `LatencyTable[+0x1c]`。本页只记录**单元;复制映射、边谓词和 matmul/matprep base latencies 见 [MXU Latency: JF / DF](mxu-latency-jf-df.md)。

---

## 系列位置

扁平的一 `Instruction` 一单元模型是 v2/v3 独有的。从 Pufferfish 开始,`Performance` 变成堆 `latency[]` 数组加 2-D `GetResourceUsage(Instruction, Resource)` 网格,资源列数量变宽,`PfCycleTable::GetCyclesForThroughput` `@0x1c89de60` 会包装 `GetResourceUsage` 调用,而不是扁平 offset-LUT 读取。

| Gen | Codename | TpuVer | Performance model | Resource cols | grid cells | JF→ next delta |
|---|---|---|---|---|---|---|
| **JF** | Jellyfish | 0 (v2) | flat inline POD `0xe00` + offset LUT | **7** | 16 priced (1 cell each) ||
| **DF** | Dragonfish | 1 (v3) | = JF + 2 cells | **7** | 16 priced (= JF) | 2 cells (`+0x28`/`+0x2c`) |
| PF | Pufferfish | 2 (v4) | heap `latency[336]` + grid 336×20 | 20 | 265 | architecture change |
| VF | Viperfish | 3 (v5p) | heap `latency[384]` + grid 384×28 | 28 | 378 ||
| GL | Ghostlite | 4 (v6e) | heap `latency[476]` + grid 476×31 | 31 | 358 ||
| GF | `6acc60406` | 5 (v7) | heap `latency[465]` + grid 465×31 | 31 | 285 ||

资源列演进是 **7720283131**(JF→DF→PF→VF→GL→GF)。架构在 Pufferfish 发生了变化:内联 POD 加 offset LUT 模型(无 2-D 网格,无 `GetResourceUsage`)让位于后续产品线使用的堆延迟数组加网格模型。各代网格,也就是已填充单元、延迟数组、逐列命名,都在各自页面中说明;框架和按代页面索引见 [Performance 系列概览](performance-overview.md)。

> **特例 — v3 成本模型是该系列中最小的 delta。** DragonfishTarget 几乎继承 JellyfishTarget 的全部内容,`PerformanceDf` 也反映了这一点:它继承完整的 `PerformanceJf` 映像,只覆盖 matmul/matprep base latencies。2-MXU、更高时钟的 v3 硅片被编码为*更低*的 matmul base latency,而不是更宽网格或不同吞吐量单元。没有其他世代对如此完整地共享一个缓冲区。

---

## 未决项

- 7 个 `CycleTable::Resource` 列和 33 个 `CycleTable::Instruction` ordinal 的字面 enum 字符串。这些列通过绑定确认的 `ResourceVector R[0..6]` 命名(CERTAIN),但两个成本 enum 在二进制中都没有 `ToString`;更深层的微端口语义仍然是功能性的(MEDIUM)。
- `Instr 0x11..0x20` 的产生分类器(由 LUT 定价,但由非 MXU `CycleTable` 路径发出,而不是由只处理 MXU 的 `CycleTableInstruction` 发出)。它们的 `Resource`/offset/value 都由字节固定;来源 LLO opcode 集尚未解码(MEDIUM)。
- 未被 `offsetLUT` 或 `LatencyTableJellyfish` 复制映射引用的约 388 个已填充 `Performance` 槽的成本模型角色(散布在 `[+0x5c..+0xd0c]` 中的 `{1,1,2,2}` / `{5,1,1,1}` / `{1,1,4,4}` 块)。在重建映像中逐字节精确,但其逐单元消费者未绑定(LOW)。
- JF/DF BarnaCore(variant-1)成本路径(SparseCore 之前的 embedding engine)。本页是 TensorCore `Performance`;BarnaCore 有自己的模型,不在此覆盖(out of scope)。

---

## 交叉引用

- [Performance 系列概览](performance-overview.md) — 两种 `Performance` 架构(扁平 JF/DF 与堆 PF/VF/GL/GF)、系列布局和按代页面索引
- [MXU Latency: JF / DF](mxu-latency-jf-df.md) — 消费这些单元的延迟轴:`LatencyTableJellyfish` 15 字段复制映射、EUP push→pop edge,以及 matmul/matprep base latencies(JF→DF 8866 / 813 delta)
- [JfCycleTable](jf-cycletable.md) — 完整 `offsetLUT`/`resLUT` 字节转录,以及 MXU modifier `GainLatchMode`/`MatmulDataFormat → Instruction` 分类器 LUT
- [Per-Opcode Cycle Constants](per-opcode-cycle-constants.md) — 填充后续世代网格槽的按代 cycle 值
- [Resource Enum](resource-enum.md) — 23 槽 `ResourceVector`,其前 7 个槽是 JF/DF `Resource` 列,以及 `MaxResourceCycles` 归约
- [Performance: PF](performance-pf.md), [VF](performance-vf.md), [GL (GhPerf 476×31)](performance-gl-ghperf.md), [GF (GhPerf 465×31)](performance-gf-ghperf.md) — JF/DF 之前的后续世代堆网格
- [MXU Slot](../isa/slot-mxu.md) — `Matpush`/`Matmul`/`Xlu` 列预留的物理 MXU 子单元,以及馈入 `CycleTableInstruction` 的 opcode