Naming Pitfalls and Authoritative Labels
Addresses apply to libtpu.so from the libtpu-0.0.40-cp314 wheel (build-id
89edbbe81c5b328a958fe628a9f2207d, 781,691,048 B). Other versions differ.
Abstract
The TPU codename model has several easily-confused labels, and a handful of plausible-but-wrong names that the binary contradicts. This page is the standing pitfall list: each tempting-but-wrong label is named, the byte evidence that overrules it is cited, and the authoritative value is given. If a downstream page says "Ghostlite = v5p", "Trillium = 6acc60406", "2 HAL families", or treats "Ghostfish" as a confirmed codename, it is wrong by the evidence here.
The pitfalls fall into three buckets: count traps (the TpuVersion and HAL-family counts are easy to undercount), off-by-one naming traps (Cloud names slide one generation too high, mislabeling Ghostlite as v5p and 6acc60406 as v6e/Trillium), and invented codenames (the "Ghostfish" gloss that has zero occurrences in the binary). Every authoritative value below is byte-anchored.
The reimplementation payoff is direct: a clone that adopts any wrong label here routes silicon to the wrong factory, codec, or external name. Trusting "Ghostlite = v5p" hands Ghostlite's TpuVersion 4 the display string and Cloud type that belong to Viperfish (TpuVersion 3); trusting "2 HAL families" forks the VXC class a generation early; trusting "Ghostfish" or "TpuCodec6acc60406" invents a symbol the binary never declares. Each row below names the binary fact that keeps the integer dispatch, the factory key, and the emitted name consistent across generations.
Authoritative TpuVersion count | 6 (enum 0..5), bounded in TpuVersionToString @ 0x20b3a480 (a1 >= 6 → fatal) |
| Authoritative HAL family count | 3 — JXC, PXC, VXC factory classes |
| Codename source-of-truth | TpuVersionToString rel.ro table @ 0x22011bf0 (6 relocations) |
| Marketing names in binary | none (Trillium/Ironwood/Ghostfish = 0 occurrences) |
Count Facts
Trap — "5 TpuVersions" undercounts; there are 6. The binary defines six generations.
TpuVersionToString(0x20b3a480) bounds-checksa1 >= 6before indexing a six-entry pointer table, and the.data.rel.rotable at0x22011bf0has exactly sixR_X86_64_RELATIVErelocations namingjellyfish(0x863f064),dragonfish(0x863f392),pufferfish(0x863f1c4),viperfish(0x863f172),ghostlite(0x86864e0),6acc60406(0x863f0cf). The most-often-missed value isviperfish(v3): it is easily folded into a neighbor.TpuVersionFromProto(0x20b3a8c0) likewise has cases1..6mapping to internal0..5.
Trap — "2 HAL families" undercounts; there are 3. There are three distinct factory classes, confirmed by three separate typeinfo records:
tpu::(anon)::TpuHalJxcHardwareFactory,tpu::(anon)::TpuHalPxcHardwareFactory, andtpu::TpuHalVxcHardwareFactory. The six generations route across them as JXC (Jellyfish, Dragonfish), PXC (Pufferfish), and VXC (Viperfish, Ghostlite, 6acc60406). The two newest generations share the VXC factory: theglcinit module's CHECK string at0x94a4a6freadsmake_unique<TpuHalVxcHardwareFactory>(kGhostlite), and thegfcinit module's at0x94a3ef5readsmake_unique<TpuHalVxcHardwareFactory>(k6acc60406). Soglc/gfcare VXC-family sub-cores, not a fourth factory. See HAL Families.
Naming Facts
The glc and gfc encoder addresses and namespaces are unambiguous; the trap is sliding the Cloud/marketing names one generation too high onto them.
Trap — "Ghostlite = v5p" is one generation too high; Ghostlite = v6e / "TPU v6 lite". The
glcencoder at0x1f250160isgxc::glc::isa::TensorCoreVectorAlu0Encoder::Encode. The namespaceGhostlite/glcis correct;v5pis not —v5pis the Cloud standard name for Viperfish (v3), whose string"TPU v5p"lives at0x85c9e34, one generation below. The correct binding isglc=TpuVersion 4=ghostlite="TPU v6 lite"(case 4 ofTpuVersionToExternalName@0x20b3a500) = Cloudv6e= Trillium (external). See Marketing / Cloud Naming.
Trap — "6acc60406 = Trillium / v6e" is one generation too low; 6acc60406 = TPU7x. The
gfcencoder at0x1f8b53c0carries the namespacegfcand tag6acc60406— both correct — butTrillium/v6ebelongs to Ghostlite, one generation below. The correct binding isgfc=TpuVersion 5=6acc60406="TPU7x"(case 5 ofTpuVersionToExternalName) = Cloudtpu7x. The bit-level VALU encoding for these two encoders is unaffected; only the version/marketing labels move.
Trap — "Ghostfish" is not a binary codename. The gloss "Ghostfish" is a tempting analogy to
ghostlite→glc, but a case-insensitive scan of the full image returns zero matches forghostfish/Ghostfish, and there is noTpuCodec6acc60406C++ class symbol (only a source-path stringtpu_codec_6acc60406.cc; the v5 codec built bysub_1E838380is anonymous). The only canonical internal name for this generation is the obfuscated tag6acc60406.
Codec / Class-Topology Facts
Note: The v5 codec is anonymous, not a class named
tpu::TpuCodec6acc60406.TpuCodec::Create(0x1e835fa0) case 5 callssub_1E838380, which constructs an object whose vtable has no demangled symbol — the class is anonymous. By contrast case 4 calls the namedtpu::CreateTpuCodecGhostlite, andTpuCodecGhostliteis a real class withDecodeBundle/EncodeBundlemethods. The v5 codec is functional but un-reified; there is noTpuCodec6acc60406class.
The codec dispatch, verbatim from the decompile:
TpuCodec* TpuCodec::Create(TpuVersion v): // 0x1e835fa0
case 0: return CreateTpuCodecJellyfish()
case 1: return CreateTpuCodecDragonfish()
case 2: return CreateTpuCodecPufferfish()
case 3: return CreateTpuCodecViperfish()
case 4: return CreateTpuCodecGhostlite() // NAMED class
case 5: return sub_1E838380() // anonymous v5 codec
Note:
xla::jellyfish::GhostliteBundleRestrictionsis a named class (typeinfo + vtable +AddMxuRequirements/AddXluRequirementsmethods present), whereas the v5 generation registers6acc60406BundleRestrictionsby string only with no canonical C++ class. The naming asymmetry between the two newest generations — Ghostlite named, 6acc60406 obfuscated — is a deliberate pattern.
Device-Type and v5 Chip-DID Facts
Note: The Ghostlite→device-type
13(0xd) and 6acc60406→device-type12(0xc) binding is a direct store, not an inference.DeviceTypeFromDeviceIdentifiers(0xf6993a0) writes the constants directly:*(_DWORD*)(result+8) = 13on theIsGlcbranch and= 12on theIsGfcbranch. The full device-type map (Jellyfish 3, Dragonfish 5, Pufferfish 7, Puffylite 8, Viperfish 10, Viperlite 11, 6acc60406 12, Ghostlite 13) is a single-function fact. See PCI Device IDs.
Note: The 6acc60406 PCI device ID is a real
.rodatarecord, just an anonymous one. It sits at.rodata0xbdf3cc4–0xbdf3ce8as three anonymous 12-byte records (PF hdr0x0075, VF hdr0x0076, Mgt PF hdr0x0077; all chip DID0x00f2, rev-mask0xff), terminated by thes_44716tag. The chip DID0x00f2is independently confirmed in theIsGfcimmediates (0xF21AE000751AE0,0xF21AE000761AE0).
The Dual-Enum chip_parts Trap
Note: The embedded
6acc60406_chip_parts.binarypbblobs (0xbdf29a0,0xbdf2ba0) begin08 06 12 97 01— protobuf field 1 (varint) = 6. That6is the TpuVersionProto value (TPU_VERSION_6acc60406), a 1-based enum, not the internalTpuVersion.TpuVersionFromProto(0x20b3a8c0) maps it byinternal = proto − 1, so proto6→ internalTpuVersion 5. "chip_parts version 6" and "internal TpuVersion 5" name the same 6acc60406 / TPU7x silicon on two parallel enums; there is no conflict. The codec platform-tag guards confirm it independently (the v4/Ghostlite codec checks proto tag 5, the v5 codec checks proto tag 6). See Dual Enum.
Naming Pitfall Quick Table
| Tempting-but-wrong label | Why it tempts | Authoritative value | Evidence |
|---|---|---|---|
| "5 TpuVersions" | viperfish folds into a neighbor | 6 (0..5) | TpuVersionToString bound >= 6; 6 relocs @ 0x22011bf0 |
| "2 HAL families" | VXC absorbs three codenames | 3 (JXC / PXC / VXC) | three factory typeinfos |
| "Ghostlite = v5p" | off-by-one Cloud name | v6e / "TPU v6 lite" | TpuVersionToExternalName case 4 |
| "6acc60406 = Trillium / v6e" | off-by-one marketing name | "TPU7x" / tpu7x | TpuVersionToExternalName case 5 |
| "v5 codec = TpuCodec6acc60406" | analogy to named codecs | anonymous codec (sub_1E838380) | no class symbol; only tpu_codec_6acc60406.cc path |
| "Ghostfish" (gfc codename) | analogy to ghostlite→glc | 6acc60406 (obfuscated tag) | ghostfish = 0 occurrences |
| "chip_parts internal version 6" | proto/internal conflation | proto 6 = internal 5 | 08 06 blob byte; TpuVersionFromProto −1 |
| "v5 PCI DID has no record" | anonymous (no symbol) | chip DID 0x00f2 (anon records) | bytes 0xbdf3cc4+; IsGfc immediates |
Cross-References
- Codename Matrix — the authoritative
TpuVersion↔ codename table these corrections defend - Marketing / Cloud Naming — the
v5p-vs-v6ecross-walk and the external-only marketing names - PCI Device IDs — the byte-pinned device-type and v5 chip-DID facts (PIN-01 / PIN-02)
- HAL Families — the three-factory routing (CNT-02)