Skip to content

release, install: a GB10 (DGX Spark) installs a prebuilt linux-aarch64-cuda-sm121a archive - #878

Merged
juliankang4 merged 4 commits into
midagedev:mainfrom
juliankang4:dgx-spark-q38-usab-spark-release
Oct 27, 2026
Merged

juliankang4 merged 4 commits into
midagedev:mainfrom
juliankang4:dgx-spark-q38-usab-spark-release

Conversation

@juliankang4

Copy link
Copy Markdown
Collaborator

DGX Spark(GB10)에서 설치 스크립트 한 줄로 미리 빌드된 release 파일을 받아 bloomery-serve -m <폴더>로 바로 띄울 수 있게 합니다. x86-64와 macOS의 설치 경로는 그대로입니다.

Part of #565.

What and why

A DGX Spark (GB10, Linux aarch64) builds bloomery from source today. This adds a release archive for it, bloomery-<v>-linux-aarch64-cuda-sm121a.tar.gz, and teaches the installer to pick it. After install.sh, bloomery-serve -m <folder> serves an FP4-Local checkpoint with no flags.

  • tools/release/build.sh picks the archive from uname -m. On aarch64 it builds sm_121a PTX (the arch tools/arch.sh already picks on a GB10) with -C target-cpu=gb10, and checks the ELF machine, the glibc floor, the needed libraries and the PTX. The glibc floor is 2.39 for this archive (DGX OS 7); the x86-64 archive keeps 2.34, its name, its sm_86 PTX and its checks.
  • tools/release/install.sh takes the GB10 archive on Linux aarch64 only when nvidia-smi lists at least one GPU and every GPU reports compute capability 12.1. A missing nvidia-smi, a failed or empty read and any other GPU are each refused by name, before the download. A release without the archive fails by name. --self-test covers the choice, including the exit code of each refusal, and tools/check-recipes.sh runs it.
  • tools/release/publish.sh verifies the GB10 archive on the GB10 that built it over plain ssh, the way it verifies the x86-64 one, then uploads it before the x86-64 .sha256. The Homebrew formula changes only if it already has a GB10 URL, and a URL with no GB10 archive in the release is refused. BLOOMERY_GB10_BOX names that GB10 and has a registry row.
  • Docs: README.md, docs/serving.md (Limits), docs/contrib/dgx-spark.md, the justfile comment and tools/release/README.release.md say where the GB10 archive applies.

To make the GB10 archive for a tag, run BLOOMERY_BOX_LOCAL=1 just release-build 0.3.10 on the GB10, then BLOOMERY_GB10_BOX=<gb10 host> tools/release/publish.sh 0.3.10.

Release notes: Added: a DGX Spark (GB10) installs a prebuilt linux-aarch64-cuda-sm121a archive with the release installer.

Code shape

  • No second copy. The x86-64 verification block in publish.sh became linux_archive, which x86-64 and the GB10 archive share. install.sh has one platform() for the choice. The release feature list in build.sh is still one line.
  • Model code holds only architecture facts. No model file changed.
  • Dead code is gone. Nothing was left unused.
  • No silent failure. Each undefined input is a named error: an unknown uname -m, another aarch64 GPU, a missing, failing or empty nvidia-smi, a release without the archive, a formula URL without an archive.
  • Comments state what is true now. No dates or issue numbers.
  • No relaxed gate. No band, tolerance or lint moved.
  • cargo fmt and cargo clippy on what I touched: the only Rust change is one registry row in crates/levers. I did not run cargo fmt or cargo clippy on this head.

Duplication found or removed (path:line): none. The duplicate scan reported no candidates.

What I ran

Head d0e0ab221155e32e3adecafa3be6980465bc0e98, base a87b49d963cf0ea8c6e4788106d25d7507e49f47. No gate that needs a GPU is touched; this change builds, installs and checks a binary, so the runs below are the evidence. The GB10 runs used the head before the last test-only edit (install.sh --self-test now matches the success case exactly); the archive selection code is the same.

