interplane.Get Omega
Read in your language

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

[CUDA-MISSION] Hive execution plan: unchanged CUDA binaries on AMD and Intel

Open · #183 · open 2026-10-29 12:11 UTC

Imported from GitHub aien-dev/CUDApp#183, by drakestapleton

drakestapleton wrote on 2026-10-29 12:11 UTC

Objective and scope

Deliver a finite, independently reproducible CUDA binary-compatibility profile: an unchanged CUDA application's host executable and device payload run correctly through an open Omega compatibility implementation on physical AMD, then Intel hardware. Preserve existing application interfaces. Expand coverage by observed workload requirements.

Status: PROPOSED execution workstream, hardware gates NOT_RUN in this planning session. NOT A MASTER PLAN. This is the user-requested CUDA manufacturer mission dated 2026-10-29. It does not reorder the whole-system authority in PLAN_AUTHORITY.md or interrupt existing qualified serving work. Issues own scope/dependencies/acceptance; implementation owners open draft PRs containing actual changes. This tracker remains the short-prompt entry point.

Evidence baseline and corrections

Inspected current code, build recipes, tests, open PRs and issue comments:

  • CUDApp cc0908bdc0a0377f2166e9328dcf1d985457e27f: Makefile builds static libomega_gpu.a/libcudapp.a; swap/cudapp expects a separately built libcuda.so.1. Its tests write a fake library. No working CUDA Driver ABI/PTX compatibility path was located in the inspected sources; #74 remains open.
  • backend/spirv/emit.om emits fixed vadd/fsum16 kernels; it needs a general lowering connection to carry admitted PTX semantics. mk/multitarget.mk and tools/multitarget/spirv-host.c deliberately use PoCL/lavapipe CPU execution. Physical qualification requires a separate runner.
  • Bridge ed420fcbffa1ad83db78111deb836dd880ed891e: tools/native already builds hosted shared libraries and selects ARM64 or x86 Linux. Reuse this foundation. src/native.om and docs/NATIVE-ABI.md expose Omega calling conventions, including typed wrappers that abort on nonzero status. CUDA requires exact CUresult and output-pointer conventions, so those wrappers cannot simply be renamed.
  • Bridge's x86 compiler digest in executable tooling is 62775d2a391cfef7cde64e387655caa9809a267093112910ec76bfa568f3712b; AGENTS.md still mentions an older digest. Resolve via tooling, current compiler qualification and open Bridge #41; never silently adopt the stale text. Physical x86 qualification is still NOT_RUN in the inspected Bridge evidence.
  • Omega bf54b19fa590e8ae925c0e80815516dbf41e7326: Makefile builds its GPU copies and uses PHYSICS_DIR. seed/spirv/irspirv.om has a scalar IR / input-result-buffer ABI, not CUDA thread and pointer semantics. Reuse verified pieces; add explicit semantic lowering.
  • AMD lab branch 268a2e9dddab02b63140c37ea937ac442c55917e: native/gpulab/amd.om implements a bounded gfx1100 emitter/virtual executor. Its documented register entry state is a lab ABI; kernel metadata, hardware dispatch and coherency remain required.
  • #106's later scope correction preserves existing code in its repositories. This mission does not perform the older bulk consolidation instructions. Pin consumed implementations and place new work with one owner. ARCH-0042 (architecture PR #342) remains PROPOSED; the coordinator records compatibility placement before code begins.
  • Earlier chat percentages and calendar ranges were subjective. This plan uses observable gates and makes no completion-percentage or delivery-date promise. Repository inspection cannot establish complete compatibility or replace hardware testing.

Exact success ladder

