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/0245b7d760e22e76 # 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 # Research roadmap: qualify and optimize CUDApp native model execution Open · #26 · open 2026-10-22 17:08 UTC Imported from GitHub aien-dev/CUDApp#26, by drakestapleton drakestapleton wrote on 2026-10-22 17:08 UTC ## Goal Turn the CUDApp research review into measured improvements to native model execution. Reuse existing code, qualification work and ownership. This roadmap adds research work; it does not replace the existing integration priorities. Review baseline: `232332422bfdc31c8918085b50f13c1e18ab702e` (2026-10-22). Literature: Undermind ranked research and papers . ## Existing work to finish and reuse Canonical motor integration #5 remains the priority. Reuse concurrency/recovery #6/#11/#12, general math #9, disassembler #10, repeatability #13, allocation guard #8 and overhead measurement #14. Preserve Omega PRs aien-dev/omega-mv#614 through #618 and carry their changes into the canonical backend without losing work during extraction. Recheck their live state before editing; do not recreate implementations that already exist. Independent driver qualification #7 remains its own coordinated workstream. Native-runtime optimization experiments do not require a driver replacement and must not switch the live driver. ## Delivery sequence - Inspect current branches, instructions, source pins and active ownership. Establish the canonical integrated candidate under #5; complete the existing qualification sequence with the current owners. - Establish reproducible tests, numerical contracts and baseline measurement: #15, #16, #17. - Make targeted experiments: #18 MoE fusion, #20 shared-prefix attention, #22 SASS scheduling. Use #19 dependency analysis and #21 ragged planning where the measured bottleneck justifies them. - Evaluate #23 prefill traversal and #24/#25 memory ownership/import work under their explicit prerequisites. - Requalify successful integrations on the final source pins; update consumer pins and report end-to-end results. A reproducible negative experiment is useful evidence; never force an unsupported optimization into the default path. ## Work and dependencies Issue Deliverable Prerequisites for integration/performance claims #15 Reproducible host tests and pinned Omega slice harness Reuse existing gates; host work may start immediately #16 Numerical contracts and end-to-end correctness #5, existing #9/#13 references #17 Native model/launch/traffic benchmark report #5, #16; reuse #14 accounting #18 FP8 gate/up + SwiGLU fusion experiment #16, #17 #19 Buffer dependencies and narrower synchronization #6, #16, #17 #20 Shared-prefix attention and stable state merge #16, #17; existing paging/GQA #21 Ragged attention plan/run and bounded workspace #16, #17; existing reservations #22 Bounded SASS schedule search and byte validation #10, #16, #17 #23 Alternating prefill KV traversal experiment #16, #17 #24 Coordinated memory reservations and ownership #6, #8; reuse #14 #25 File-backed native weight mapping experiment #6, #24, #16, #17 ## Checklist - #15 — Make host tests and Omega slice qualification reproducible from a fresh checkout - #16 — Define numerical contracts for native kernels and whole-token decode - #17 — Add a native benchmark report for token latency, launch costs and memory traffic - #18 — Experiment: fuse FP8 gate/up and SwiGLU in the routed MoE decode path - #19 — Add explicit buffer dependencies and validate narrower command-list synchronization - #20 — Add shared-prefix attention execution with stable prefix/suffix state merging - #21 — Separate ragged-attention planning from execution with bounded reusable workspaces - #22 — Build bounded SASS schedule search with independent encoded-code validation - #23 — Experiment: alternate KV traversal in GB10 prefill attention to improve cache reuse - #24 — Extend memory admission with coordinated reservations and explicit buffer ownership - #25 — Experiment: qualify file-backed shared weights through native GPU mappings ## Completion Each child has its own acceptance and evidence gate. Track implementation, host/simulator qualification, GB10 qualification and consumer integration separately. Store source/binary/model/config identities and raw paired measurements; no performance promises copied from other GPUs. Preserve the baseline path until the candidate is qualified. No production restart, module unload, default-driver change or unsafe memory exhaustion through this roadmap. Close the roadmap only when every child has an explicit evidenced outcome and the accepted changes pass the final integrated consumer workload, including golden/numerical checks, concurrent requests, a second turn and a real tool-call parse. Mark unavailable hardware work BLOCKED/NOT_RUN with its exact remaining gate instead of presenting it as complete. ## CUDA-LEARN integration addendum ### CUDA-LEARN extension, 2026-10-23 The finite research workstream #52 adds eight detailed tasks for LLM-assisted native kernel development: - #53: fixed independent kernel tasks and evaluator. - #54: explicit transformation proposals over qualified native microkernels. - #55: bounded native schedule-perturbation testing. - #56: reduced witnesses with explicit tested/proved boundaries. - #57: shape-aware candidate selection with complete-model acceptance. - #58: retained optimization evidence and measured transfer. - #59: CUDA++ task/feedback adapter for the existing native .om trainer. - #60: optional rollout/update consistency and log-probability reuse experiment. These extend the existing roadmap. #5 remains canonical integration priority; #6/#9/#10/#7 and their qualification/support work retain their owners. #15/#16/#17/#24 already have active implementation/evidence branches recorded in #52; reconcile those before duplicating work. Recovery inventory is not product qualification. The delivery direction is final first-party seeded .om throughout the delivered implementation, tests, build and automation, following aien-dev/omega-mv#599. Existing C/.osc and other legacy work supplies migration inputs and independent historical evidence. Qualify replacements, cut consumers over, delete replaced active code/dependencies, and retain immutable receipts. Preserve the baseline algorithm in .om where useful. Native task validation and full-cost baseline come before optimization; verified candidate selection comes before learned reuse; parameter training waits for the existing native trainer prerequisites. The reduced-proof, curriculum and training-consistency experiments are bounded research, not mandatory release dependencies. Keep the architecture's existing finite RSI allocation and independent judge. Close only on explicit child outcomes and actual final-artifact consumer qualification; publishing these issues completes planning, not their engineering gates. ## 2026-10-28: Unified quantization, component realization, caching, dual pipelines and MoE index — coordinated handoff Grounding: CUDApp main `b759afc3f5e46f152ffb06b39882ffa28cacaf96`; Omega main `6999fa9e6dae4847c155ef4eacaece74f491d3ca`. Reinspect latest commits/branches before a patch. PR #143 merged the seeded .om encoder/cubin; PR #155 merged a 63-form single-source instruction spec/encoder/decoder with host tests; PR #137 merged 9-group 5-CTA wave rule with 15.74% kernel-only gain, no measured TPS; PR #154 found a shape-dependent Tilelab win and regression. Existing FP8 GEMV/GEMM caches already operate; do not reimplement from scratch. Owners / new work (links are task boundaries, not permission to fork implementations): - #156 QSCHEMA-1 : versioned quant semantic descriptor plus target-specific repacks, independent numeric and byte contracts. Omega #663 owns tensor/dtype semantics; existing #48/#49/#50/#78 own their specialized representations. - #157 KSTITCH-1 : compose typed within-kernel load/dequant/MMA/epilogue components in existing IR before register allocation and scheduling. #35 remains realization owner, #54 transformation owner and #22 SASS scheduling/byte-validation owner. - #158 KCACHE-1 : unifies existing content/shape-keyed encoded-kernel caches, prewarm, sealed recordings and safe GPU session lifetimes. - #57 : existing candidate selector owns dual small-M/large-M pipeline dispatch. Native GB10 capability gate is mandatory; SM121 warp MMA is distinct from SM100 `tcgen05`/TMEM. No unsupported TMA path or fixed heuristic presented as measured. - #159 MOE-INDEX-1 : indexed GPU-resident grouped MoE execution, building on existing Q36 batch `GROUP` and prefill `pf_group`/segment maps; #18 owns separate gate/up+SwiGLU fusion. Execution order / no duplicate PRs: (A) reconcile canonical GPU owners and consumer pin #5 /#106 and freeze live 35B cached-scratch baseline Omega #604 ; (B) in parallel across disjoint native `.om` components implement #156 schema, #157 IR contracts, #158 cache keys and #159 planning-only baseline; (C) validate composed candidates and MoE variants with independent controls under #16/#19/#22/#53; (D) #57 selects only admitted candidates with measured full workload cost under #17; (E) coordinate canonical Omega consumption and release without silently changing the live server. Gate: every task must record exact source/compiler/device/model/binary hashes, input/negative oracles, resource budgets, timings and measured-versus-projected claims; cold/warm setup, TTFT/TPOT, p50/p95, memory/traffic, batch B=1 through supported multi-head/prefill, and rejection/NO-GO results. NO unreviewed C/.osc product fallback; GB10 tests only in authorized windows; no driver swap or live deployment from these experimental issues. Do not close a parent from host-only evidence. Full end-to-end application requires canonical CUDApp-to-Omega pin/receipts. did:key:`z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd` wrote on 2026-11-18 17:12 UTC Recovered GitHub comment by @aien-spark on 2026-10-28T11:58:43Z. Original comment `6468387240` 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:13 UTC Recovered GitHub comment by @aien-spark on 2026-10-28T13:36:03Z. Original comment `6470453958` #158 cache lane source update: draftPR161 signed79d17381f9489922828f4555007ee1af150b4568 adds pure .om retained-admitted-template consistency checker over Composer exact serialized SHA identities. Production compiler2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f; native38 cases exit0, eight caught mutants, final Omega MCP sandbox normal0; evidence om/cache/templates-evidence.json. Existing full admission remains authority. Main/NativeIntegrate retain shared bridge and actual runtime-facing lifecycle acceptance; unit fixture is not a replacement. Hardware upload timing/device/full-model acceptance NOT_RUN. No merge/deploy/GPU actions; #158 remains OPEN. did:key:`z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd` wrote on 2026-11-18 17:13 UTC Recovered GitHub comment by @aien-spark on 2026-10-28T14:00:20Z. Original comment `6471013774` Native retained-template correction: signed source `3cc6140267a77dcd00f7bab33963725682f61847` (draft PR161), templates.om SHA08b8f9aad44cf64bc74653ceb314c78109bbaf59cd3d0ff2132fbc29d32f27c3. Actual bridge preparation exposed that original 79d173 program-mode fixture did not establish production bare-function compatibility: pinned `e5b32567` fnstore rejects top-level text globals (EOF error9). Removed all four globals using existing filed packed-word constants, no allocation or ABI/schema change. Exact quant+realize+digest+templates production function image now compiles locally and via mounted pinned2c824805 Omega MCP,40832bytes SHA11b5bee6e72867e5a14cd221b5d9afb5053b3cfad9540bc4edd0b83c430e4724. Text-global negative control rejects9. Same-source native38 assertions, byte-identical independent exporter fixture, eight caught guard mutants and sandbox normal0 exercised. New immutable om/cache/templates-function-evidence.json; earlier receipts unchanged. NativeIntegrate owns real bridge regeneration/FP8-GEMM retained-snapshot caller smoke; not replaced by these module tests. Hardware upload timing/device/full-model acceptance NOT_RUN, no GPU/service/merge/deploy. Keep #158 open and PR draft/unlabelled. Exact integration requirements: /home/drakestapleton/handoffs/kernel-cache-native-templates-handoff-`20261028`.md. did:key:`z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd` wrote on 2026-11-18 17:17 UTC Recovered GitHub comment. Original comment `6507997428` Correction (Integration35B): the plan hash in my previous comment is wrong. `ACCEPTANCE-PLAN.md` is now sha256 `acfc4e76d3a7a37cfa6cf1726d00806cfcb92927ad3ad77cd1ca67b5cfc3e52c`, not `6124618b…`. The writer's corrected version landed after I computed the earlier hash. It fixes mistyped shas, script hashes, the quiet threshold and the budget formulas. `SHA256SUMS` is regenerated: 52 files, sha256 `17a3b896…b4a9`, and `sha256sum -c` passes. I spot-checked three of the plan's Wolfram quotes and they reproduce: `Ceiling[Log[5/100]/Log[1-1/100]] -> 299`, `Ceiling[Log[5/100]/Log[1-1/1000]] -> 2995`, `60*100/5 -> 1200`. Nothing else in the previous comment changes. did:key:`z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd` wrote on 2026-11-18 17:25 UTC Recovered GitHub comment. Original comment `6507979550` Integration35B: controlled acceptance plan for the #176 -> omega-mv#926 -> Core#799 chain All five PRs were `dirty` against moving mains. Restacked with merges, not rebases; generated files were regenerated with the pinned tools. Branches are pushed. PR updates go through the desk (READY lines in pr-desk). Layer PR old head new head (branch) pin CUDApp #176 `685f6c38` `e3b04f35` (integration35b/complete-gpu-`20261029`) contains main `cc0908bd` omega-mv base #924 `3303dd79` `6a9fa53c` (integration35b/native-consumer-recovery-`20261029`) contains main `bf54b19f` omega-mv #926 `9ab1e7bb` `8fc75bdf` (integration35b/complete-gpu-consumer-`20261029`) cudapp.lock = `e3b04f35` Core base #798 `d9217f09` `3fe1988b` (integration35b/canonical-cudapp-consumer-`20261029`) contains main `b65e00b0` Core #799 `034d0477` `130abd72` (integration35b/complete-gpu-core-`20261029`) omega.lock = `8fc75bdf` - Receipts `codex-integration-20261028/SHA256SUMS`: 10/10 OK. - EXERCISED (host): CUDApp make test 56 targets PASS; sm121 MMIO PASS; units --check PASS with a negative control that fails. Omega suites have the same counts as before, plus tensor/receipt/hermetic negatives. Core: unrecorded-archive refusal (exit 1) and abi-qualify PASS (scope host); serve tests 75/19/16 ok; build_identity PASS after a fixture fix. That fix was needed because the merge with main brought in an `omega.lock` watcher the fixture lacked (exit 101 before the fix). Release exe `f86099f4` at `6a075e14`; CLI exits 2. - NOT_RUN: hosted CI on the new heads (it runs once the PRs point at them); Omega tests/gates/run.sh; all GPU arms. - Plan: `/home/drakestapleton/handoffs/integration35b-20261029/ACCEPTANCE-PLAN.md` (sha256 `6124618b`…) and `HEADS.md`, covered by SHA256SUMS (52 files). The old physical receipt (exe `38746b73`) does not cover the new exe. - Gate: Drake authorization plus an exclusive GPU window on BOARD. Arms in the plan: P (controlled performance vs incumbent bin-`19173f9e`, one-sided Welch at alpha 0.05 computed in Wolfram, 5% margin), R (sustained reliability and device-fault recovery), Q (independent native-artifact qualification on a second clean tree). Every arm includes restore to the incumbent 18091 launcher and a window budget. All three arms are NOT_RUN until the gate above. Sign in to comment