On the GB10, build the archive:

$ BLOOMERY_BOX_LOCAL=1 just release-build 0.3.10
RELEASE-BUILD rc=0 seconds=494
release: bloomery-serve glibc_strong_max=2.39 needed=libgcc_s.so.1 libm.so.6 libc.so.6 ptx=[sm_121a ] bytes=62869240

The archive is bloomery-0.3.10-linux-aarch64-cuda-sm121a.tar.gz, 17609618 bytes, sha256 7428f4fa09ba6742ae0a63802586e8e4283b50c2f47f412a88ef48bf3884a048, and its binary reports bloomery-serve 0.3.10 (commit 31ad470e83ab). The only symbols above glibc 2.34 are pidfd_getpid and pidfd_spawnp, both GLIBC_2.39, from the Rust standard library's process code.

The installer's self-test, run on the GB10:

$ sh tools/release/install.sh --self-test
install.sh: self-test ok (12 cases)

The publish verification, run from a non-root account on the GB10 with ssh and scp replaced by local stubs (the real publish.sh needs a published release, so I did not run it end to end):

checks and --version ok on gb10
PUBLISH-GB10-VERIFY rc=0

Install the archive in a shell with no toolchain (cargo, rustc, nvcc, llc and ptxas all absent), under /bin/sh (dash), with an empty HOME and the real nvidia-smi. The only stub is a curl wrapper that maps the GitHub download URL to the local release folder, so the checksum check is the installer's own:

$ sh tools/release/install.sh --version v0.3.10
downloading https://github.com/midagedev/bloomery/releases/download/v0.3.10/bloomery-0.3.10-linux-aarch64-cuda-sm121a.tar.gz
try:       bloomery-serve -m PATH/Qwen3.8-Flash-Next-FP4-Local --port 8080
INSTALL rc=0

Serve with the installed binary and no flags beyond the model, host and port: bloomery-serve -m <folder> --host 127.0.0.1 --port 18741. The model is nvidia/Qwen3.8-Flash-Next-FP4-Local at revision b9ce18a6887e18c089fdea8509a33e63429a3300. Two /completion requests (n_predict 64, temperature 0) answered. A source build of the same head (SOURCE-BUILD rc=0 seconds=504) gave the same text for both requests:

installed up=1 after 80 s
source up=1 after 80 s
req1: installed == source
req2: installed == source
GREEDY-SAME=1

The x86-64 path, on an RTX 5090 machine (Linux x86_64, glibc 2.43), at an earlier head of this branch. Between that head and this one, install.sh changed only in the aarch64 choice, the self-test and the guidance printed after an install; build.sh did not change, and the x86-64 lines of the choice are the same. I built the archive on base and on that head with the same command, then installed each archive with each side's install.sh:

RELEASE-BUILD head rc=0 seconds=331
RELEASE-BUILD base rc=0 seconds=331
X86-ARCHIVE-FILES-SAME=1
X86-CHECKS-SAME=1
release: bloomery-serve glibc_strong_max=2.34 needed=libgcc_s.so.1 libm.so.6 libc.so.6 ld-linux-x86-64.so.2 ptx=[sm_86 ]
X86-INSTALL-SAME archive=head 1
X86-INSTALL-SAME archive=base 1

Both sides make bloomery-0.3.10-linux-x86_64-cuda-sm86.tar.gz with the same file list and the same checks. All four installs exit 0.

Not run: publish.sh end to end (it needs a published release and the GB10 over SSH), a macOS install (the macOS branches of install.sh are unchanged apart from the shared platform()), and cargo fmt and cargo clippy on this head.

Hardware

NVIDIA-SMI 595.84                 Driver Version: 595.84         CUDA Version: 13.3
|   0  NVIDIA GB10                    On  |   0000000F:01:00.0 Off |                  N/A |
NVIDIA GB10, 595.84, 12.1

Card for the x86-64 comparison:

NVIDIA GeForce RTX 5090, 595.99.02, 12.0

