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

branch main Branches Tags History

CUDApp / AUDIT_SCOPE.md

157 lines · 9903 bytes Raw Blame History Source

Audit scope

Written for an outside, independent security audit. Revision described: 780a0af1f08c1786ea53a4e8702ca8bb1396fdbb on main, 2026-10-26. Everything below is taken from the repository's own files at that revision; items marked NOT_RUN were not executed while writing this document.

What this repository is

CUDA++ (repository name CUDApp) is the GPU half of the Omega runtime: a C library that writes NVIDIA sm_121 machine code (SASS) directly, launches it through its own user-space client for NVIDIA's open kernel module ioctls, and ships matrix multiply, attention, elementwise and mixture-of-experts libraries. It uses no CUDA toolkit, nvcc, PTX, libcuda or cuBLAS. It builds with make and gcc on Linux; it runs kernels only on the NVIDIA GB10 (DGX Spark) with open kernel module 580.173.02. What ships is build/libomega_gpu.a (copied to build/libcudapp.a). Host simulators, references and Python scripts under tests/ and tools/ are test oracles. Status: research stage; current native qualification of this checkout is NOT_RUN.

What to review, in priority order

  1. nvrm/nvrm.c, nvrm/nvrm.h. The driver client: opens /dev/nvidiactl, /dev/nvidia0 and /dev/nvidia-uvm, allocates resource-manager objects, maps buffers at the same address for CPU and GPU, builds the command ring and rings the doorbell. Check ioctl argument structures and sizes against third_party/nvidia-open-580.173.02/, error handling on every call, and that mappings cannot alias or outlive their objects.
  2. m16/m16_gpu_wait.c and m16/m16_native.c. The completion wait (hard deadline never extended, stall deadline restarted only on progress) and native path. Check that a hung GPU cannot hang the process forever and that an unknown completion state stops further GPU work.
  3. src/omega_gpu_platform.h, src/omega_gpu_platform*.c. The platform contract: typed handles, explicit rights per buffer, no silent fallback, the CUDAPP_MEM_RESERVE_MIB reserve check before allocation, refusal of CPU-polled buffers that are not GPU-uncached. AGENTS.md requires approval before changing this contract.
  4. src/omega_gpu_session.*, src/omega_gpu_cmdlist.*, src/omega_gpu_engine.*. Session lifetime, command lists, shader-cache invalidation before new code runs, wait-for-idle between dependent launches, and the job engine returning exactly one named failure.
  5. src/omega_blackwell_encoder.c, src/omega_blackwell_codegen*.c, src/omega_blackwell_qmd.c, and the libraries src/omega_gpu_*_api.*. Generated code and launch descriptors: check that grid, block, register and shared-memory sizes and buffer bounds derived from caller shapes cannot address memory outside the caller's buffers.
  6. src/omega_gpu_chip.c. The qualified chip table consulted by make doctor.
  7. tools/doctor/cudapp_doctor.c and tools/zero-cuda-gate.sh. Read-only diagnostics; check that they cannot report READY or PASS for a wrong module version or a binary that imports CUDA.
  8. tools/interop/cubin_probe.c. Links NVIDIA's libcuda and refuses to run unless SPARK_WINDOW is set; check it is not reachable from any host target.
  9. tools/extract/audit-scan.sh with rules-secrets.txt and rules-private.txt, and tools/extract/audit-selftest.sh. The publication secret scan and its self-test.
  10. .github/. Issue templates, a pull request template and, added by the audit-readiness change, workflows/ci.yml: make test (host-only targets, no GPU) on a GitHub-hosted arm64 runner plus an SPDX SBOM artifact; actions pinned by commit sha, read-only token. AGENTS.md states that CodeQL (C/C++ and Python) also runs on pull requests; how CodeQL is configured is unknown from the repository.

Trust boundaries

Threat model summary

Build from source at a pin

Linux with git, GNU make and gcc (CC ?= gcc, -Wall -Wextra -Werror). No CUDA toolkit. There is no compiler pin file; the doctor records the compiler version it was built with.

git clone https://github.com/aien-dev/CUDApp.git
cd CUDApp
make -j8

Build variables: CC, OUT_DIR (default build), PHYSICS_DIR (default .). The host build needs no GPU. On x86-64, make test is the portable suite: it uses the C encoder and C cubin writer and does not assemble the seeded AArch64 binding. Target-only commands are in docs/OMEGA_HOST_TESTS.md (issue #15).

Run every test

make test
make test-native-artifact
make zero-cuda-gate
build/hello_gpu --sim
python3 tools/figures/make_figures.py --check
make doctor
make hello-gpu
./build/gpu_<name>_test --out receipt.json

Known limitations and NOT_RUN

Dependencies and provenance

Evidence

Receipts live in evidence/<topic>/, each recording what ran on a named commit. AGENTS.md: never edit or regenerate an existing receipt; new receipts go in a new folder. Status words in README and ROADMAP.md are PASS only with a receipt on a named commit. Cross-repository receipts, where filed, belong under aien-dev/aien-receipts CUDApp/<sha>/; whether any exist is unknown from the repository. Receipts are append-only and never edited.