GateRequired resultDependency
C0 PROFILEFrozen workload, ABI/PTX profile, dependency manifest, physical-runner inventory and ownership decisionnone
C1 ABIGenuine loadable CUDA-compatible shared library; exact exports, ABI, errors, handles and negative controls on each advertised host ABIC0
C2 TRANSLATEActual admitted PTX bytes parsed and lowered to the selected backend; malformed/unsupported modules rejected; no kernel-name substitutionC0; C1 integration follows
C3 GB10Frozen ARM64 driver-API sample runs through replacement on physical Spark with correct outputs and device provenanceC1+C2+current GB10 backend qualification
C4 AMDIdentical x86-64 executable AND PTX/module hashes pass on a physical NVIDIA reference host and physical AMD hostC1+C2+AMD backend+physical x86 qualification
C5 INTELThe exact C4 x86-64 artifact passes on an identified physical Intel GPUC4+Intel backend
C6 APPLICATIONA pinned external application exercises required runtime/library profile unchanged, with numerical and lifecycle acceptanceC4; runtime/library features selected by trace
C7 EVALUATIONOutside engineer reproduces release candidate; support matrix, packaging, rollback and performance evidence completenamed target gates+C6

Spark is ARM64. It cannot establish identity of an x86-64 executable. Freeze separate ARM64 and x86-64 builds from the same source for C3 versus C4. Compare hashes within each architecture. C4 needs an accessible x86-64 NVIDIA baseline plus AMD host, or an explicitly equivalent same-host-ISA test arrangement. Host emulation is separately labelled and cannot close physical gates.

Start C0/C1/C2 and AMD hardware discovery immediately. Do not make AMD adapter preparation wait for every GB10 optimization. C3 is a debugging/integration checkpoint; it need not block independent AMD work. Intel and application inventory can start early while their acceptance dependencies remain open.

Implementation route and bounded profiles

First profile: Linux ELF64, one device, explicit contexts, allocations/copies, one admitted kernel launch, synchronization and teardown; independently authored integer vector-add plus one stock driver-API CUDA sample built unchanged by NVIDIA tools. Pin exact CUDA headers/toolkit/PTX versions from those artifacts. The API list is trace-derived, not guessed from this proposal. Include both direct symbol lookup and versioned lookup if the sample requires them.

Second profile: runtime-API sample, including dynamically linked libcudart and separately classified statically linked runtime. Decide from traces which runtime tables or registration hooks are needed. Retaining a vendor runtime temporarily is disclosed as driver replacement. Removing all dynamically loaded CUDA libraries requires a separate implemented runtime facade. A preexisting executable with statically linked vendor runtime contains those bytes until rebuilt; describe that accurately.

Backend plan: the initial AMD route should reuse Omega-authored SPIR-V work over a documented, available driver API where the selected GPU supports it. Complete checked shared-library calls through Omega #888. Freeze actual device/feature support before selecting Vulkan/OpenCL or another route. HIP module loading consumes AMD code objects; forwarding PTX to HIP is insufficient. A HIP-assisted experiment must be isolated and labelled, and must not silently replace #76's independent implementation. The raw gfx1100 lab is optional reusable evidence, not a launch-ready HSACO backend.

For every route define allocation ownership, device-pointer arithmetic/ranges, host versus device visibility, parameter packing, dispatch dimensions, buffer lifetimes and synchronization. Vulkan descriptor-based buffers do not automatically implement CUDA's address space; explicitly lower the admitted pointer subset or require and validate device-address capabilities. Keep SPIR-V Kernel/OpenCL and Shader/Vulkan environments separate.

Later profiles add warp operations, shared memory, atomics, multiple streams, PTDS, graphs, dynamic linking, math libraries and framework execution only with their own tests. SASS-only cubins, unsupported PTX/LTO/Tile IR, compression variants and unknown export tables receive recorded refusal outcomes until an explicit profile supports them. No universal-CUDA claim follows from vector-add.