AI help

AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.

…a-sm121a, sm_121a PTX and host code for GB10's cores, checked for its ELF machine, glibc floor, libraries and PTX
…the GB10 archive; another aarch64 GPU is refused by name, and the choice has a self-test
@github-actions github-actions Bot added dgx-spark The DGX Spark (aarch64, GB10) port documentation Improvements or additions to documentation host Host crates: qdot, threads, engram, engram-lab, runtime, sampler, levers, decision, vision, refset tools Tools, recipes, CI and the toolchain: tools/, justfile, .github/, Cargo labels Oct 27, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: CLEAN: no failure path survived; the archive choice, the build checks and the publish flow hold on the inputs I built.

Non-blocking

⚠ The tap refusal comes after the upload: tools/release/publish.sh:174. When BLOOMERY_GB10_BOX is unset and the formula already names a GB10 url, the script uploads the release in step 4 and only then exits in step 5. The release is live and the tap is not bumped. The inputs for the check (GB10_BOX and the formula text) are known before step 4, so a check before the upload would fail with nothing published. A re-run is safe (--clobber), so this is not a must-fix.

⚠ One BLOOMERY_REMOTE for two machines: tools/release/publish.sh:49. linux_archive uses $REMOTE/target/release-dist on the x86-64 box and on the GB10. The GB10 build runs in the contributor's own tree (BLOOMERY_BOX_LOCAL=1), which may sit at another path than ~/repo/<name>. If the paths differ, cd fails and the error names the box, not the path. Question to the author: is the GB10 tree always at the same path? If not, the doc line in tools/release/README.release.md or the script header should say so.

⚠ install.sh usage text: tools/release/install.sh:25. The unknown-argument message lists --version and --prefix and not --self-test.

Checked

  • Duplicates: 6 new items checked (platform(), self_test(), linux_archive, bump, the BLOOMERY_GB10_BOX row, the platform case in build.sh), none duplicated. The x86-64 verify block became linux_archive, so the diff removes the copy it would have added. dryer: 0 pairs.
  • Complexity: crapper flagged nothing. platform() grew by one branch (aarch64) and holds the whole choice, one owner.
  • Silent failure: 7 sites followed (missing nvidia-smi, failed read, empty read, non-12.1 GPU, unknown uname -m, ELF machine mismatch, formula with a GB10 url and no GB10 archive). Each ends in a named error and a non-zero exit. The $(…) || fail and || exit 1 forms keep the exit code; no pipe hides one.
  • Tests: --self-test has 12 cases. Mutants checked in words: [ "$c" = 12.1 ] dropped, so 9.0 turns the case red; the loop cut to the first GPU, so "12.1 9.0" turns red; the empty-read guard dropped, so the "" case turns red. The self-test matches the exit code as well as the text.
  • Gates: no pin moved. GLIBC_FLOOR=2.39 is for a new archive, not a relaxed gate; the x86-64 floor stays 2.34.
  • Hot path: none (release scripts and docs). One registry row in crates/levers.
  • Escape catalog: C1 to C4 checked, none matched (no $? after a substitution, no heredoc written with backticks, no pgrep or pkill, no function named after its command).

Notes

  • Evidence in the PR body: the GB10 build, install and serve runs and the nvidia-smi lines are present. No just gate-* run is in it, and the PR touches no gate. publish.sh was not run end to end; the body says so.
  • The PR body says cargo fmt and cargo clippy were not run on the registry row. CI covers both.

🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)

@juliankang4

Copy link
Copy Markdown
Collaborator Author

The review is done and the contribution check passed, so I'm merging this.

@juliankang4
juliankang4 merged commit eef04ee into midagedev:main Oct 27, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dgx-spark The DGX Spark (aarch64, GB10) port documentation Improvements or additions to documentation host Host crates: qdot, threads, engram, engram-lab, runtime, sampler, levers, decision, vision, refset tools Tools, recipes, CI and the toolchain: tools/, justfile, .github/, Cargo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant