Repository navigation
Document the Cloud Agent host build - #195
Conversation
The VM is x86_64, the sources need an aarch64 compiler and qemu-user, and MemAvailable under-reports, so the notes say where the pinned omc, bridge, and nvdisasm sit and why make sets CUDAPP_MEM_RESERVE_MIB=0. Co-authored-by: Drake Stapleton <[email protected]>
drakestapleton
left a comment
There was a problem hiding this comment.
Review of #195 at ef64e43. Classification: needs-changes (wording only; correct for main today, wrong once #192 lands).
1. Docs only: yes. One file is changed: AGENTS.md (+16/-0), a new "Cursor Cloud specific instructions" section added after L92. There are no build files, scripts, CI or code changes. The /usr/local/bin/make wrapper and the cross cc/gcc live on the VM image, outside the repo.
2. Overlap with #192 (6235ac1).
- File: #192 also edits
AGENTS.md, but only the hunk at L37-55. #195 appends after L92, so I expect no textual conflict. Neither PR changes the Makefile in a way that touches the other. - Reserve text: consistent. Both keep the 4096 default and use
CUDAPP_MEM_RESERVE_MIB=0only on this VM, and #195 adds "Do not copy that0onto a Spark". No contradiction. - Contradictions after #192 merges:
- Hazard: on this VM,
/usr/local/bin/gccis the aarch64 cross compiler, so after #192 a plainmakeon the Cloud VM still cross-builds aarch64 under qemu instead of exercising #192's x86-64 portable path. The section should say which suite the VM actually runs, or pointCCat/usr/bin/gccfor the x86-64 portable check. - #192's x86-64 evidence used
make CC=gcc. Whichgccthat resolved to should be stated if it came from a VM with this image.
3. Overlap with #194 (458a448) and issue #193. No shared files. #194 adds test-gpu-imadhi-rc and test-dagsim to HOST_TESTS; #195 does not list targets, so it stays valid. #193 is an issue and nothing in #195 touches it.
4. Overlap with EL1 el/dra23-canonical-provenance. The branch is not visible (compare main...branch returns 404). The board's declared files are tools/canonical_provenance.om, tests/provenance/, evidence/CUDAPP-DRA23-PROVENANCE/ and a Makefile test-provenance target. None of these is AGENTS.md, so there is no overlap.
5. Build steps against the repo.
- These match at head ef64e43 (same Makefile as main 78fea51):
OMEGA_MV ?= ../omega-mv,OMEGA_OMC ?= $(OMEGA_MV)/seed/out/omcandOMEGA_BRIDGE_DIR ?= ../omega-bridge(mk/om-encoder.mk L18-21).om/omega-bridge.lock=0c4cb9ff980af278890b231b994eaede4dc7621c, which matches the text.- The
make test,test-gpu-serving-alloc,doctor,hello-gpuandzero-cuda-gatetargets and the PASS-line wording match AGENTS.md L37+.
- Not cross-checked against a repo pin: omega-mv
e5b32567, the omc sha2562c824805…and nvdisasm 13.0.85. Please cite where each is pinned (lock file or CI step), or label it as this VM's observed value. - At #192: the
CCand gcc statements become wrong (see 2).
6. Hardware. GB10 is NOT_RUN, and the PR says so. Nothing ran on the Spark. make doctor NOT READY and hello_gpu --sim are host/simulator results only.
CI at ef64e43:
driftfails, and docs-only cannot cause that. This is consistent with the upstream drift already failing on main 78fea51.host-testsandAnalyze (c-cpp)were still running when I checked.- All other checks pass, and CodeQL is neutral.
Merge order: #194 → #192 (rebased; HOST_TESTS conflict) → #195, rebased last with the gcc/CC lines updated for #192's x86-64 behaviour.
— Grokbot
A fresh agent from the draft build had no /tmp/cursor/start-user directory, so aarch64 binaries failed with Exec format error until binfmt was registered. The first make now does that registration. Co-authored-by: Drake Stapleton <[email protected]>
… binding); recompile stale crumbs
# Conflicts: # om/moe/.crumb # tools/extract/.crumb
Purpose and scope
Cloud Agent VMs are x86_64. CUDA++ host code uses the ARM
dsb sybarrier, so the notes inAGENTS.mdsay how this VM builds and runs the host suite: aarch64cc/gccon/usr/local/bin, qemu-user for the binaries, pinned../omega-mvand../omega-bridge, andnvdisasm13.0.85. They also say why/usr/local/bin/makesetsCUDAPP_MEM_RESERVE_MIB=0here, and thatmake doctoris expected to print NOT READY./usr/local/bin/makealso registers qemu-user if the bootstarthook did not. A fresh agent booted from the first draft build had no/tmp/cursor/start-user/directory, and an aarch64 binary exited 126 (Exec format error) until binfmt was registered.No product source, encoder, or runtime behavior changes.
Evidence on the exact commit
Host checks below ran on parent
78fea51(these commits only addAGENTS.md). Machine: Linux x86_64, crossaarch64-linux-gnu-gcc13.3.0, qemu-aarch64 8.2.2.uname -min the shell is x86_64. Built binaries are aarch64 and run through qemu-user.make test(host-only). Not one uninterrupted process. The firstmake teststopped attest-gpu-serving-alloc(exit 2): MemAvailable was under the default 4 GiB reserve, so the Qwen-shaped upload was refused. Targets before that stop had passed. WithCUDAPP_MEM_RESERVE_MIB=0, that target and every laterHOST_TESTStarget were run again andmakeexited 0. That second run includes the 2^32 bf16 sweep,test-om-units, portable receipts,test-model-capacity,test-native-artifact, andzero-cuda-gate.make test-native-artifact(host-only), inside the second run (native_artifact_manifest: 70 checks, 0 failed).make zero-cuda-gate(ELF audit and negative control), inside the second run.ZERO_CUDA PASSforbuild/hello_gpuandbuild/gpu_matmul_api_test.build/hello_gpu --sim(simulator only). PASS, 1048576 elements, 0 wrong. Machine-code sha2569e28bd9c46f80584d77238a752e99cecddbc8d622ffbe320885ed2f499e1f075.make doctor(diagnostic). NOT READY, exit 1: no NVIDIA module and no/dev/nvidia*.test-doctorreporteddoctor tests: 9 passed, 0 failed.python3 tools/figures/make_figures.py --checkprintedfigures current: 10.After removing the qemu binfmt entry,
/tmp/aa-hello3exited 126.make -f -then printedreserve=0, the interpreter was/usr/local/libexec/qemu-aarch64-sysroot, and the same binary exited 9.Correctness, compatibility and provenance
CUDAPP_MEM_RESERVE_MIB=0onto a Spark. The platform test still unsets the variable and checks the 4096 default.nvdisasmand the pinnedomcstay outside the repository.Known limitations
make testwas not a single process from the first target through the PASS line. The bf16 sweep under qemu is on the order of an hour. Chip tests were not run. A fresh agent from the first draft build did not runstart; the make wrapper is the fallback that was checked locally.