Repository navigation
cargo, tools: host CPU flags per target triple (S2, pin 87bc9518) - #36
Conversation
|
@avlp12 감사합니다. 확인하고 있습니다. 이 PR은 cuda-oxide pin을 옮기기 때문에, 박스의 backend를 그대로 다시 쓸 수 있는지부터 저희 쪽에서 확인합니다. 그다음 착지 train에서 gate를 돌리겠습니다. |
|
Review done: the pin move is one fork commit in |
…t the pinned rev (midagedev#36 review) — a cargo-oxide older than 87bc9518 reads only the top-level extra-rustflags and ignores the [target.<triple>] tables without a word, so with this branch's .cargo/cuda-oxide.toml it would build the host code without znver3 and -sse4a while every check stays green. A command that builds with cargo-oxide (one that names `cargo oxide`, `gate.sh --oxide` or `release/build.sh`, once any `release/build.sh --check`, which only reads built binaries, is taken out of it, so a build chained after a --check is still checked) now reads `cargo install --list` on the box, after the BLOOMERY_BOX_ENV exports so a CARGO_HOME or PATH set there is the one checked, and goes on only when its cargo-oxide line names the pin's rev (`...?rev=<rev>#<short>`); any other rev, or an install with no rev (a path install), stops with rc 70 naming the installed rev, the pin and the reinstall line in docs/BUILD.md. Other commands are unchanged. card-tests: the remote command of each of the three forms carries the check, after a BLOOMERY_BOX_ENV CARGO_HOME, and so does a --check chained with a build; a plain cargo call and a lone `release/build.sh --check` do not; the check run against a stub `cargo install --list` passes the pin and refuses 4da6c138 and a path install. FAIL-first: with the old box.sh the presence check and both refusals were red (the pin case passed) Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Thank you. I added the check in e4049ec.
|
|
Thank you. I am checking e4049ec now. It lands after the box's cargo-oxide is reinstalled at 87bc9518. |
… and decision share one expansion serve::media::expand_spans (each placeholder run of the prompt ids expanded to its image's token count, a placeholder carried in text refused by name) moves with Expanded and ExpandError to crates/vision/src/media.rs, the model-generic owner beside MediaModel, so the decision crate can call it without a serve dependency. serve calls it and maps ExpandError into MediaError. A move: serve's gates unchanged and green. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… as the release does (vision R4c-b) - request: images in llama.cpp's order (the request's `images`, then the state's image_url parts), each a data URL, at most 8; the state comes back without those parts. videos stays 501, a non-data URL and a ninth image stay 400. The request is valid with images; encode and the label model refuse them by name (NotSupported, llama.cpp's hint), so today's seats answer as before. - encode_media(tok, req, &dyn MediaModel, counts, max): the media piece is the placeholders and a "\n" tokenized in one call, each pad run expanded to its image's count through vision::media::expand_spans; Encoded.image_spans names them; fixed counts the media ids; a placeholder in text and media ids past the context are refused by name. - gate-decision-clef: hw_clef_image_ids_equal_the_release — every set D request's input_ids equal the release's, list for list (6 of 6). Set D (images.jsonl) states no identity, so this clause reads it raw beside the same run's reference.jsonl (its revision equals clefvis.sh's, its ids equal) — a substitute for a family check until the writer states one. FAIL-first: D3 (no "\n" after the last image) red on the box at c1 234, c2 1108, c3 234, i640 338, i1024 806; D1 and D2 red in host tests (set D has no state image part to catch them). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ile, from the listing or the verified cache Co-Authored-By: Claude Opus 5.5 <[email protected]>
…eat flags and projector, the encoder reserve in the whole-fit verdict (qwen35_open::open_seated), Body35's media hidden call, the image refusals by name Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s with the encoder, 501 with llama.cpp's hint without it, the image 400s, the --hf projector pick Co-Authored-By: Claude Opus 5.5 <[email protected]>
… open_tower open a seat's projector and tower for any serve seat, merged_cells and Flags::wanted beside them (span_rows loses its rows_of parameter); image_plan holds the plan's side of an image input free of the encoder crates (the tower's reserve on the stage card, the refusal that names it, the rotation table's bytes per position) so every build's placement can take it; ds41's seat opens through them Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nd prefill_media in serve_seats/qwen3, the tower's reserve and the rotation tables in qwen3moe's placed plan and whole fit (each named in the ctx and whole-fit lines), the &VISION record; gate_qwen3_serve's --images clauses: set E prompt ids, set F chat inside the CUDA/CPU agreeing prefix with a first divergence only at a near tie (PIN F_NEAR_TIE 0.1), an image slot beside a text slot, the refusals and the plan's reserve, each FAIL-first by its own mutant Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ion_seat::open_seat takes the file the seat resolved (the decide seat's --hf pick), open_tower, merged_cells; the whole-fit line's encoder note has one owner, image_plan::note Co-Authored-By: Claude Opus 5.5 <[email protected]>
…the gates that reach it, the Qwen3.6 image clause's plan budget has its defaults twin, rustfmt Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
This goes into tonight's 0.3.0 train with #38. e4049ec conflicts with #38's local mode in tools/box.sh, so I resolved it in the train: both blocks stay, and the cargo-oxide check runs in local mode too ( |
…is tree on a contributor's machine with a card of its own - docs/contrib/local-check.md rows 1, 3, 4, 5 and 7. No ssh and no rsync: bash runs the same command line in this tree, guard and profile and exports included. The environment file is BLOOMERY_ENV_FILE (default ~/bloomery-env.sh; missing: 69). Refused (64) on a host that is not Linux, with BLOOMERY_BOX_QUEUE=1, and where /root/bloomery-cpu.lock exists. - BLOOMERY_LOCK_DIR (tools/ref/lease-probe.sh's LOCK_DIR, /root when unset) holds the timing lease, the holds, the gate locks, the V4.1 load lock and queue and the batch hold. Local mode defaults it to ~/.cache/bloomery/locks and makes it. It refuses (64) a relative path, which two trees would read apart, and /root however it is spelled, where its guard would make the box's lease file; an environment file or BLOOMERY_BOX_ENV that moves it after the guard is refused (64), and so is an environment file's BLOOMERY_ARCH other than the one the recipe expanded. lease-probe.sh's holds glob and give-way check and gpu-gate.sh's lock descriptors take the path whole, so a path with a space or a ; works. - lease-probe.sh owns the box's mark: on_box (/root/bloomery-cpu.lock exists) and box_lock_dir (a directory that is /root). box.sh, gpu-gate.sh and lease_take read them. - gpu-gate.sh: BLOOMERY_BOX_CARD=local takes one lock, bloomery-gate-local.lock, for what the machine shows, and leaves CUDA_VISIBLE_DEVICES as it finds it; its lock directory is never /root (64). `both` in BLOOMERY_CARD or BLOOMERY_GATE_CARD is refused (64); a held lease is waited for as the lock is. On the box, BLOOMERY_BOX_CARD=local and a BLOOMERY_LOCK_DIR other than /root are refused (64), as lease_take refuses another lease file there. - CUDA_OXIDE_BACKEND is unset after the environment file (row 7), so cargo oxide builds and keeps its own backend (no rc 70 check). BLOOMERY_REMOTE adds no CARGO_BUILD_JOBS. - The command runs without the variables box.sh reads on this side (BLOOMERY_MODEL above all: the model crate's tests read it as a model path), without box.sh's own outputs (BLOOMERY_REF_MODEL_PROFILE, the fixture tier's BLOOMERY_CARD_BUDGET and BLOOMERY_FIXTURE_MODEL) and without the lease's file names, as over ssh. - box-gc.sh refuses (64) local mode: its root is then the contributor's tree, whose binaries are their own runs. - Unset or 0 leaves the ssh, rsync and queue arguments box.sh builds byte-identical, direct and queued. - card-tests: the local mode cases, the lock directory (two holds' give-way under a path with a space among them), the refusals, LOCAL=0 against unset, and on the box gpu-gate.sh's box refusals; the helpers drop the new variables a caller in local mode would pass. gpu-gate.sh --self-test: the local lock, the V4.1 load lock, a held lease. FAIL-first: against main's box.sh, gpu-gate.sh, lease-probe.sh, lease.sh and box-gc.sh, 27 card tests are red. With gpu-gate.sh's local arm removed the self-test's six local cases are red, and with take_local not reading the lease its lease case is red. On a stand-in for the box (a root container where /root/bloomery-cpu.lock exists), removing gpu-gate.sh's box refusal turns its two card tests red.
…ERY_BOX_CARD=local): timing-card.sh times the one card nvidia-smi lists by UUID, the lease and its trace sit in BLOOMERY_LOCK_DIR, the witness prints the card, its Xid count, the shared memory pool and the machine, and depth-qwen3moe.sh fails an arm on an Xid or a lost card FAIL-first: against the local mode commit's timing-card.sh, lease.sh, arm-place.sh, depth-qwen3moe.sh and lcpp-warm.sh, 18 card tests are red on a Mac (the same 18 of 583 on Linux): 17 of the 18 local mode cases (the 18th, an arm on a card that answers, is a control) and lease_take's machine lease under BLOOMERY_LOCK_DIR. With lease.sh's local label and its trace path in the lock directory removed, the lease self-test's tag-local-busy and trace-file-lock-dir are red. Against the local mode commit's runner the stub suite's local, local-xid and local-twocard cases are red (3 of 69, on Linux). With the journal check reading its stderr with its stdout, the case of a journal that only warns on stderr is red; with the local refusal tagged [timing-cards], its tag case is red. The pool line's fields are pinned by the stub suite's local case alone (with the earlier pool line, 1 of 69 is red on Linux); the bound on the UUID query and the journal check's skip for root have no test that can see them.
…ork's cargo-oxide (87bc9518, merged on bloomery) reads `[target.<triple>] extra-rustflags`, so .cargo/cuda-oxide.toml carries znver3 (with -sse4a) for x86_64-unknown-linux-gnu only and target-cpu=native for aarch64-unknown-linux-gnu, and .cargo/config.toml takes the same aarch64 table; the flat znver3 reached aarch64 builds, where rustc warned on every crate and crashed in LLVM on glob and regex-syntax. check-rustflags reads each list's codegen options in every spelling rustc takes (-C x, -Cx, --codegen, target_cpu for target-cpu), holds each triple's two lists equal, x86_64 to znver3 and -sse4a, aarch64 to an aarch64 CPU name (native, generic, cortex-*, neoverse-*, apple-*) and no target-feature, and refuses a top-level CPU flag; its twelve cases (the old flat list and its joined spelling, znver3 or haswell or an x86 feature or the target_cpu spelling on aarch64, a missing side, ...) run red on every call. The x86_64 flags an oxide build gets with --target x86_64-unknown-linux-gnu are byte-identical to the flat list's. The [patch] pin moves 4da6c138 -> 87bc9518 (pin/4da6c138 is tagged); 87bc9518 differs from 4da6c138 only in crates/cargo-oxide, so the backend crates are untouched Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…t the pinned rev (midagedev#36 review) — a cargo-oxide older than 87bc9518 reads only the top-level extra-rustflags and ignores the [target.<triple>] tables without a word, so with this branch's .cargo/cuda-oxide.toml it would build the host code without znver3 and -sse4a while every check stays green. A command that builds with cargo-oxide (one that names `cargo oxide`, `gate.sh --oxide` or `release/build.sh`, once any `release/build.sh --check`, which only reads built binaries, is taken out of it, so a build chained after a --check is still checked) now reads `cargo install --list` on the box, after the BLOOMERY_BOX_ENV exports so a CARGO_HOME or PATH set there is the one checked, and goes on only when its cargo-oxide line names the pin's rev (`...?rev=<rev>#<short>`); any other rev, or an install with no rev (a path install), stops with rc 70 naming the installed rev, the pin and the reinstall line in docs/BUILD.md. Other commands are unchanged. card-tests: the remote command of each of the three forms carries the check, after a BLOOMERY_BOX_ENV CARGO_HOME, and so does a --check chained with a build; a plain cargo call and a lone `release/build.sh --check` do not; the check run against a stub `cargo install --list` passes the pin and refuses 4da6c138 and a path install. FAIL-first: with the old box.sh the presence check and both refusals were red (the pin case passed) Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
e4049ec to
9fa36f5
Compare
|
This branch now points at its commit in the 0.3.0 release train. One conflict with #38 in tools/box.sh (the remote command line) is resolved there, and the card-tests local-mode case uses a stub cargo-oxide at the pin. It lands with the release tonight. |
…s what its earlier commits earned A merged pull request is labelled from its merge commit against that commit's first parent. A rebase merge, the only kind this repository's merge button allows, has no merge commit: merge_commit_sha is the pull request's last commit, so the diff covers that commit alone, and the labels its open runs put on for the earlier commits came off at the merge. A merge now adds labels and removes none. Walking back the pull request's commits does not fix the diff: a stack pushed at once (#27, #36, #38, #39) lists every commit below it, so each would take the whole stack's labels.
Requested by Alis
What and why
On aarch64 (DGX Spark) the flat
extra-rustflags = ["-C", "target-cpu=znver3", ...]reached everycargo oxidebuild. There rustc warns on every crate that znver3 is not a processor, and on some crates it crashes inside LLVM, so a Spark owner had to edit the local.cargo/cuda-oxide.toml. The fork's cargo-oxide now reads[target.<triple>] extra-rustflags(midagedev/cuda-oxide#1, merged as87bc9518). This PR moves the[patch]pin there and splits the flags by triple:x86_64-unknown-linux-gnukeepsznver3and-sse4a;aarch64-unknown-linux-gnugetstarget-cpu=native.This is S2 of
docs/contrib/dgx-spark.md, as asked in #13.Code shape
No second copy. Each triple's list is held equal between
.cargo/config.toml(plaincargo) and.cargo/cuda-oxide.toml(cargo oxide) bytools/check-rustflags.sh, as the flat list was.Model code holds only architecture facts. No Rust code changes.
Dead code is gone.
No silent failure.
check-rustflags.shreads the codegen options in every spelling rustc takes (-C x,-Cx,--codegen x,--codegen=x, andtarget_cpufortarget-cpu). It refuses:target-cpuoutside an allowlist (native,generic, or acortex-,neoverse-orapple-prefix; the prefix is not checked further), and anytarget-feature;It runs its twelve red-and-green cases on every call (
--self-testprints them).Comments state what is true now.
No relaxed gate. The x86_64 list is unchanged.
cargo fmtandcargo clippy: no Rust touched.Duplication found or removed (
path:line): none.Changed:
Cargo.tomlandCargo.lockmove the[patch]rev from4da6c138to87bc9518(pin/4da6c138is tagged on the fork).87bc9518differs from4da6c138only incuda-oxide/crates/cargo-oxide, so I expect the backend crates' closure to be unchanged and the previous backend to be reusable. That reuse is your call under the pin-move rule.cargo-oxidemust be rebuilt from87bc9518(thecargo install ... --revline indocs/BUILD.md) before the next oxide build. Acargo-oxidefrom4da6c138ignores[target.*]tables without an error, and the new.cargo/cuda-oxide.tomlhas no top-level list. So an old binary would build the x86 host code withoutznver3and-sse4a, and nothing would say so. Nothing in the tree checks the installed cargo-oxide's rev today; I can add that guard in a follow-up if you want it..cargo/cuda-oxide.tomland.cargo/config.tomlhold the per-triple tables.tools/check-rustflags.shis rewritten as described above.docs/BUILD.md("The CPU flag" and thecargo install ... --revline),docs/cuda-oxide.md,AGENTS.md, the S2 rows ofdocs/contrib/dgx-spark.md, row 32 ofdocs/upstream/nvlabs-ledger.md, row 8 ofdocs/contrib/local-check.mdandTHIRD_PARTY_NOTICES.md.docs/BUILD.mdalso says the installedcargo-oxidemust be the pinned rev.What I ran
On a Mac:
The branch is on
mainatdc49ae45; the one conflict, the S2/S3 rows ofdocs/contrib/dgx-spark.md, keeps main's S3 row and this PR's S2 row.On two DGX Sparks: GB10, DGX OS 7.6.0, driver 580.178.04, nightly-2026-08-28. These runs were with the fork's first commit for this change;
87bc9518adds thehost-tupleand compiler-probe follow-up on top of it. Build only, no model:cargo test -p cargo-oxidepassed with 0 failures: 252 tests on the first commit on both Sparks, and 255 with the follow-up on one of them.87bc9518differs from the follow-up that ran only in comments and README text.target-cpu=znver3, glob and regex-syntax crash rustc with SIGSEGV. Withnative, the same crates build clean.nvidia/cuda:13.3.1-devel-ubuntu24.04, with the[patch]rev kept at the public4da6c138and the patched cargo-oxide installed.cargo oxide build --arch sm_86 -- -p bloomery-gpu-gates --features gpu --release --bin generate_qwen3moebuilt the binary. All 124 rustc invocations carried-C target-cpu=native(the log's otherRunninglines are 20 build-script runs and the cargo command itself), none carried znver3, and nothing crashed.Not run: the x86 identity check (the flag list and
just ptx-scanofgenerate_ds41andgate_e2e) and any box gate. You said on #13 that you would run those.Hardware (if the change is for a machine)
DGX Spark (GB10, aarch64, 128 GB, driver 580.178.04, DGX OS 7.6.0), two units, build only. The x86_64 side is unchanged.
🤖 Generated with Claude Code