Hive operating instructions

  1. Read this issue and every linked work package, current repository AGENTS/shared rules, applicable crumbs, latest comments and open PRs. Refresh heads and compiler fingerprints.
  2. Coordinator records a claim table: issue, worker/session, owning repo, paths, base SHA, dependency pins, branch, draft PR, gate state, blocker and reviewer. Reuse existing owners. One writer per shared file.
  3. First-party compatibility logic, lowerers, backend logic and new semantic tests are handwritten seeded .om. Existing generated ABI glue and build infrastructure are disclosed and pinned. Missing compiler/FFI capability goes to its current owner, never to a hidden foreign-language fallback or second compiler.
  4. Open each draft PR with failing acceptance evidence and its concrete implementation slice. Link dependencies using Depends on and Refs; avoid auto-closing incomplete hardware work. Small components communicate through pinned, versioned artifact/ABI contracts.
  5. An independent verifier reviews and runs the integrated candidate. Re-run affected gates after merges/rebases/pin changes. Record exact commands, exits, source/compiler/library/application/module hashes and output comparison, plus deliberate wrong-math, stale-handle, missing-sync, wrong-target and false-success controls as applicable.
  6. Physical runs use the existing device reservation/serving coordinator. This issue does not install software system-wide, reboot, change drivers/firmware, purchase capacity or deploy.
  7. Missing hardware records BLOCKED_HARDWARE with exact host ISA, GPU, driver API, OS and access required. Continue independent host work. A simulated PASS does not close that row.
  8. Finish each worker turn with its linked PR, evidence and next ready dependency in the issue. Close only when the stated acceptance gate is met on the final artifact.

Qualification and packaging contract

A committed machine-readable manifest must bind host ABI, OS/libc floor, toolkit/PTX versions, allowed APIs/features, expected backend, all source/tool/artifact hashes, inputs, output comparison and dependencies. Proposed common runner: build/cuda-compat-check --manifest <file> --gate <gate> --out <new-evidence-dir>. This command is a deliverable to implement, not an existing executable. The final work packages must publish exact build and run commands before acceptance.

Require process mapping of the replacement library, actual GPU identity and submission/completion evidence, plus a denied-device or removed-backend control that causes failure. Never infer GPU execution from a correct answer alone. Record external drivers, firmware, JIT compilers and system libraries. A library named libcuda is expected; validate its identity rather than failing solely on its name.

Use per-process library selection first. Harden cudapp run to refuse a missing/wrong library before application startup and detect fallback; directory existence alone is insufficient. No global swap is needed for C3-C6. Measure correctness first, then cold initialization/JIT, transfers, kernel time, synchronized end-to-end time, warm runs and memory on each device against its appropriate baseline. Publish slower results and unsupported cases.

Sources and numerical check

Primary references checked using Context7 and official documentation:

Wolfram MODELED checks returned True for the integer indexing identity, selected tail cases and partitioning a wave64 index set into two 32-lane sets. Query and result are retained in the profile work package. These checks validate arithmetic only; divergence, shuffle masks, barriers and memory ordering require separate semantics and device tests.

No implementation worker has been assigned by this planning pass. The Hive coordinator should claim C0, register existing owners, then dispatch disjoint ready slices with independent verification. All physical mission gates remain NOT_RUN until new receipts exist. #62 remains the separate whole-model portability objective.

Short kickoff prompt

Execute https://github.com/aien-dev/CUDApp/issues/183 with the Hive. Start at C0, reuse existing owners, open linked draft PRs, and advance gates only with independent receipts. Keep blockers visible.

did:key:z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd wrote on 2026-11-18 17:21 UTC

Recovered GitHub comment. Original comment 6507844238

CudaProfile (arch#240 item 3): the C0 profile freeze for #184 is pushed on CUDApp feat/cuda-c0-profile @ 94f225d1. It is host-EXERCISED only; GPU arms are NOT_RUN. Details are on #184.

Downstream gates should check against compat/cuda/profile-c0-<isa>-v1.tsv and should not redefine the surface:

  • Bridge #42 C1: SONAME and exports against the import … cuda rows, plus refusal of a wrong-ISA library.
  • #185 C2: translate exactly the ptxop/sreg rows and refuse every deny root.
  • #186: wraps c0_check. The manifest is TSV, not JSON.

Every device step waits on a spark-window plus Drake's authorization.

Sign in to comment