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-COMPAT P1] Implement independent, trace-selected BLAS and library ABI profiles

Open · #76 · open 2026-10-24 23:34 UTC

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

drakestapleton wrote on 2026-10-24 23:34 UTC

Outcome and boundaries

Extend existing CUDA/PTX compatibility #74 with separately qualified mathematical-library ABI profiles, starting with trace-selected BLAS/GEMM. This is independent Omega implementation, not embedding or forwarding to ZLUDA/HIP/rocBLAS. Existing Omega numerical/kernel owners remain authoritative; do not duplicate their math. This is a later compatibility lane. llama.cpp's direct Omega backend does not require a CUDA-library facade to ship its first GB10 profile.

Provenance and source policy

Preserve #74's from-scratch rule: no ZLUDA code, tests, data or files imported into implementation/test artifacts. The prior read-only study identifies problem categories, not reusable code. Derive interfaces and independent tests from permitted published API/ISA specifications and our own explicitly authorized observations. Record specification versions and license/provenance. This issue is not a claim of legally certified clean-room status. CUDA library documentation index and published cuBLAS API/semantics are reference inputs. Undocumented behavior or ABI requires a separately reviewed observation/provenance plan, not guessed compatibility.

Phase 0: finite workload-driven inventory

  • Select one stock application/library version and collect the exact functions, symbol versions, types, handle lifecycle, workspace, pointer modes, streams, errors and numerical flags it requires.
  • Publish an implemented/tested/unsupported matrix, distinguishing symbol export, routed implementation and executed conformance. Do not count an exported stub as support.
  • Split Driver ABI/PTX/kernel code concerns back to #74. Link exact native tensor/runtime capability needed for every library operation.

First BLAS profile

  • Start with the smallest useful GEMM forms required by the pinned workload: explicit matrix layout/transpose, leading dimensions, strides/batches, alpha/beta scalar representation and pointer mode.
  • Preserve dtype, accumulator, math-mode, rounding and determinism contracts; no silent precision reduction or different algorithmic output.
  • Handles must bind the right context/device/stream; workspace lifetime and bounds are explicit. Respect asynchronous completion and error propagation where advertised.
  • cuBLASLt descriptors, heuristic/algorithm selection, epilogues and workspace form a separate additive profile. Do not imply Lt coverage from a basic GEMM pass.
  • Unknown operations/flags/types refuse predictably without process abort, fake-success no-op or hidden foreign-library fallback.

Acceptance

  • Freeze named API versions, complete required symbol/call manifest, permitted numerical behavior, test inputs and native backend identities.
  • Independent deterministic fixtures cover zero/edge dimensions, strides, transpose, alpha/beta, aliasing where allowed, errors, stale handles, stream dependencies and resource exhaustion.
  • Compare outputs/errors against permitted published semantics and explicitly separate reference executors. Adversarial tests catch wrong precision, row/column layout, unsupported-success and workspace lifetime defects.
  • Pinned application executes the supported profile unmodified through our facade with process/dependency and actual device-execution evidence.
  • Cold/warm and end-to-end measurements include initialization, transformations, transfers and synchronization; report slower results.
  • Native backend independence is explicit: a GB10 profile says Linux/RM/UVM/GSP remain; an eventual AMD no-HIP profile cannot secretly call HIP/rocBLAS. No claim that one proves the other.

Later independent profiles, not first-release promises

Convolution/DNN algorithms and descriptors, sparse layouts/SpMM, FFT planning/normalization/workspace, graphs and 32-bit application interop each require their own traced workload and conformance specification. Prioritize by actual adoption needs and existing inventory; no blanket cuDNN/cuSPARSE/cuFFT/PhysX compatibility from a few symbols.

Shared delivery boundary

User-requested plan, 2026-10-24. Read current source, ADRs, active PRs and ownership before edits. New first-party implementation/tests use seeded .om and existing compiler/runtime/verifier; no duplicate stack. Preserve licenses/provenance of external integration material. No live serving disruption, unreserved GPU work, install, driver/firmware change, upstream submission, merge or release is implied. Retain exact identities, raw commands/exits, negative controls and independent review. NOT_RUN/BLOCKED is not PASS; source, host, simulator and physical results are separate.

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

C6 application selection and library closure for manufacturer mission

Parent #183, C0 inventory #184, ABI Bridge #42, translation #185, independent qualification #186. This issue retains all independent library-profile work and its existing no-HIP/rocBLAS-forwarding rule.

Start by tracing one pinned external application and its exact binary/library package. Choose a bounded BLAS-using application first if it provides a smaller complete profile than PyTorch. Keep a pinned PyTorch inference profile as a subsequent target after its actual requirements are inventoried; a custom torch.compile backend or application source patch does not satisfy unchanged CUDA-binary acceptance.

Record libcudart linkage, cuBLAS/cuBLASLt symbols, module payload types, cuGetProcAddress/export tables, device linking, NVRTC/nvJitLink/libdevice, graphs, allocators and optional cuDNN/NCCL dependencies only where observed. Unsupported requirements become explicit children with concrete workload gates. Do not implement every library before selecting a workload.

The admitted BLAS profile binds layouts/transposes, dimensions/strides/batches, alpha/beta pointer mode, streams/workspace lifetime, math/determinism mode and numerical oracle. Reuse existing numerical owners, extend first-party .om kernels as needed and keep library ABI adaptation separate from kernel implementation. A cublasLt descriptor/heuristic path requires its own tests.

C6 closes only when the frozen external application runs without source/bytecode/binary modification on the declared AMD profile, all invoked operations satisfy the numerical/lifecycle contracts, runtime dependencies are explicitly identified, and false-success/wrong-layout/wrong-precision/stale-workspace controls fail. Static vendor runtime bytes retained in an executable must be disclosed. C7 external evaluation is in #186 and #88/#90/#91.

Sign in to comment