Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

protodesc_cold Catalog

All addresses on this page apply to libtpu.so from the libtpu-0.0.40-cp314 wheel (build-id 89edbbe81c5b328a958fe628a9f2207d). Other builds renumber the section and rehash the descriptor symbols.

Abstract

protodesc_cold is a 3.2 MiB read-only ELF section (0xbe8af300xc1bf0b0) that holds the serialized google.protobuf.FileDescriptorProto blob for every protobuf schema statically linked into libtpu.so. There is exactly one blob per compiled .proto file. The protobuf C++ codegen emits, for each foo.proto, a descriptor_table_protodef_<hash> byte array (the serialized schema, parked here in the cold section) plus a descriptor_table_<hash> registration struct; a _GLOBAL__sub_I_ constructor in .init_array walks these tables at process start and calls into the descriptor-pool builder so the reflection layer can later resolve message types by name. This page is the consolidated catalog of those blobs: the section facts, the per-entry record layout, and the full taxonomy of the schema set by source root and by domain.

The count is exact and byte-anchored. The symbol table carries 760 descriptor_table_protodef_* blob symbols and 760 matching descriptor_table_* registrar symbols — so there are 760 file descriptors in the pool. The section additionally contains 769 distinct .proto path strings; the nine-string excess over 760 is the set of .proto names that appear only inside some descriptor's dependency (import) list, i.e. imported files whose own descriptor is reached transitively. This is the schema surface a reimplementer would need to regenerate the entire reflection database the runtime expects: it spans the XLA/HLO compiler, the deepsea TPU ISA for five chip families, the TPU runtime topology and program format, the XPlane/xprof profiler, Megascale collectives, PJRT distributed coordination, and a long tail of Google-internal infrastructure pulled in by transitive imports.

The schema set is the reverse-engineer's index to the binary's intent. A flag that appears as a field in tpu_compilation_environment.proto is a flag the compiler implements; an entry_point oneof arm in tpu_sequencer_program.proto names a chip family the runtime can load; a TransferType enum value in megascale_info.proto names a collective the runtime can route. The catalog is therefore consulted alongside the TpuCompilationEnvironment and tpu_telemetry.proto pages, which reconstruct individual high-value schemas in full.

This is an appendix reference page: it consolidates counts and representative names rather than reconstructing message graphs. For the section's place in the ELF layout and the registration mechanism, see Custom Sections, which owns the section header.

Sectionprotodesc_cold — ELF section header [12], type PROGBITS, flags A (alloc, read-only)
VA range0xbe8af300xc1bf0b0
Size0x334180 = 3,359,104 bytes (3.20 MiB)
Alignment16 bytes
Entry count760 file descriptors (one descriptor_table_protodef_* per .proto)
Distinct .proto strings769 (760 own names + 9 import-only paths)
First blobdescriptor_table_protodef_zzRDQFgX_23 @ 0xbe8af80pjrt_tpu_topo_desc_name_mapping.proto
Registrationdescriptor_table_* structs walked by a _GLOBAL__sub_I_ ctor in .init_array at static-init
Companion sectionslinkarr_upb_AllExts (37 upb extension registrars), pb_defaults (feature default-instance)
ConfidenceCERTAIN (section + count byte-anchored to the symbol table)

NOTE — the section header size is 0x334180 = 3,359,104 bytes, which is 3.20 MiB (3359104 / 1024 / 1024). This page and Custom Sections both use the 3.20 MiB figure.


Entry / Record Layout

protodesc_cold is not a self-describing container — it carries no header, no count, and no per-entry index. It is a flat concatenation of independent byte arrays, each one a serialized FileDescriptorProto. The structure lives entirely in the symbol table and in the .init_array registrars, not in the section bytes.

How an entry is reached

.init_array
  └─ _GLOBAL__sub_I_<tu>.cc          ── one per translation unit
       └─ AddDescriptors(&descriptor_table_<hash>)   ── protobuf runtime call
            descriptor_table_<hash> {               ── in .data.rel.ro
              once_flag,                              ── std::once init guard
              size,                                   ── byte length of the blob
              const char* protodef  ───────────────┐ ── points INTO protodesc_cold
              const DescriptorTable** deps, ...      │
            }                                        │
  protodesc_cold:                                    │
    [ descriptor_table_protodef_<hash> ]  <──────────┘  serialized FileDescriptorProto

