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 C2] Implement bounded PTX and fatbinary translation into real backend code

Open · #185 · open 2026-10-29 12:15 UTC

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

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

Parent: #183. Decomposes the existing #74 compatibility lane. Owns C2 TRANSLATE. Depends on C0 (#184); coordinates with Bridge #42.

Implementation brief

Build a bounded, independently implemented PTX/module front end in seeded Omega. Before edits, #74's coordinator records whether new compatibility modules live in Bridge or an attached pinned component under the proposed ownership boundary. CUDApp keeps device lowering/launch ownership. No existing source relocation.

Reference inputs: published PTX ISA and CUDA module API, the frozen profile, owned instruction fixtures and approved observations. No code/tests/data imported from ZLUDA. Vendor-generated reference payloads stay outside the repository according to AGENTS/PROVENANCE; source recipes/hashes and permitted owned fixtures are committed.

Deliver these separate draft-PR slices:

  1. Bounded PTX lexer/parser, declarations, types/address spaces, symbols, parameter alignment and entry metadata for the exact profile. Parse version/target/address size; every unsupported directive, opcode or modifier has deterministic refusal.
  2. Checked semantic lowering: registers/predicates, integer widths and overflow rules, thread/block/grid indices, pointer offsets, loads/stores, comparisons/branches and required floating operations with explicit rounding/FTZ. Emit a versioned typed artifact into the existing lowering path. If the current IR cannot express an operation, request the smallest compiler extension from its owner.
  3. Bounded module/fatbinary reader and image selection. Raw PTX comes first; add selected fatbin variants, compressed records and cubin metadata only after independently specified/observed formats and size checks. Refuse truncation, overflow, invalid offsets, missing entry, wrong address size, unsupported image/version and ambiguous selection. No guessed compressed format.
  4. Connect emitted semantic artifacts to GB10 code generation and the chosen AMD/Intel backend. Existing backend/spirv/emit.om is a fixed-kernel builder; seed/spirv/irspirv.om has a scalar input/result ABI. Neither constitutes an arbitrary PTX translator. Add actual PTX-driven lowering instead of matching entry names and returning canned kernels.
  5. Cache only verified output, keyed by complete PTX/module bytes, front-end/compiler/lowerer versions, target/capabilities, ABI/options and driver/compiler dependencies that affect output. Reuse existing cache owner #158 where appropriate without expanding its scope blindly. Wrong-target, stale compiler/options and corrupt-cache controls must miss/refuse.

Initial profile can avoid warp collectives/barriers/atomics. Later addition needs active-mask/divergence semantics, CUDA warp32 versus target subgroup widths, memory scopes/order, shared-memory layout and race-sensitive tests. Merely splitting a wave64 index into two groups proves only indexing. libdevice/external symbols and device linking must either have an owned implementation or refuse explicitly. SASS-only input needs a separately scoped decoder/translator; PTX acceptance cannot close it.

Acceptance

  • Every admitted instruction/modifier has independent output/refusal cases. Wrong-but-valid arithmetic must fail comparison.
  • Rename/reorder entries, change constants, offsets, lengths and branching; actual PTX changes flow into code/output. Hold out valid compositions to catch canned-kernel substitution.
  • Parser/capacity/module mutants reject cleanly with no partial public artifact or unintended launch.
  • GB10 and SPIR-V/device code satisfy their respective validators; Kernel and Shader environments remain distinct.
  • Compare permitted reference executions and Wolfram expectations. CPU/emulator conformance is labelled as such.
  • C0's exact fixture loads through Bridge #42 and launches real generated code when the downstream hardware gate runs.
  • Publish supported/unsupported PTX and module matrices and exact commands; no broad CUDA coverage from this bounded profile.

Delivery and closure

Follow mission #183, current repository instructions, latest issue comments and crumbs. Claim paths before work; reuse existing owners and preserve existing code locations. First-party logic and semantic tests use seeded .om. Open draft PRs with actual changes, dependency pins and behavioral red/green evidence. Require independent review of final integrated code and immutable commands, exits, source/compiler/artifact hashes. Host/emulator/physical results are distinct. No auto-close from a source-only PR or change to live services/driver state.

No comments.

Sign in to comment