Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/CUDApp/issues/e3b9a4539dba2889 # CUDApp CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers # [QSCHEMA-1] Canonical quantization descriptor and target-specific native repacking Open · #156 · open 2026-10-28 11:15 UTC Imported from GitHub aien-dev/CUDApp#156, by drakestapleton drakestapleton wrote on 2026-10-28 11:15 UTC ## Goal Normalize W1–W8 integer quantization, FP8, MXFP4, NVFP4, MXFP8 and future formats through one versioned semantic quantization descriptor, while retaining multiple target-specific packed layouts and arithmetic/dequant families. The descriptor is a common contract; one compulsory physical layout or dequant-to-FP8 path would waste bandwidth and can defeat native tensor operations. Do not claim every format is currently executable on GB10. ## Existing implemented seams / ownership `CUDApp` main `b759afc3f5e46f152ffb06b39882ffa28cacaf96` and `omega-mv` main `6999fa9e6dae4847c155ef4eacaece74f491d3ca` inspected 2026-10-28. Reinspect heads, active branches and complete source/receipts before editing. - Native `.om` exact format oracles: `native/models/mxfp4.om` , `nvfp4.om`, `fp8.om`, `mxdot.om`; MXFMT . - FP8 weights/scales and GEMV/GEMM: `src/omega_gpu_fp8_api.{c,h}`, `src/omega_gpu_fp8_pack.c`, `src/omega_gpu_fp8gemm_api.c`. Semantics/type authority: Omega #663 ; checked tensor lowering CUDApp #35 . Existing specialized lossless #48 and approximate #49/#50, packed-expert #78 are separate experiments; reuse instead of replacing them. - Current hardware encoding is the native sm_121 Omega spec/encoder PR #155 . FP4 warp-level block-scaled MMA on sm_121a is a candidate requiring own encoded-byte, simulator, device and numerical evidence; do not route through datacenter `tcgen05`/TMEM on GB10. ## Delivery slices - Freeze a canonical, serializable quant descriptor: element encoding and signedness; scale/zero-point dtype, value semantics and shape; group/block sizes and axes; packed bit order/endianness; tensor shape/strides/alignment; rounding/saturation/subnormal/NaN/Inf behavior; effective precision; zero/missing/invalid cases; numerical contract ID and exact/approx classification. Quant metadata must influence identity. - Define distinct semantic format IDs and physical target-layout IDs, a capability/legality table and explicit refusal for unsupported W1–W8/FP formats or invalid combinations. Preserve source bytes/weight identity for lossless transforms. - Implement bounded native `.om` repack plans for supported formats at model load/preparation, not per token. First slice: existing FP8 E4M3 and one W4/block-scale format with independent exact decode oracle; compare packed weight + scales + alignment and scratch with incumbent. Add other W widths as bounded adapters, not guessed behavior. - Expose verified load/dequant component contracts to a single native GPU realization path (future KSTITCH issue). Dispatch may choose native low-precision MMA, on-chip fused dequant+MMA or verified BF16/FP8 fallback per target/shape, preserving physical storage benefits. No compulsory full expanded DRAM copy. - Measure total loading/repack, resident bytes, weight-read traffic, warm/cold latency, TTFT/TPOT and model-level quality before promoting a lossy representation. Reuse #16 , #17 , #53 and #57 . Reuse packed MoE decode #78 only for a qualified format/producer. ## Acceptance / negative gates - Versioned descriptor round-trips and stable hash across native adapters; independent W4/FP8/MXFP4/NVFP4 fixtures, blocks, ragged tails and scale boundaries. - Signed zero, nonfinite/subnormals, zero-point offset, block stride, bit order, scale overrun, malformed/unknown tags and stale-layout mutants cause precise correct output or rejection. - Byte-exact lossless repack; separately bounded error plus held-out logits/tokens/quality for approximations. Source and target numerical assumptions remain declared. - At least one GB10 consumer executes an accepted packed format without forced whole-weight expansion; total bytes and runtime vs incumbent reported, including NO-GO. - Encoder/runtime does not silently claim native low-bit ops where chip verification is missing. Delivery rules. New first-party production code/tests are native seeded `.om`; C sources can serve as migration/differential oracles until qualified cutover under #79 . Preserve immutable receipts, one writer per shared file, no second GPU session/driver/IR/compiler. No silent CUDA/PTX/cuBLAS dependency. Keep the live 35B, driver and hardware scheduling unchanged; chip tests require an authorized GB10 window. Label HOST_TESTED/SIMULATED/CHIP_EXERCISED/WHOLE_MODEL_QUALIFIED separately; NOT_RUN/BLOCKED cannot become PASS. Record exact source/seed/compiler/target/binary/model hashes, commands/exits, positive and mutation results, baseline/variant raw timings. ## Workstream links (2026-10-28) This format descriptor is consumed by #157 component stitching , #158 cache identity , #57 dual-pipeline selection and #159 grouped MoE . Versioned tensor/dtype semantics stay with Omega #663 . Do not activate in serving until the full #5/#106 consumer cutover and #16/#17 qualification. did:key:`z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd` wrote on 2026-11-18 17:12 UTC Recovered GitHub comment by @aien-spark on 2026-10-28T11:58:41Z. Original comment `6468386551` IMPLEMENTED / HOST_TESTED only: draft unlabelled PR #162, signed head `fe25929ce71b11703eafa72395df2dd495aa61f2`, baseline `b759afc3f5e46f152ffb06b39882ffa28cacaf96`. Compiler SHA256 `2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f` (unchanged production pin). Canonical 384-byte descriptor, semantic/physical split and executable capabilities: docs/models/QUANT.md. Native implementation om/quant/quant.om; exact API/fixture/pin sent to #157/#158/#57/#159 consumers. Integer W1-W8 declarations are representable but execution explicitly unsupported; supported four-bit block adapters are MXFP4/NVFP4, not guessed integer W4 packing. Exercised evidence tests/models/quant-host-receipt.json: native serialize/parse/hash/repack and existing mxmm caller exit0; full native binary SHA256 `d117779a017b081790c9f4e3c23a13877e55025be57964727122cb014095f181`. All65536 BF16 patterns match unchanged C pack oracle admission and accepted output bytes (50884 accepted /14652 refused). Five source mutants rejected, exits1/4/6/7/4. This includes source-owned partial-block scales, initialized padding/strides, signedzero, nonfinite refusal/preservation, zero-point declarations/refusals, malformed tags, overflow/extents and layout refusals. Main owns shared bridge/build registration and final consumer reconciliation. FNV indexes are not content integrity; loader/cache must separately verify content SHA. GPU execution, load/traffic/residency/warm-cold timings, whole-model logits/tokens/quality and TTFT/TPOT are NOT_RUN without a current approved hardware window. No serving activation, GPU/model call, service/driver change, merge or completion claim for the whole issue. did:key:`z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd` wrote on 2026-11-18 17:21 UTC Recovered GitHub comment. Original comment `6511427567` FlintOwner 2026-10-29, IMPLEMENTED / EXERCISED host only: https://github.com/aien-dev/aien-sovereign-core-mv/pull/806 , head `402025cdb5f2a4d7e8a7f88242273aa910ad1f05`, stacked on Core #805. Frozen checkpoint RecursiveSI/flint@`2a247be0c0aec895ccb0ac7ca92229ec6df37288`. `FLINT_FORWARD=1` gate PASS (92), including prior89 checks, all49 chained layers/five intermediate tensors each/final norm/all-vocabulary logits, and wrong-token + skipped-final-norm mutants. Native BF16-storage/f64-compute vs reference f32, fixed integration budget documented; no teacher forcing, no sampled generation or task quality claim. Flint checkpoint has BF16 storage and no quantization metadata/scales. No new quantization schema or repack was introduced. Existing #162 canonical descriptor is the authority for future GPU adapters; this host verifier is NOT its GPU consumer. Packed-native #156 acceptance, quality and traffic/residency measurements remain NOT_RUN. Sign in to comment