interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / seed / ng / TARGET-DESC.md

65 lines · 6540 bytes Raw Blame History Source

Unified TargetDesc & Universal ng Backend Architecture

Document:   seed/ng/TARGET-DESC.md
Status:     IMPLEMENTED (Step 1 foundation in seed/ng/target/, verified HOST_TESTED on Spark AArch64)
Scope:      Unified CPU + GPU + NPU + Multi-Spark realization contract for Omega NG (ΩIR)

1. Purpose

Traditional compilers split CPUs, GPUs, NPUs, and multi-node clusters into incompatible toolchains (gcc/llvm vs nvcc/ptxas vs vendor NPU SDKs vs MPI/NCCL), and distribute lowest-common-denominator binaries (x86-64-v1, armv8.0-a, rv64gc) that leave 50–80% of modern silicon idle.

Omega unifies multi-CPU Compile-on-Arrive with heterogeneous GPU/APU/Neural realization:

  1. Ship Meaning (ΩIR), Realize Locally: Canonical SHA-256-addressed ΩIR (seed/ng/IR.md) is the distribution unit. ng probes the exact local silicon and caches native realizations keyed by (SEMANTIC_ID, TARGET_ID, FEATURES_MASK, SHAPE_SIG).
  2. One Unified TargetDesc Across All Silicon: Every execution unit—Cortex-X925, Cortex-A725, x86-64 (AVX2/AVX-512), RV64GC/RVV, Cortex-M55, GB10 SM121, Ethos-U55/U85, and Multi-Spark Ring—is a row in one uniform 24-field descriptor derived from gpu/hw/manifest.tsv.
  3. Compile-Time Physical Contracts: ΩIR states what a kernel requires (SHARED bytes, register budget, subgroup width, FRAG MMA shape, @exact(E1) vs @tol error envelope). TargetDesc states what the chip offers. Any violation (e.g., req_smem = 16384 > smem_bytes = 8192) is refused before emitting a single instruction or QMD.
  4. Shared Backend Engine + Tiny Declarative ISA Tables: One shared IPRA + live-range register allocator (regalloc.om) and one cost-guided pattern selector (isel.om) serve AArch64, x86-64, RV64GC, and SM121 via small declarative ISA tables.
  5. Live Realization Cache ↔ QDI_WTBL: The on-device realization cache projects directly into CPU indirect dispatch tables and GPU QDI_WTBL, allowing proof-gated hot-swap (checked by ngcheck + ngrun + immune.om antibodies) with zero downtime.

2. Unified TargetDesc Schema (24 Fields)

IndexFieldMeaning
0isa_id1=AArch64, 2=x86-64, 3=RV64GC, 4=Thumb2, 16=SM121, 17=Ethos-U
1exec_model0=SCALAR_SIMD, 1=SIMT_WARP, 2=SYSTOLIC_CMD
2endian0=little, 1=big
3ptr_bits32 or 64
4ngprAllocatable GPRs (30 A64/RV64, 15 x86-64, 12 Thumb2, 64 SM121)
5nvecVector / FP registers (32 A64/RV64/AVX-512, 16 AVX2, 64 SM121)
6npredPredicate registers (16 SVE, 8 AVX-512, 7 SM121, 0 scalar)
7vec_bitsNative vector width in bits (128, 256, 512, 1024)
8scalable_vec1 for SVE/RVV VLA, 0 fixed-width
9two_addr1 for destructive 2-address ISAs (x86-64), 0 for 3-address RISC/SASS
10subgroup_w1 scalar, 4/8/16 SIMD lanes, 32 SM121 warp, 64 wavefront
11l1d_kbL1 data cache KiB per core/SM
12l2_kbL2 cache KiB per core/cluster
13cache_lineCache line size in bytes (64 or 128)
14smem_bytesOn-chip scratchpad / shared memory bytes (0 CPU, 101376 SM121, 16384 restricted test)
15ooo_widthIssue width (10 X925, 5 A725, 6 Zen/Xeon, 4 SM121 warp schedulers)
16mul_latInteger/FP multiply latency (cycles)
17div_latDivide latency (cycles)
18branch_costMispredict / divergence penalty (cycles)
19features_maskBitmask: FMA(1), DOTPROD(2), I8MM(4), BF16(8), AVX2(16), AVX512(32), RVV(64), SHA(128), AES(256), BMI2(512), FP8(1024), HMMA16816(2048)
20mma_maskSupported FRAG tile shapes: 1=M16N8K16_BF16, 2=M16N8K32_FP8, 4=M8N8K8_I8MM, 8=M16N16K16_AMX
21mem_domain0=HOST_LPDDR, 1=UVM_C2C_COHERENT, 2=DEVICE_LOCAL, 3=SPARK_RING_REMOTE
22coherence_costCross-domain sync cost in nanoseconds (0 local, 80 NVLink-C2C, 4500 Spark Ring)
23caller_save_maskBitmask of caller-saved GPRs for external ABI boundaries (internal calls use IPRA)

3. Units in seed/ng/target/

4. Roadmap Status (All 4 Steps Implemented & Verified)

  1. Step 1 (DONE — b2ac40d55): Unified TargetDesc, shared IPRA/RegAlloc, 4-ISA table-driven ISel & encoders, proof-gated realization cache.
  2. Step 2 (DONE — 0d590048e): SM121 runtime shape partial evaluation (M=1 / 4 / 512), Antibody #14 verification, and orthogonal AArch64/x86-64/RV64 ELF64 container emitter.
  3. Step 3 (DONE): Live Realization Cache ↔ QDI_WTBL dispatch fabric (fabric.om) + apu-gb10 heterogeneous routing + Arboris-triggered A725 background specialization.
  4. Step 4 (DONE): ΩIR v2 SLAB + ORACLE neural crystallization loop (crystallize.om), verified live on Spark (CRYST_A64_NATIVE_EXIT=36, CRYST_X64_QEMU_EXIT=36).