Each blob is a standard length-delimited protobuf message. Because every FileDescriptorProto begins with field 1 (name, a string), the first thing in nearly every blob is the proto's own path — the .proto filename — which is why scanning the section for .proto-suffixed strings recovers the catalog directly. Subsequent strings in the same blob are the package, the dependency import paths, message and field names, and the syntax marker ("proto2", "proto3", or absent/"editions").

Record-layout table

ElementWhereMeaning
Blob bytesprotodesc_coldSerialized FileDescriptorProto (no framing)
descriptor_table_protodef_<hash>symbol → blob start VAThe byte array; <hash> is an 8–11 char base62 tag
Blob lengthdescriptor_table_<hash>.size fieldByte count; not stored in the section
descriptor_table_<hash>.data.rel.roRegistrar struct (once-flag, size, ptr, deps)
_GLOBAL__sub_I_*.text.startup / .init_arrayCalls AddDescriptors for the TU
name (field 1)first string in blobThe .proto path — the catalog key
package (field 2)second string in blobDotted package; drives C++ namespace
dependency (field 3, repeated)strings in blobImport paths — source of the 9 extra .proto strings

NOTE — the <hash> in descriptor_table_protodef_<hash> is content-derived, not a source path. It is stable for a given .proto content + protobuf version but is not human-meaningful; to map a blob to its file you read field 1 of the blob, not the symbol name. The first blob's symbol ..._zzRDQFgX_23 resolves to learning/45eac/research/pjrt/pjrt_tpu_topo_desc_name_mapping.proto.

GOTCHA — counting .proto strings in the section overcounts by exactly the number of import-only paths (769 vs 760). The authoritative entry count is the number of descriptor_table_protodef_* symbols (760), each of which is a file; a path that appears only as another file's dependency has a string in the section but no blob of its own here. Drive the count off the symbol table, not the string scan.

Syntax dialects

The pool deliberately mixes three proto dialects — each FileDescriptorProto carries its own syntax field, so the builder tolerates the mix. Newer TPU-runtime additions (chip-parts topology, memory reservation, sequencer program, persistent compilation cache) use editions; xla, megascale, and PJRT use proto3; the deepsea ISA protos remain on proto2. The split is roughly even (≈285 proto2 / ≈278 proto3 / ≈197 editions) and is a fingerprint of how recently each subsystem's schema was last touched.


Catalog by Source Root

Every .proto path begins with a Google source-tree root. Grouping the 760 entries by that first path segment gives the coarse map of what is compiled into the binary. Counts are over the 769 distinct path strings in the section (which includes import-only paths); the dominant three roots account for ~77% of the pool.

Source rootFilesDomain
platforms/306deepsea TPU ISA (5 chip families), driver/profiler, XLA jellyfish compiler + Megascale
third_party/240TensorFlow, TF2XLA, XLA/HLO, xprof, gRPC, protobuf, ortools
learning/45eac/41PJRT + tfrt TPU runtime, topology, compilation cache
util/29operations_research (CP-SAT, MathOpt), task/time utilities
security/28LOAS L2 internal auth, IAM credentials, ALTS policies
perftools/19xprof accelerator profiler convert/service
google/19protobuf well-known types + api/expr (CEL)
monitoring/18Streamz timeseries (collection/query/aggregation)
production/11coroner crash-analysis annotations
net/10gRPC core types, DNS, congestion-control
file/5file/base options, blob types
webutil/4HTTP content-type (135-value MIME enum)
stats/4streamz stat annotations
storage/3datapol semantic annotations
tech/3colossus file blob types
wireless/, privacy/, identity/, logs/, cloud/, src/, research/, hardware/, frameworks/, borg/, n2a/≤2 eachtransitive-import tail

QUIRK — platforms/ outweighs third_party/ even though TensorFlow/XLA are the "headline" frameworks, because each of the five deepsea chip families ships a parallel ISA proto tree (TensorCore + SparseCore + BarnaCore + DMA + memory subsystems). The chip ISA schemas, not the framework schemas, are the bulk of the descriptor pool.


Catalog by Domain

