Repository navigation
Run Drama on macOS (PR #17 with the Mac-tested repair) - #21
Closed
plotarmordev wants to merge 4 commits into
Closed
plotarmordev wants to merge 4 commits into
plotarmordev wants to merge 4 commits into
Conversation
Adds a macOS path that leaves the GB10 path unchanged, and one engine patch that removes the repeated reference prefill from Drama 3 speech. - scripts/build-engine.sh: on Darwin, omit -Dnvcc (the option is only declared for the CUDA steps) and use shasum where sha256sum is absent. The Linux branch is the previous code. - recipe/pilot_macos.py: the guarded pilot without systemd. Same shared GPU lock, admission check, port check, DRAMA_PILOT_READY and evidence files; vm_stat replaces /proc/meminfo and process-group signals replace systemd-run. --host defaults to 0.0.0.0, --host 127.0.0.1 available. - recipe/README-macos.md: the macOS procedure, measurements and the voice cloning steps. - recipe/build_voice.py: builds a drama3-http-voice/1 catalog from an encoded reference clip and its transcript. - engine/patches/0012: the Metal host prefills a voice reference once per lane, snapshots the recurrent state and reuses it. Measured 3.59 s to 1.37 s first audio on a short line and 4.68 s to 2.41 s on a 454 character paragraph, with byte-identical audio. It stacks on 0005 and is proposed upstream once that lands. - engine/patches/SHA256SUMS and the patch table updated.
5 of 6 tasks
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description and motivation
Lands #17 (macOS support and Metal reference-prefill reuse) through the Mac-tested repair, so the recipe runs on
Apple silicon with the full model on Metal. The GB10/CUDA path is unchanged.
Credit:
e77d80a):recipe/pilot_macos.py,recipe/README-macos.md,recipe/build_voice.py, the Darwin branch ofscripts/build-engine.sh,bench/reference_cache_test.pyandengine patch 0012.
e77d80amust not merge as is (wrong audio afterA → default → A, about 61 MiB retained per voice switch, launcher defects):
review comment.
He then repaired it and retested it on a Mac:
repair comment,
submitted as Fix PR17: bounded reference cache and clean macOS lifecycle BobClawblaw/drama-tensorfold#1 (not merged there).
This branch is exactly jerryfane's tested repair head
f119696d1eca0aa53e91e1e7c2c141685e38c9fd, with nocommits added. It already merges current
main(844d0eab), so it is a fast-forward frommain, and it keepsboth authors' commits (
e77d80ais an ancestor). A normal merge therefore also brings in #17's head commit.Engine patches: adds
0012-feat-drama3-reuse-a-voice-reference-s-prefill-across.patch(one boundedreference-prefix snapshot per Metal lane, exact prompt-prefix identity including tower lookahead, invalidation
before default or different-prefix prefill and on errors; CUDA execution unchanged).
SHA256SUMSandengine/patches/README.mdare updated. Patch 0012 has no upstream TensorFold PR yet; the patch table lists it as"to be proposed".
Commits (
844d0eab..f119696):e77d80afeat: run the recipe on macOS and cache a voice reference's prefill (BobClawblaw)e9660d7fix: make macOS reference caching safe and bounded (jerryfane)d7dc8ecMerge current main while preserving the macOS full-model build path (jerryfane)f119696test: record real Metal cache and macOS lifecycle verification (jerryfane)Testing
The Metal results are jerryfane's Mac runs, not mine. They are in his
repair comment and in
results/macos-pr17-repair.json(on Mac: clean Metal build 66/66 steps; 48/48 paired corpus PCM capturesbyte-identical; voice/default/text transitions passed; streaming 9/9 checks in four runs; 0 KiB RSS spread over
eight warmed voice switches). I have no Mac and did not re-run any of it.
I re-ran only Linux/CPU checks at
f119696, on a GB10 host (aarch64 Linux, Zig 0.17.0, CUDA 13 nvcc), with noGPU work and no model downloads:
(cd engine/patches && sha256sum -c SHA256SUMS)python3 -m unittest discover -s recipe -p 'test_*.py'python3 -m unittest discover -s recipe -p test_pilot_macos.pypython3 -m unittest discover -s recipe -p test_build_voice.pypython3 bench/stream_check.py --self-test"self_test": "passed"scripts/build-engine.shfrom a clean checkout (ZIG=…/zig-0.17.0/zig NVCC=/usr/local/cuda/bin/nvcc)Build Summary: 102/102 steps succeeded; engined1018b3 + 12 patches = c265ca2fc4b9b54ba75b6780e110c566483c93d2844d0eab, 11 patches) gives881151ca8b83605c38a99f26fc8a94a92a6a51d7, which equals the PR build'sHEAD~1: 0001–0011 are unchangedzig build test -Dnvcc=/usr/local/cuda/bin/nvccinbuild/tensorfold(host tests,CUDA_VISIBLE_DEVICES=empty)215/215 steps succeeded; 3056/3070 tests passed (14 skipped)python3 tools/zig/test_speech_flags.py(built binary)python3 tools/zig/test_drama_prefill_compare.py844d0eab..f119696, plus over the full range diff (includes the merge commit)Built artifacts:
Not run by me:
PILOT_MACOS_INTEGRATION=1lifecycle smoke: needs macOS.bench/reference_cache_test.py, the corpus audio-identity gate and servedstream_check.py: they need arunning server with the model, and this change was checked without GPU work.
Performance or quality claim
None.
Checklist
SHA256SUMSandengine/patches/README.mdupdated
scripts/build-engine.shapplies the whole series and builds from a clean checkout (Linux/CUDA by me;macOS/Metal by jerryfane)
recipe/test_pilot_macos.py,recipe/test_build_voice.py; real-model checks are Mac-run by jerryfane)or commit messages: files, docs, evidence and commit messages are clean, but the author email on the three
repair commits carries the authoring machine's default local hostname. I left it because this PR lands
the exact tested head without rewriting commits.
compare_gate.pyreports"identical": trueandstream_check.pypasses:reported by jerryfane on Mac only (48/48 identical, streaming 9/9); not re-run on GB10
Evidence (only with a claim)
n/a: no claim.