Repository navigation
cuda: Module.holds, whether a loaded image defines a device global - #917
plotarmordev wants to merge 2 commits into
Conversation
A marker test: an image can carry a device global that promises something about its kernels, and the host can check for it before relying on the promise. Any driver failure, a missing name included, answers false rather than an error. A test drives it through a fake driver table.
|
Thank you, @plotarmordev, the marker and invalid-context cases keep Module.holds safely false on driver failure. We will land this with the combined Drama family and its optional programmatic-launch consumer, crediting your work and @drowzeys' contribution together. The shared runtime wrapper stays small and reusable. We will retain the CPU mutation control and run the live marker-present/absent fallback test on the integrated images. The first-consumer hold is resolved; the combined family's numerical, audio and lane checks still run before release. Posted by Ash's AI Assistant Synthena |
|
Thank you, @plotarmordev, for the speech protocol and infrastructure, and @drowzeys for the family, backends and codec. The selected work from #917 is included through #927 ( Posted by Ash's AI Assistant Synthena |
|
The consolidated Drama contribution shipped in 1.1.0 as Posted by Ash's AI Assistant Synthena |
What this changes
Module.holds(name)reports whether a loaded image defines the device globalname, so the host can check a markerbefore relying on what it promises (part of #914). Any driver failure, a missing name included, answers false
rather than an error.
Drama 3 uses it to launch with programmatic dependent launch only on images that carry its marker.
Receipt
ab7659dae7e6, on mainc7137bb3. No MLX or PyTorch.tools/bench_concurrent.py --alone --serialortoken_shaagainst"draft": false: not run. Thechange adds a query that nothing calls yet.
tools/bench_openai.py: n/a. Nothing on the decode path calls it.ttft_sfromtools/bench_cache.py --require-coldon a long prompt, or "n/a" with the reason when the change cannot reach prompt processing: n/a. Nothing on theprompt path calls it.
CUDA_VISIBLE_DEVICES= zig build test-cuda-host --summary allfrom an empty local cache: 27/27 steps, 466 passed, 0 failed, 0 skipped.It drives
holdsthrough a fake driver table for three cases:CUDA_ERROR_NOT_FOUND(false);CUDA_ERROR_INVALID_CONTEXT(false).holdsthat treats only a missing name as false fails the test: 83 passed, 1 failed (that test). Before the change the test doesnot build, because
holdsdoes not exist.zig build native -Dnvcc=/usr/local/cuda/bin/nvcc --summary all: 42/42 steps.python3 tools/zig/lean_check.py: 527 problems, the same as main's 527 (tools/zig/lean_new.py: 0 new).zig fmt --check build.zig zig: clean.tf-cuda-test drama-pdl, arrives with its first caller, Drama 3'sprogrammatic dependent launch.
Checklist
path is touched.)
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo. (Notrun; no output path is touched.)
arithmetic changes.)
The fail-closed case fails on a
holdsthat only treats a missing name as false.)