The source-root view is coarse; the domain view is what a reimplementer actually navigates. The 760 entries fall into the following functional groups. Per-group counts are byte-anchored (matched against the section's path strings); representative file names are verbatim.

TPU deepsea ISA — per-chip-family schemas

The largest single domain. Five silicon codenames each carry a parallel proto tree under platforms/asic_sw/lib/deepsea/<codename>/.../isa/ plus driver/config trees under platforms/asic_sw/driver/deepsea/<codename>/. The ISA protos serialize the per-core compiled program AST (TensorCore, SparseCore SCS/TAC/TEC, BarnaCore).

Chip dirISA-tree filesRepresentative .proto
deepsea/vxc/ (viperfish)37tensorcore_vector_extended.proto, sparsecore_tec_vector_alu.proto
deepsea/pxc/ (pufferfish)37tensorcore_vector_extended_0.proto, sparsecore_scs.proto
deepsea/gxc/glc/ (ghostlite)35tensorcore_vector_extended.proto, sparsecore_dma_program.proto
deepsea/gxc/gfc/ (6acc60406)34sparsecore_tec_vector_alu.proto, tensorcore_scalar_alu.proto
deepsea/jellyfish/23tensorcore_isa.proto, barnacore_isa.proto, payload.proto
deepsea/jxc/22chip_config.proto, coredump.proto, link_stack.proto

The shared resource enum architectural_resource_ids.proto (asic_sw.deepsea.ResourceId, 232 values) names every hardware resource a sequencer can allocate (VMEM banks, sync flags, IAR slots, DMA channels, ICI ports); it is the spine of the compiler's resource-allocation pass. common_encodings.proto per chip defines the 64-value operand-source enums (VectorSource, ScalarY, CbregMetadata, SparsecoreVmask).

TPU runtime — topology, program format, compilation cache

learning/45eac/tpu/runtime/ and tensorflow/core/tpu/. These are the editions-dialect schemas that describe a physical TPU and the binary a core executes.

SchemaRole
tpu_chip_parts.protoTpuChipPartsProto — per-chip core/shared-memory/DMA topology
tpu_chip_parts_locators.protoTpuCoreOnChipProto, TpuSyncFlagRangeOnChipProto locator types
tpu_core_parts.proto, tpu_memory_parts.proto, tpu_sequencer_parts.proto, tpu_shared_memory_parts.protoper-subsystem part descriptors
tpu_core_program.protoTpuCoreProgramProtooneof core {TensorCore, BarnaCore, SparseCore}
tpu_sequencer_program.protoTpuSequencerProgramProtooneof entry_point over 16 per-chip program variants
tpu_memory_reservation.protoTpuMemoryReservationTypeProto (51 values) — program-descriptor slot map
tpu_compilation_cache*.protocache entry/group/common; persistent cache
tpu_chip_enums.proto, tpu_version.proto, tpu_platform_type.protochip/version/platform enums
tpu_executable.proto, tpu_executable_info.proto, compile_metadata.proto, topology.protoexecutable + compile metadata

NOTE — the entry_point oneof in tpu_sequencer_program.proto enumerates exactly {jellyfish, pufferfish, viperfish, ghostlite, 6acc60406} with their per-core sub-programs (SCS = SparseCore Sequencer, TAC = Tile Access Core, TEC = Tile Execute Core). This oneof is the authoritative list of chip families the runtime can load and is corroborated by the per-chip ISA trees above.

XLA / HLO compiler

133 files span third_party/tensorflow/compiler/xla/ and platforms/xla/. The headline schemas:

SchemaNotes
tpu_compilation_environment.protoTpuCompilationEnvironment — the master flag message (largest blob in the pool); see config page
xla.protoHLO config: precision, debug options, dump flags
xla_data.protoPrimitiveType (35 values), sharding, ShapeProto, op-metadata
service/hlo.protoHloInstructionProto, HloModuleProto, schedule/alias/donor
jellyfish/proto/llo_opcode.protoLloOpcodeProto enum (462 values) — internal LLO IR opcodes
jellyfish/metadata/llo_proto_opcode.protoOpcode enum (461 values) — serialized LLO metadata form
jellyfish/lowering/backend_configs.protoper-op lowering configs (barna-core, sparse-core, ICI, megacore)
backends/gpu/runtime/thunk.proto49 GPU Thunk messages — present because xla/gpu shares the xla.gpu namespace

The xla.DebugOptions message (reconstructed on its own page) lives in this domain. Note debug_options.proto is present in the section as a distinct path string.

Profiler — XPlane + per-chip trace_entries

54 files under third_party/tensorflow/core/profiler/, third_party/xprof/, and perftools/accelerators/xprof/, plus per-chip trace schemas under the deepsea driver tree.

SchemaRole
xplane.protoXSpace → XPlane → XLine → XEvent → XStat hierarchy with interned metadata
op_stats.proto, op_metrics.proto, steps_db.proto, kernel_stats.protoaggregated profile views
trace_events.proto, trace_events_raw.prototrace-viewer event streams
profiler/trace_entries.proto (×5)per-chip hardware tracepoint catalogs (gfc, glc, vfc, vlc, pxc/common)
xprof_service.protoXprofService (6 RPCs)
topology.proto, dcn_collective_info.proto, power_metrics.protohardware/topology/power telemetry

The five trace_entries.proto carry per-chip TracePointId enums (up to ~135 values for ghostlite) cataloging memory-controller, ICI/DCN, OCI-descriptor, and throttle/power events. The tpu_telemetry.proto runtime-state snapshot is reconstructed on the profiling page.

Megascale — cross-slice collectives runtime

Exactly 15 files under the platforms/xla/megascale/ tree (most under runtime/, with megascale_info.proto/runtime.proto under common/ and addresses.proto/dcn_topology.proto under the third_party/.../xla/megascale/ mirror). The complete control plane above ICI/DCN.

SchemaRole
transport.protoMegaScaleTransport (6 RPCs: Send, GetMultiSliceTopology, Barrier, ReportError, TriggerError, SendHeartBeat)
debug_service.protoMegascaleDebugService (6 RPCs incl. SetImpairments)
megascale_info.protoMegaScaleInfoProtoTransferType (ALL_TO_ALL, REDUCE_SCATTER, ALL_GATHER, ALL_REDUCE, BROADCAST, RAGGED_ALL_TO_ALL, …) + fp-compression + ragged params
megascale_status.protoMegaScaleRuntimeError with ErrorType / UnrecoverableErrorType
dcn_topology.protoDCNTopology oneof (SymmetricTree vs explicit TreeNode) for multi-slice ring/tree reductions
rapideye_logging.protoon-device always-on log buffer (post-mortem hang analysis)
actions.proto, host_command.proto, host_command_scheduler.proto, impairments.proto, addresses.proto, core_location.proto, runtime.proto, runtime_config.proto, debug_logging.protoaction queue, host protocol, fault injection, addressing

PJRT — plugin C-API + distributed coordination

16 files spanning learning/45eac/research/pjrt/ and third_party/tensorflow/compiler/xla/pjrt/.

SchemaRole
coordination_service.protoCoordinationService (14 RPCs: register/heartbeat/barrier/KV-store/watch-tasks)
compile_options.protoPJRT_CompileOptions wire format (carries the serialized TpuCompilationEnvironment)
tpu_executable.proto, tpu_pjrt_topology_description.protoTPU-specific PjRtExecutable + topology
pjrt_tpu_topo_desc_name_mapping.protothe first blob in the section (@0xbe8af80)
distributed/protocol.proto, stream_executor_executable.protodistributed protocol + SE executable
pjrt_partial_program.proto, pjrt_abi_version.proto, pjrt_value_type.proto, pjrt_device_dimensions.proto, execute_options.proto, executable_metadata.proto, topology_description.protoC-API ABI + value/option wire types

NOTE — there are two CoordinationService definitions in the pool — the public gRPC surface (xla/pjrt, 14 RPCs) and a lower-level state machine (tsl/protobuf, 19 RPCs). The overlap is intentional; both provide register/heartbeat/barrier/KV-store, but the tsl one is the implementation the xla one wraps.

TensorFlow / TF2XLA base

84 files of TF/TF2 graph and saved-model schemas (config.proto, rewriter_config.proto, saved_object_graph.proto, meta_graph.proto, journal.proto) plus the TF→XLA bridge (tf2xla.proto, xla_argument.proto, host_compute_metadata.proto, xla_activity.proto). These are present because the PJRT plugin links the TF2XLA legacy bridge and tf.data service replication.

Operations Research (ortools)

28 files under util/operations_research/. CP-SAT + MathOpt solver schemas: sat_parameters.proto (hundreds of CP-SAT tuning knobs), cp_model.proto, math_opt/{rpc,model,model_update,model_parameters,callback}.proto (SolveService, 3 RPCs), plus seven solver-adapter files (glpk, gscip, gurobi, highs, mosek, osqp, xpress). Pulled in because XLA's autosharding cost model uses MIP solving.

Infrastructure tail

GroupFilesRepresentative .proto
Security (LOAS L2, IAM, ALTS)28principal.proto, authenticator.proto, end_user_credentials.proto
Monitoring (Streamz)18service.proto, query.proto, aggregation.proto (3 services)
gRPC core9channelz/v1 + v2/service.proto, reflection/v1, latent_see.proto
Crash analysis (coroner)10field_id.proto (124-value FieldID), crash_reason.proto, asan_error_type.proto
Protobuf well-known types10any.proto, duration.proto, timestamp.proto, struct.proto, wrappers.proto, field_mask.proto, empty.proto, type.proto, source_context.proto, java_features.proto
CEL (Common Expression Language)5google/api/expr/* (syntax/checked/value/eval/explain)
MLIR / StableHLO9TF-Lite converter (model_flags, converter_flags) + PTQ + compiler_trace.proto
File / storage8file/base/options.proto, tech/file/proto/types.proto, semantic_annotations.proto (166-value SemanticType)

NOTE — the CEL schemas (google/api/expr) are present because some compilation-environment switch expressions are CEL-evaluated. The infrastructure tail (security, monitoring, crash-analysis, file/storage) is not TPU-specific; it is dragged in by transitive imports from the framework and runtime libraries and is mostly inert in the PJRT plugin path.


gRPC Service Inventory

The pool defines 27 gRPC services across 184 RPCs. The largest surfaces are the on-device debug/control planes, not the public API. Full list in the per-domain tables above; the standouts:

ServiceRPCsFile
DebuggerService33platforms/deepsea/jellyfish/xdb/debugger.proto
SliceBuilderWorkerService18platforms/accel_ssw/deepsea/slice_builder/slice_builder.proto
CoordinationService (tsl)19xla/tsl/protobuf/coordination_service.proto
CoordinationService (pjrt)14xla/pjrt/distributed/coordination/coordination_service.proto
TpuDebugService8xdb/tpu_debugger/tpu_debugger.proto
VBARControl8learning/45eac/tfrc/tpunetd/proto/vbar_control.proto
MegaScaleTransport / MegascaleDebugService6 / 6megascale/runtime/...
XprofService6perftools/accelerators/xprof/xprof_service.proto
SessionControl / NetworkConfig / NetworkBuild7 / 3 / 3superpod/routing/tpunetd/proto/tpunetd.proto

QUIRK — the biggest service surface is the post-mortem TPU debugger (DebuggerService, 33 RPCs), not any compilation or execution API. The schema pool is shaped as much by the debug/observability tooling baked into the runtime as by the compiler itself.


Architectural Enum Highlights

Several enums in the pool are large enough to be the spine of a subsystem, read from the descriptor blobs:

ValuesEnumFile
462xla.jellyfish.LloOpcodeProtojellyfish/proto/llo_opcode.proto
461xla.jellyfish.Opcodejellyfish/metadata/llo_proto_opcode.proto
232asic_sw.deepsea.ResourceIddeepsea/common/architectural_resource_ids.proto
166SemanticTypestorage/datapol/.../semantic_annotations.proto
~135TraceEntries.TracePointId (per chip)each trace_entries.proto
135ContentTypewebutil/http/content-type.proto
124FieldIDcrash_analysis/reporting/ipc/field_id.proto
67DataTypetensorflow/core/framework/types.proto
53xla.gpu.ThunkKindProtobackends/gpu/runtime/thunk_kind.proto
51TpuMemoryReservationTypePrototpu/runtime/topology/tpu_memory_reservation.proto
35xla.PrimitiveTypexla_data.proto

The two LLO opcode enums (462 / 461 values) enumerate the full deepsea ISA at the LLO abstraction level — the same opcode universe documented in the LLO opcode table. ResourceId (232) is the resource-allocation spine; TpuMemoryReservationTypeProto (51) is the program-descriptor slot dictionary that PJRT reads.


Verification

  • Section facts confirmed against the ELF section header [12] and the IDA segment record: protodesc_cold start 0xbe8af30, end 0xc1bf0b0, size = 3,359,104 (0x334180), flags A.
  • Entry count 760 confirmed three ways: 760 distinct descriptor_table_protodef_* blob symbols, 760 matching descriptor_table_* registrar symbols, and 769 distinct .proto path strings in the section (760 own + 9 import-only).
  • First entry confirmed: descriptor_table_protodef_zzRDQFgX_23 @ 0xbe8af80learning/45eac/research/pjrt/pjrt_tpu_topo_desc_name_mapping.proto.
  • Per-root / per-domain counts derived by scanning the section's path strings; chip-family ISA dirs, the 15 Megascale files, 16 PJRT files, and the 5 trace_entries.proto were each enumerated against the binary.
  • Registration mechanism anchored to the _ZL37descriptor_table_protodef_* mangled symbols and the companion linkarr_upb_AllExts / pb_defaults sections, both documented in Custom Sections.

Cross-References