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
About Files History Releases Proposed changes Issues For developers
fix: create the standalone QMD test output directory
closed ca1c3a136925d56e #181 · opened 2026-10-29 02:08 UTC · closed 2026-10-29 02:30 UTC
Imported from GitHub aien-dev/CUDApp#181, by drakestapleton
Base b348277e4383ab1f37f45bb702ea7d4fb4363782 · Head 25aa74a0b6cf963b6087390bd9eacc32f10f41b1
drakestapleton wrote on 2026-10-29 02:08 UTC
Measured evidence
Head: 25aa74a0b6cf963b6087390bd9eacc32f10f41b1 , based on main b348277e4383ab1f37f45bb702ea7d4fb4363782 .
Published changed blobs were checked against the tested local bytes.
Host receipt and logs .
On Linux x86_64, GNU Make 4.4.1 and GCC 14.2.0:
make test-gpu-qmd-shared-clean-build: exit 0, qmd shared: 112 checks, 0 failed: PASS.
Parallel make -j4 test-gpu-qmd-shared-clean-build: same PASS, no jobserver warning.
Direct target with an absent OUT_DIR: same PASS.
Same regression with only the directory prerequisite removed in a separate fixture: expected exit 2, missing-directory error.
CC=false and missing TMPDIR controls: expected exit 2; temporary cleanup checked.
make -n test-gpu-qmd-shared-clean-build: exit 0 without executing the test.
git diff --check: PASS. Independent final review found no remaining issue in this scoped repair.
Publication audit self-test: measured 17 planted, 17 found, binary listed. Changed-file scan: measured 3 blobs, 0 binary/compressed blobs, 0 secret hits and 0 private-pattern hits.
Fix
Follow-up to #178. The standalone QMD test did not depend on its output directory. A clean make test-gpu-qmd-shared OUT_DIR=<absent-directory> failed before the test could run, while other host targets could create the directory first and hide the problem.
Add $(OUT_DIR) as an order-only prerequisite of the QMD test executable.
Retain a host-only clean-output-directory regression in HOST_TESTS. It invokes the normal QMD test through recursive make, preserving jobserver and dry-run behavior, propagating failure and cleaning only its own temporary directory.
Only the Makefile and a new receipt folder change. Existing test assertions, QMD implementation/cap, runtime/API, historical receipts and workflows are unchanged.
Verification boundary
Local validation used exact fetched source/include blobs in a source-bounded fixture, not a full repository checkout. Full make test, complete library build, native-artifact and zero-CUDA gates were NOT_RUN locally.
At 2026-10-29 02:23:19 UTC, all 14 observed checks for head 25aa74a0b6cf963b6087390bd9eacc32f10f41b1 had completed successfully. The ARM64 host job checks out synthetic merge d9b87032df04877196e24afde57742c15bcd14d2 of this head into base b348277e4383ab1f37f45bb702ea7d4fb4363782 . Its tree d64e8a9b23bc04bf159a7e2b6b2804390c6653b9 is identical to this head's tree. The raw log records both the ordinary QMD run and the clean temporary output-directory run with 112 checks, 0 failed: PASS, followed by CUDA++ HOST TESTS PASS (55 targets).
Integration is owned by draft #180, which now includes this change. This branch is unchanged; no duplicate integration or further source edits are proposed here.
No GPU/device, driver, live service, deployment or qualification action. This is a draft for maintainer review, not merge authorization.
Apply it
git checkout -b patch-ca1c3a136925d56e b348277e4383ab1f37f45bb702ea7d4fb4363782
curl -fsSL https://interplane.io/drakestapleton/CUDApp/patches/ca1c3a136925d56e .patch | git am
Raw patch (mbox) · Diff
Provenance
This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record:
github-import 1
aien-dev/CUDApp
181
25aa74a0b6cf963b6087390bd9eacc32f10f41b1
{"kind":"github-import","owner":"aien-dev","repo":"CUDApp","number":181,"url":"https://github.com/aien-dev/CUDApp/pull/181","export_sha256":"0aafd51b77ff5776d6baaf9b88b48c8b36a6e27c8d829ae8ded561b71712b17a ","imported_utc":"2026-11-18T16:38:27Z"}
Changes
diff --git a/Makefile b/Makefile
index 6605d6a5 ..609a004a 100644
--- a/Makefile
+++ b/Makefile
@@ -328,13 +328,19 @@ $(GPU_L2_REUSE_TEST): tests/gpu_l2_reuse_test.c src/omega_gpu_fp8_api.h src/omeg
# The Blackwell QMD shared-memory field (word 36): the encoding of every size, the fixed SM-config
# fields beside it, and the refusal one byte over OMEGA_BW_QMD_MAX_SHARED_BYTES (a host check, no GPU).
-.PHONY: test-gpu-qmd-shared
+.PHONY: test-gpu-qmd-shared test-gpu-qmd-shared-clean-build
QMD_SHARED_TEST = $(OUT_DIR)/test_omega_bw_qmd_shared
-$(QMD_SHARED_TEST): tests/test_omega_bw_qmd_shared.c src/omega_blackwell_qmd.h src/omega_blackwell_qmd.c
+$(QMD_SHARED_TEST): tests/test_omega_bw_qmd_shared.c src/omega_blackwell_qmd.h src/omega_blackwell_qmd.c | $(OUT_DIR)
$(CC) $(CFLAGS) -o $@ tests/test_omega_bw_qmd_shared.c src/omega_blackwell_qmd.c
test-gpu-qmd-shared: $(QMD_SHARED_TEST)
$(QMD_SHARED_TEST)
+# Build the same host-only test with an output directory that does not exist yet.
+# The normal test target does not recurse through this regression target.
+test-gpu-qmd-shared-clean-build:
+ +@set -eu; out=$$(mktemp -d); trap 'rm -rf "$$out"' EXIT; \
+ $(MAKE) --no-print-directory OUT_DIR="$$out/new" test-gpu-qmd-shared
+
# Every host-only check: no GPU, no device opened. The chip gates are listed in README.md.
HOST_TESTS = test-drift test-gpu-matmul-api test-gpu-elementwise test-gpu-reconv test-gpu-attention test-gpu-moe-window \
test-gpu-fp8 test-gpu-decode-attn test-gpu-router test-gpu-bf16-gemv test-gpu-fp8gemm test-gpu-tern-sched test-gpu-gpr-boundary \
@@ -344,7 +350,7 @@ HOST_TESTS = test-drift test-gpu-matmul-api test-gpu-elementwise test-gpu-reconv
test-codegen-freestanding test-gpu-session-platform test-gpu-native-runtime test-gpu-wait test-gpu-wait-mutants host-tests-m16 \
test-runtime-api test-runtime-portability test-doctor test-hello-sim test-native-artifact-manifest test-gemm-selectors \
test-native-artifact zero-cuda-gate verify-vendored test-swap-cli test-om-encoder test-om-spec-encoder test-om-cubin \
- test-portable-receipts test-gpu-qmd-shared $(CARRIED_HOST_TESTS)
+ test-portable-receipts test-gpu-qmd-shared test-gpu-qmd-shared-clean-build $(CARRIED_HOST_TESTS)
test: $(HOST_TESTS)
@echo "CUDA++ HOST TESTS PASS ($(words $(HOST_TESTS)) targets)"
diff --git a/evidence/QMD-CLEAN-OUTPUT-20261029 /README.md b/evidence/QMD-CLEAN-OUTPUT-20261029 /README.md
new file mode 100644
index 00000000 ..f7fef2a5
--- /dev/null
+++ b/evidence/QMD-CLEAN-OUTPUT-20261029 /README.md
@@ -0,0 +1,74 @@
+# QMD standalone clean-output build repair
+
+## Scope and identity
+
+This is a host-only build-rule follow-up to CUDApp #178.
+The production QMD builder, its shared-memory cap, existing C test assertions,
+public APIs and historical receipts are unchanged.
+
+Base: `b348277e4383ab1f37f45bb702ea7d4fb4363782 `.
+The tested replacement Makefile has Git blob
+`609a004ab095dec51a7d5ef1d319d07a30425976 ` and SHA-256
+`105e81766f32584be8d8730d3b7e54a0132bdad1828248d64519736383ef7203 `.
+
+Local validation used a source-bounded fixture, not a full repository checkout:
+the exact Makefile, all mk/ include files, and these unchanged source blobs
+were fetched from the base and their Git blob identities checked.
+
+- `src/omega_blackwell_qmd.c`: `dd13ec5a2c0d712627240afa8b1151e45643cd06 `
+- `src/omega_blackwell_qmd.h`: `1d56f1a9198ee0e7f8d18f2712207b7a6c37b21a `
+- `tests/test_omega_bw_qmd_shared.c`: `ea877dbe92010691daed3ea4ffa2dd31e9700ffb `
+
+Machine: Linux x86_64. Measured tool versions: GNU Make 4.4.1,
+GCC 14.2.0, Python 3.12.14.
+
+## Defect and repair
+
+The standalone test target did not depend on its output directory.
+With an absent OUT_DIR, compilation failed while opening the dependency file.
+Other host targets could create the directory first and hide this defect.
+
+The repair adds the existing OUT_DIR rule as an order-only prerequisite.
+The retained `test-gpu-qmd-shared-clean-build` regression creates a temporary
+parent, leaves its child output directory absent, and invokes the ordinary
+host-only QMD test target with that child as OUT_DIR. It is in HOST_TESTS.
+The recipe propagates failures and removes its own temporary directory.
+
+## Measured host outcomes
+
+Commands and captured output are in `host-checks.log`.
+
+- Same regression with only the directory prerequisite removed in a separate
+ copied fixture: expected exit 2, missing output-directory error.
+- `make test-gpu-qmd-shared-clean-build`: exit 0,
+ `qmd shared: 112 checks, 0 failed: PASS`.
+- `make -j4 test-gpu-qmd-shared-clean-build`: the same PASS, no jobserver warning.
+- Direct `make OUT_DIR=<absent-directory> test-gpu-qmd-shared`: the same PASS.
+- `CC=false`: expected exit 2. The temporary directory was removed.
+- A missing TMPDIR: expected exit 2 before compilation.
+- `make -n test-gpu-qmd-shared-clean-build`: exit 0, commands printed,
+ no QMD binary executed. The temporary directory was removed.
+- `git diff --check`: exit 0.
+- A separate reviewer independently reproduced the fresh-output, parallel,
+ removed-prerequisite, compiler-failure, cleanup and dry-run controls.
+ No remaining finding in the final Makefile blob above.
+
+The negative control must use a separate fixture's default Makefile: changing
+only a `make -f` parent would leave the recursive make reading the original file.
+
+The initial review found that directly executing the binary outside recursive
+make broke dry-run behavior. The final recipe invokes the ordinary test target,
+so recursive make carries the dry-run flag through both build and execution.
+
+## Verification boundary
+
+Full `make test`, complete library build, native-artifact and zero-CUDA gates
+were NOT_RUN locally in this source-bounded fixture. The draft PR's exact-head
+ARM64 CI is the full-repository gate; its result is reported separately.
+No simulator result or physical GPU result is claimed by this receipt.
+No device, driver, live service, installation or deployment was touched.
+No existing receipt was edited.
+
+The repository publication scanner's self-test passed: measured output
+`SELFTEST PASS: planted 17 ... found 17; binary listed`.
+The changed-file publication scan is recorded in the pull request.
diff --git a/evidence/QMD-CLEAN-OUTPUT-20261029 /host-checks.log b/evidence/QMD-CLEAN-OUTPUT-20261029 /host-checks.log
new file mode 100644
index 00000000 ..5dd6bd94
--- /dev/null
+++ b/evidence/QMD-CLEAN-OUTPUT-20261029 /host-checks.log
@@ -0,0 +1,71 @@
+## Same regression, missing prerequisite: expected failure
+$ make --no-print-directory test-gpu-qmd-shared-clean-build
+cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I./m16 -I./nvrm -I./third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I./third_party/nvidia-open-580.173.02/kernel-open/common/inc -I./third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I./third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -o /tmp/tmp.vlg5GHBeNs/new/test_omega_bw_qmd_shared tests/test_omega_bw_qmd_shared.c src/omega_blackwell_qmd.c
+tests/test_omega_bw_qmd_shared.c:80:1: fatal error: opening dependency file /tmp/tmp.vlg5GHBeNs/new/test_omega_bw_qmd_shared.d: No such file or directory
+ 80 | }
+ | ^
+compilation terminated.
+src/omega_blackwell_qmd.c:238:1: fatal error: opening dependency file /tmp/tmp.vlg5GHBeNs/new/test_omega_bw_qmd_shared.d: No such file or directory
+ 238 | }
+ | ^
+compilation terminated.
+make[1]: *** [Makefile:334: /tmp/tmp.vlg5GHBeNs/new/test_omega_bw_qmd_shared] Error 1
+make: *** [Makefile:341: test-gpu-qmd-shared-clean-build] Error 2
+exit=2
+
+## Serial regression
+$ make --no-print-directory test-gpu-qmd-shared-clean-build
+mkdir -p /tmp/cudapp-qmd-verify-6_c66ej5/tmp.IOaEFY16cI/new
+cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I./m16 -I./nvrm -I./third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I./third_party/nvidia-open-580.173.02/kernel-open/common/inc -I./third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I./third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -o /tmp/cudapp-qmd-verify-6_c66ej5/tmp.IOaEFY16cI/new/test_omega_bw_qmd_shared tests/test_omega_bw_qmd_shared.c src/omega_blackwell_qmd.c
+/tmp/cudapp-qmd-verify-6_c66ej5/tmp.IOaEFY16cI/new/test_omega_bw_qmd_shared
+word 36 default: shared7 8 min 9 max 26 target 9
+qmd shared: 112 checks, 0 failed: PASS
+exit=0
+
+## Parallel regression
+$ make --no-print-directory -j4 test-gpu-qmd-shared-clean-build
+mkdir -p /tmp/cudapp-qmd-verify-6_c66ej5/tmp.A9TZfZieIE/new
+cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I./m16 -I./nvrm -I./third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I./third_party/nvidia-open-580.173.02/kernel-open/common/inc -I./third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I./third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -o /tmp/cudapp-qmd-verify-6_c66ej5/tmp.A9TZfZieIE/new/test_omega_bw_qmd_shared tests/test_omega_bw_qmd_shared.c src/omega_blackwell_qmd.c
+/tmp/cudapp-qmd-verify-6_c66ej5/tmp.A9TZfZieIE/new/test_omega_bw_qmd_shared
+word 36 default: shared7 8 min 9 max 26 target 9
+qmd shared: 112 checks, 0 failed: PASS
+exit=0
+
+## Compiler failure propagates: expected failure
+$ make --no-print-directory test-gpu-qmd-shared-clean-build CC=false
+mkdir -p /tmp/cudapp-qmd-verify-6_c66ej5/tmp.HuuefpWIXC/new
+false -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I./m16 -I./nvrm -I./third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I./third_party/nvidia-open-580.173.02/kernel-open/common/inc -I./third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I./third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -o /tmp/cudapp-qmd-verify-6_c66ej5/tmp.HuuefpWIXC/new/test_omega_bw_qmd_shared tests/test_omega_bw_qmd_shared.c src/omega_blackwell_qmd.c
+make[1]: *** [Makefile:334: /tmp/cudapp-qmd-verify-6_c66ej5/tmp.HuuefpWIXC/new/test_omega_bw_qmd_shared] Error 1
+make: *** [Makefile:341: test-gpu-qmd-shared-clean-build] Error 2
+exit=2
+
+## mktemp failure propagates: expected failure
+$ make --no-print-directory test-gpu-qmd-shared-clean-build
+make: TMPDIR value /tmp/cudapp-qmd-verify-6_c66ej5/missing: No such file or directory
+make: using default temporary directory '/tmp'
+mktemp: failed to create directory via template ‘/tmp/cudapp-qmd-verify-6_c66ej5/missing/tmp.XXXXXXXXXX’: No such file or directory
+make: *** [Makefile:341: test-gpu-qmd-shared-clean-build] Error 1
+exit=2
+
+## Dry-run without execution
+$ make --no-print-directory -n test-gpu-qmd-shared-clean-build
+set -eu; out=$(mktemp -d); trap 'rm -rf "$out"' EXIT; \
+ make --no-print-directory OUT_DIR="$out/new" test-gpu-qmd-shared
+mkdir -p /tmp/cudapp-qmd-verify-6_c66ej5/tmp.RqS6AOhSBq/new
+cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I./m16 -I./nvrm -I./third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I./third_party/nvidia-open-580.173.02/kernel-open/common/inc -I./third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I./third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -o /tmp/cudapp-qmd-verify-6_c66ej5/tmp.RqS6AOhSBq/new/test_omega_bw_qmd_shared tests/test_omega_bw_qmd_shared.c src/omega_blackwell_qmd.c
+/tmp/cudapp-qmd-verify-6_c66ej5/tmp.RqS6AOhSBq/new/test_omega_bw_qmd_shared
+exit=0
+
+## Direct target with absent output directory
+$ make --no-print-directory OUT_DIR=/tmp/cudapp-qmd-verify-6_c66ej5/direct test-gpu-qmd-shared
+mkdir -p /tmp/cudapp-qmd-verify-6_c66ej5/direct
+cc -std=gnu11 -Wall -Wextra -Werror -MMD -MP -D_GNU_SOURCE -O2 -Isrc -I./m16 -I./nvrm -I./third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc -I./third_party/nvidia-open-580.173.02/kernel-open/common/inc -I./third_party/nvidia-open-580.173.02/kernel-open/nvidia-uvm -I./third_party/nvidia-open-580.173.02/src/nvidia/arch/nvalloc/unix/include -o /tmp/cudapp-qmd-verify-6_c66ej5/direct/test_omega_bw_qmd_shared tests/test_omega_bw_qmd_shared.c src/omega_blackwell_qmd.c
+/tmp/cudapp-qmd-verify-6_c66ej5/direct/test_omega_bw_qmd_shared
+word 36 default: shared7 8 min 9 max 26 target 9
+qmd shared: 112 checks, 0 failed: PASS
+exit=0
+
+## Diff whitespace
+$ git diff --check
+exit=0
+All expected outcomes and temporary cleanup controls verified.