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 / docs / independent-verification / README.md

231 lines · 15008 bytes Raw Blame History Rendered
1# Independently reproduce one native GPU result
2
3**Status: PROPOSED collection protocol. Independent hardware replication is
4NOT_RUN.** This directory does not contain a physical receipt, an executable
5validator or new GPU harness behavior. [Issue #91](https://github.com/aien-dev/CUDApp/issues/91#issuecomment-6407638311)
6owns this evidence work under [#88](https://github.com/aien-dev/CUDApp/issues/88).
7[#79](https://github.com/aien-dev/CUDApp/issues/79) retains .om migration.
8The [agent prompt](AGENT_PROMPT.md) describes the remaining implementation.
9
10## What the current evidence establishes
11
12The immutable [teardown candidate receipt](../../evidence/speculation/release-candidate-teardown/receipt.json)
13reports an owner-operated physical vector result for CUDApp
14`2e2421694f6110bd84885ae0b2d3caf249809d34`, with compiler source
15`omega-mv@d7390d88d07dbf48cfbb0583070599c350f814d3` and compiler SHA256
16`9749f38841a55917d41924a68bce31463ec2339910bddd5e6cbf6ea4420551db`.
17It records wrong-math and restored-program controls and a privately retained
18syscall trace. It explicitly leaves a second person's or machine's hardware
19rerun NOT_RUN. It does not qualify a later source revision.
20
21The [native kernel description](../speculation/NATIVE-KERNEL.md) and
22`native/nvrm/context.om`, `native/blackwell/vector.om` and
23`native/blackwell/launch.om` expose the direct device-client and native
24instruction path. Source inspection and artifact hashes are not independent
25physical execution. A matching hash identifies bytes; a signature identifies
26an attestation under a key. Neither proves that the attested event occurred.
27NVIDIA open kernel modules and GSP firmware remain required. A runtime that
28does not use CUDA userspace is not evidence that the toolkit is absent.
29
30## Freeze the experiment before collecting results
31
32An operator independent of candidate generation owns the challenge and records
33their relationship to the author. Self-reported independence is not verified
34independence. Document who reviewed it, what they checked, and remaining trust
35assumptions. An agent reviewing source is not an independent hardware operator.
36A second operator on the same machine is distinct from a second machine.
37
381. Clone the exact public candidate and compiler revisions into clean workspaces.
39 Save the full Git SHAs, clean/dirty status and any patch bytes and hashes.
40 Freeze the harness and oracle revisions too. A dirty build is a different
41 candidate, not a result on the clean SHA.
422. Record tool versions, build environment and the complete source composition
43 and build commands. Rebuild the pinned seed compiler using its repository's
44 accepted path on the supported architecture. Compare its hash with an
45 independently recorded expected digest, not a sidecar just regenerated by
46 the same build. Never execute a failed or partial compile output.
473. Hash the source unit, executable, reviewed kernel variants, descriptor
48 builder/template and invariant configuration. Repeat the build in a fresh output directory and
49 report exact byte agreement or a diagnosed difference. A rebuilt compiler's
50 fixpoint is not a proof of compiler correctness. Runtime descriptors and
51 arguments contain fresh sizes and allocation addresses: hash their finalized
52 bytes per arm after challenge selection/allocation and before submission.
53 Bind them to the frozen builder and challenge, not a preselected address.
544. Run the repository's host suite and relevant native host tests. Capture every
55 command and exit. x86_64 cross-compilation or interpretation is not native
56 AArch64 execution. Do not replace architecture-specific barriers with no-ops.
575. Freeze the candidate digest before challenge generation. The operator chooses
58 fresh unpredictable inputs and publishes a timestamped commitment to the
59 exact input bytes and generation recipe before launch. The candidate author
60 must not select, replace or learn the challenge in advance. Runtime inputs
61 necessarily reach the candidate; expected outputs remain with the referee.
62 Record that chronology and its witness, not just self-asserted timestamps.
636. Use an independently implemented CPU oracle in a separate process/workspace.
64 It consumes the exact input bytes and emits every expected uint32 result
65 under the documented wraparound semantics. Do not reuse the candidate's
66 generator, result buffer, checker or lookup table as the sole oracle.
67 Publish its source/provenance, versions, command, exits and output digest.
68
69Start with the bounded vector addition already supported by the native path.
70Do not substitute a full model, arbitrary shader or benchmark. Preserve the
71existing refusal cases and supported size bounds. After freeze, the operator
72chooses challenge sizes within those bounds, including tails and boundaries.
73Rebuilding to bake fresh values into candidate code breaks the freeze; add
74reviewed runtime input transport first instead.
75
76## Existing harness seams and missing work
77
78Reuse `tests/speculation/native-kernel-test.om`, `vector-checks.om` and
79`vector-checks-test.om`. Today the main function uses fixed salts; expected
80values are computed inside the same test process. Its checks cover every
81logical result and up to 64 unused output words, but there are no unused tail
82words at maximum capacity. These are useful regressions, not the independent
83challenge/CPU-oracle protocol above.
84
85Before a device run, extend that existing harness in seeded .om for external
86input and output artifacts, separate reference comparison, and properly
87allocated guards. Do not move pointers or enlarge allocations without review
88of launcher bounds and admission. Add host refusals for malformed/truncated
89inputs, wrong size/digest, stale outputs, missing writes and oracle tampering.
90The withheld-submission control below is missing and must be implemented and
91host-tested before use. No new permanent C implementation or foreign fallback.
92
93## Physical run, only after admission
94
95The issue, this document and a PR are not permission to open a device. Obtain
96the existing owner reservation and safe admission for the named machine,
97bounded allocation/workload and observation window. Leave the resident model,
98other workers, gates, installed toolkit, driver and firmware untouched. If
99safe admission or supported hardware is unavailable, record NOT_RUN or the
100exact blocker and stop the dependent work.
101
102Record OS/architecture, GPU model and PCI identity, public-safe stable device
103identity, loaded driver version and GSP dependency. Keep private device IDs in
104raw custody when necessary, with a reviewed stable public alias. Do not infer
105a second machine merely from a different alias. Record approved memory/time
106limits, pre/post health checks scoped to the reservation and cleanup outcome.
107No private service URLs, prompts, model data or unrelated process listings.
108
109For each arm, use fresh input/output allocations as supported, poison the
110entire output, snapshot input and guard bytes, and retain full readback. Ensure
111poison is independently chosen and checked by the referee not to equal that
112element's expected output. Do not expose expected values through a reversible
113poison pattern such as their bitwise complement. Preserve all failures and
114attempts. Do not discard failed attempts or selectively repeat runs to report
115only successes. Diagnose failures, retain all attempts and never reuse an
116earlier successful buffer.
117
118| Arm | Required observation |
119| --- | --- |
120| Correct kernel | Actual submission/completion and every output matches the separate oracle. Input bytes and allocation guards remain intact. |
121| Wrong-math kernel | Reviewed mutation changes arithmetic only, not addressing, bounds or termination. Submission completes, the oracle rejects wrong results, and guards stay intact. |
122| Restored kernel | Fresh correctly restored code and output buffers pass again; record code identities for both versions. |
123| No submission | Initialize normally but do not enqueue GPU work and do not enter a wait that can never complete. Readback stays at the fresh poison, not the oracle result. Trace evidence contains no launch for this arm. |
124| Guards | Before/after guards for each accessible allocation and unused output extent remain unchanged in every arm. Explicitly report inaccessible/uncovered regions; do not claim total memory safety. |
125
126A wrong-math control must not send malformed opcodes, invalid pointers or a
127hang to the device. A no-submission arm is not a timed-out GPU experiment.
128Use the existing cleanup path; an uncertain device state requires the owner's
129recovery procedure, not an agent-initiated reset or driver reload.
130
131The external referee checks all output bytes, guards and expected failures.
132Candidate stdout saying PASS is not the result. A host routine that writes the
133expected outputs would pass arithmetic comparison; the dynamic observation,
134no-submission control and independent review must address that alternative.
135This remains scoped empirical evidence, not formal hardware attestation.
136
137## Dependencies and observation
138
139Keep separate inventories for build tools, optional test/oracle tools and the
140runtime process tree. Record installed `nvcc`/toolkit separately from whether
141any component was executed or loaded by the measured path. Do not claim
142"toolkit absent" from a clean dependency scan. Testing absence requires a
143separately approved environment; never uninstall software from the Spark.
144
145Use the existing `make zero-cuda-gate` for its actual static ELF scope. Add
146reviewed static inspection of the exact native ELF: headers, dynamic entries,
147imports, interpreter, and build inputs. Static linking alone cannot exclude
148embedded code, subprocesses or dynamic loading. Static output is one evidence
149row, not a verdict about everything that could execute.
150
151Collect full raw process/device-call logs across the relevant process tree,
152including exec/load/open/ioctl/mmap/submission/completion and exits where the
153observer supports them. The historical command was
154`strace -f -o kernel-syscalls.log ./kernel.elf`; this is a reference, not an
155authorized command to run now. Explain trace coverage and limitations rather
156than claiming a tool decoded more than it did. Correlate buffers and commands
157with the exact kernel/launch artifacts and the bounded readback. An ioctl or
158an NVIDIA device open by itself does not establish the claimed computation.
159Any profiler or observation tool is separately inventoried and admitted.
160
161Record provenance and license obligations for the exact source/tool closure.
162Unresolved current-tree licensing or vendor-listing questions belong to
163[#89](https://github.com/aien-dev/CUDApp/issues/89); do not assert that the whole
164tree has one license or change headers to make an audit appear clean. This
165protocol does not authorize redistribution of material under review.
166
167## Public evidence and raw custody
168
169Create a new immutable `evidence/<run-id>/` bundle. Never rewrite the old
170receipt. Save commands, start/end UTC, exit codes, stdout/stderr, full outputs,
171input/oracle/kernel/launch digests, pre/post checks and all control failures.
172For each artifact record byte count and SHA256. Publish source-owned artifacts
173only; never add vendor binaries, firmware, cubins/PTX or vendor listings.
174
175Before publishing, scan and manually review commands, logs, patches, device
176identifiers and manifests for secrets and private information. Sanitization
177must preserve evidence-bearing event order, operation/result fields and
178consistent alias relationships. State every removed class and its effect on
179verification. If critical evidence cannot be published, label that check
180incomplete for public verification instead of hiding the limitation.
181
182For every sanitized file, retain the raw original under authorized custody,
183record both hashes, the transformation specification, reviewer, and access
184conditions. Do not publish the private path. A raw hash is a commitment, not
185access to the raw trace. If later confidential inspection is needed, seek
186separate authorization; this protocol does not grant disclosure permission.
187
188The operator writes a report naming what they personally rebuilt, generated,
189observed and checked, their relationship to the author, and what remained
190unobserved. A reviewer verifies identities, chronology, artifact bytes and
191controls before accepting a narrow claim. Optional signatures cover exact
192report bytes and key identity without introducing a new trust root or a
193physical-proof claim. An optional separately admitted second-machine run gets
194its own bundle and retains all platform differences.
195
196## Manifest contract and review checklist
197
198[manifest.NOT_RUN.json](manifest.NOT_RUN.json) is an empty **template**, not a
199receipt. [manifest.schema.json](manifest.schema.json) uses JSON Schema draft
2002020-12. A standard external validator can check its structure. This PR does
201not add a validator dependency, CI acceptance gate or manifest consumer.
202
203- `claim_status` is always `NOT_EVALUATED`. There is no automatic PASS value.
204- Check statuses are NOT_RUN, BLOCKED, FAILED or COLLECTED. COLLECTED means
205 evidence was attached, not that it is authentic, sufficient or successful.
206- A template cannot carry commands, artifacts, identities, operator claims or
207 a completed check. Never present generated schema-test data as run evidence.
208- An operator report may be incomplete. Describe exactly why a row is missing;
209 optional second-machine/toolkit-absent checks can remain NOT_RUN without
210 inventing broader claims. Preserve failed observations as FAILED.
211- Every command must identify its script/argv context, UTC times, exit status,
212 and stdout/stderr artifact IDs. Timestamps use UTC `Z` with a lexical
213 date/time range check, excluding leap seconds. Calendar validity needs a
214 validator with date-time format support or a separate calendar check; the
215 locally installed referee lacks that optional format checker. Public paths
216 are bundle-relative, never
217 private machine paths. The schema cannot sanitize free text for you.
218- Review must resolve every referenced command/artifact ID, reject duplicates,
219 verify every byte count/hash, chronology and identity against actual files,
220 enforce admission and check semantics. JSON Schema does **not** perform
221 these cross-record or physical checks. Self-filled fields are unverified.
222- Hash/signature validity, schema validity, host tests and code review cannot
223 be substituted for a hardware observation. Keep owner hardware, independent
224 operator hardware, second-machine hardware, host and simulator claims apart.
225
226The [host-only contract checks](../../evidence/independent-verification/host-contract-20261026/README.md)
227record structural/refusal validation and unchanged repository test blockers.
228
229Issue #91 stays open until its actual acceptance evidence is reviewed. This
230first slice does not establish performance, full-model correctness, other GPU
231support, C retirement, deployment or replacement of NVIDIA kernel/firmware.