Repository navigation
Conversation
|
Thanks @laudney. This gives every HIP family one host protocol, and it's a clean refactor. I applied it on #1940 over The families on main are unchanged:
Your receipts match that: equal greedy ids on Qwen3.5-9B and Nemotron, 65 of 65 GLM-OCR checks with all 62 hashes One small ask for the description: the lane host's The new |
|
Thanks @ashhart. I added the row to the description's first table:
All five HIP families on main set Second arch: this host has only gfx1201 devices, so I can't do a gfx1100 or gfx1151 run here. I'll add one if I get access to one. |
|
Thanks @laudney for adding the
A run on a second GPU architecture still isn't blocking. |
744752f to
b35a345
Compare
|
Rebased on main
2. How #1978's and #2046's families take the
The description's table now has these rows. Main's 3. Receipts on the rebased head (R9700, gfx1201, ROCm 10.1; main
Host checks: A second-arch run still isn't possible here (this host has only gfx1201). |
|
Thanks @laudney, all three points from our last comment are answered, and the table of how #1978's and #2046's families take the |
b35a345 to
a2cb1ff
Compare
|
Rebased on main
1. dots.mocr onto the
One difference, on purpose: with dots' cache off ( The rebase itself only joined lines: dots' records next to the family list (the pin is now 182 in all, 170 shared), and the import and test lines in 2. Receipts on the rebased head (R9700, gfx1201, ROCm 10.1; main
Host checks: I didn't run the other families again: this rebase changed no line on their paths since the receipts above in this thread. The description now has the dots rows, the new hashes and the commit list. |
Families that serve images need one way to hand the host their image offer, prompt cache and host settings, a way to turn a typed tower into an api.Vision, and a cancellation checkpoint on the lanes' own CancelCheck instead of new hook types. These helpers add that, defaulted so a family without them changes nothing.
The HIP host now reads one optional offer from a family's Loaded and copies its values into the lane host, takes a family refusal hook before any load or group join, lets a family read extra model types, and starts text-only with a log line when --vision meets a model without images. GLM-OCR moves its image tower, prompt cache and cache capacity into that offer and its --tp and --mtp-drafts refusals into the hook, so the host keeps one path; the text families declare none of these and get the empty offer and the same host values as before.
Two families that each add a kernel image no longer edit the same literal: the stub's image count now comes from the group list, and each group is a source with a `strict` flag that adds -O2 -fno-fast-math -fdenormal-fp-math=ieee after the common flags, so a family image can ask for IEEE arithmetic without touching the others. Every existing group keeps strict off, so its hipcc command is unchanged, and `compile` keeps its signature for the controls.
Family kernels need gates 1-4 with their own fixtures, so the runner gets a registration list (contract_families.zig, empty today, one entry a group) and `image <group> [smoke|full]`, which resolves the group's entry and its gate-5 records before any GPU access, runs the entry, then gate 5 on those records only, and exits 1 on a failed kernel, a missed control, a limit problem or a run with no kernel; the no-argument run also runs every entry and merges its tally. A pure selector (contract_select.zig) holds that logic with host tests, family records join hip_records.records from one list file, and the limits checks gain a variant over a given record slice.
The full run merged the family entries' tallies but judged them only as one sum, so an entry that ran no kernel could hide beside a clean one. Each entry now prints an ENTRY line and is judged on its own tally (failed kernels, missed controls, and one problem for an empty run); the full run adds those problems to today's and to gate 5, and with no entry registered its output and exit are unchanged.
The full contract ran each registered family's gates 1-4 without resolving its gate-5 record selection, so a family with missing or empty records could pass the default run while `image` refused it. The full run now validates every entry first, before any GPU access, and exits 2 with the reason, as `image` does.
GLM-OCR's pointwise and norm kernels ran inline in the full contract run, so `image glm_ocr` had no entry and the family list was empty. They now form GLM-OCR's entry, which opens its own runtime and runs the same 18 gate cases with the same seed, and its 12 gate-5 records move from the shared list into the family list. The full run still covers every kernel and all 167 records; `image glm_ocr` checks the family alone, and a test pins the 167 total and 155 shared records.
Main's Serves read text_generation, embeddings, decides, rerank, readouts and window from a family's Loaded field by field, beside the Offer this branch reads for images and caches, so the host had two probes for one question. The six fields move into hip_serve.Offer with the same defaults; Qwen3 returns its routes and window in its offer, Qwen3.5 its readouts, and hip_families.generates keeps main's rule that a family answering readouts generates no text. The Qwen3 module imports hip_serve, structures needs text generation and first_masked, and every family on main gets the values it had.
dots.mocr landed with two host hooks of its own, openVision and attach, so main had two paths again. Its open now reads --vision from the shared options and returns what attach set in Loaded.offer: the prompt cache and its capacity, warm turns, images, policy line, thinking budget, frame key and thread hook. The host drops both probes, and the device owner test passes hip_serve.Options. With the cache off, dots now hands the host no store, as GLM-OCR does.
|
Thanks @laudney. All three points from our last comment are in: dots.mocr is on the |
a2cb1ff to
29f4034
Compare
|
#2047 landed while the receipts above ran. It added a sixth field to main's
Qwen3.5 now carries an offer. Its other fields are the defaults, so it gets the host's window, policy, cache and thinking budget as before. Through Receipts on
Host checks: The description has the new hashes, the |
Part of #1927. This is the shared HIP-OCR plumbing that you asked for on #1965. It gives one host protocol for every native HIP family, so that #1941 and #1965 stop carrying their own copies. GLM-OCR (#1940) and dots.mocr (#1938), both on main, are converted in this PR, so main keeps one path.
@hasFieldonLoadedfor GLM-OCR'svision,cache,cache_capacity;Serves(#1978, #2047):text_generation,embeddings,decides,rerank,readouts(set: no text generation),window; and dots.mocr's (#1938) own hooks,openVision(the--visionlimits as an extra argument) andattach(writes cache, capacity, warm turns, images, policy, thinking budget, frame key and thread hook into the host afterLaneHost.init)hip_serve.OfferinLoaded.offer, with the same defaults;--visionreaches every family inhip_serve.Options.vision; no offer gives the empty one (text generation in the asked window)tp_refusal,mtp_refusal, arefusal(o)hook (dots.mocr), thenslide_refusal,confidence_refusalrefusal(o)hook first (GLM-OCR:--tp,--mtp-drafts; Qwen3:--tp; dots.mocr: unchanged; same texts and order, on every rank), then the shared ones (--rope-yarn, slide, confidence)also_model_typesaliases;api.Family.raw_textfromF.raw_textwhen declared--visionon a text family[tensorfold] --vision: the HIP engine has no image tower for <model_type>; serving text only, and image requests are refusedstructures).structures = text_generation.structures = offer.text_generation and first_masked != null, as the CUDA host checksfirst_masked. Qwen3 embedding and reranker: false on both (no text generation, and its backend has nofirst_masked); the five text families and dots.mocr: true on both (all setfirst_masked). A new text family must setfirst_masked, or the host refuses its structured requests up front instead of failing them at run time withStructuresUnsupported--prompt-cache-gib 0or--keep 0)attachhands the host the empty store;/statusshows a cache line with 0 statesOffer.cache's contract say;/statusshows no cache line. Replies are the same: the empty store kept and found nothinghip_serve.vision.offer(tower);hip_serve.cancel.polland.drainonlanes.stream.CancelCheck(synchronize, then poll; a null hook does neither)12Source{ .path, .strict = false };strictadds-O2 -fno-fast-math -fdenormal-fp-math=ieee; the stub count comes fromgroups.lencontract_families.zigentries;tf-hip-kernel-contract image <group> [smoke|full]; the no-argument run checks every entry's records first, then runs every entry; GLM-OCR is the first entryUnchanged for the families on main. Rebased on main
fbcb10a3f(main has moved since only by files this PR doesn't touch). All runs used one Radeon AI PRO R9700 (gfx1201) and ROCm 10.1, with mainfbcb10a3fand this PR's head29f40344b, both built from one worktree path.hip-kernel-contract-objects: 52 code objects (12 groups and the controls, for gfx1030, gfx1100, gfx1151 and gfx1201)tf-hip-kernel-contract(no argument)95 kernels: 95 pass gates 1-4, 0 fail, 2 known findings; 12 controls: 12 red as planted, 0 missed; 2 limit problemsENTRY glm_ocr: 18 kernels, 0 fail, 0 missedand by the first differing byte of the planted atomic-add control (red on both; it differs from run to run by design)tf_sum_partials,tf_sum_partials_act: gfx1201 compiles 21 and 22 VGPRs, the records say 23 and 24image glm_ocr full/smoke18 kernels: 18 pass gates 1-4, 0 fail; 0 limit problems; exit 0dots-studio/dots.mocr: the #1938 receipt driver (--vision --context 16384 --parallel 2; 26 checks)mlx-community/Qwen3.5-9B-4bit(itsLoadednow offersreadouts): greedy ids, 3 prompts at 1 stream, and the same 3 plus a repeat at 4 streamse419a57dfa7f/5d9afa7be90f/e910bc7c4265--visionon Qwen3.5-9Bthis server accepts text parts only; image, audio and video inputs are unsupported; no log lineCloudflare/clef-flashBF16 backbone (#2046),serveBF16 Qwen3.5 serves as a decision backbone only, …servetf-qwen35-test readoutsets a readout (#2047 wires a fake one; the head comes in #2048), so every served Qwen3.5 model reports nonereadouts(no text generation, the limits passed through)Rows from the rebase onto
ae9def8a5, whose code paths these rebases did not change: Nemotron 3.5 Lightning greedy ids equal at 1 and 4 streams; Qwen3-Embedding-8B vectors and Qwen3-Reranker-8B scores equal; GLM-OCR's #1940 driver 65 of 65 with equal token ids.Binaries: main
tensorfold-nativesha256a41ce64aaa48fe1f…, this PR9d80baff2d856dd5…; contract tool mainfbe4ee3cc9fd6d79…, this PR5241b6b2e054905e….Host checks:
zig fmt --check zig/src zig/tests zig/build build.zig;zig build test, without and with-Dhip=true -Dhip-arch=gfx1201;check-hip-kernel-contract-host,test-hip-contract-select-host,test-glm-ocr-native-host,test-hip-family-offers-host,test-hip-native-options-host,test-draft-hip-host,test-lane-api-host,test-qwen35-hip-host,test-hip-blas-host,test-qwen3-hip-host,test-rerank-host,test-embedding-lane-host,test-qwen35-bf16-contract-host,test-dots-native-host,test-dots-hip-host,test-dots-hip-weights-host,test-dots-hip-plan-fast,build-dots-hip-owner-test,build-dots-hip-cache-test,tf-dots-hip-check;tf-hip-kernel-contractandnative-hip -Doptimize=ReleaseFastbuilds; lean 425 problems, equal to main.Commits
08977a177hip_serve.Offer,hip_serve.vision.offer,hip_serve.cancel, with host testse2658b55fnative/hip_families.zig(reads,list,refused,offerOf,textOnly); the host reads the offer; GLM-OCR moves toLoaded.offerandrefusal(o), Qwen3 torefusal(o)74708d1b2Source{path, strict}groups and the derived stub count; no group is strict yet, so every command line is unchanged671a3baadcontract_entry.zig(types only, so the pure selector's host test imports no family code),contract_families.zig,contract_select.zig,image <group>, family records joined inhip_records_families.ziga6567f9e8,c5944b16bf7127c6ed1746f4c0dServesfolds intoOffer: Qwen3 returns its routes and window in.offer, Qwen3.5 itsreadouts;hip_families.generateskeeps main's rule that a family answering readouts generates no text; the Qwen3 module importship_serve29f40344bOffer: itsopenreads--visionfromhip_serve.Optionsand returns whatattachset in.offer; the host drops theopenVisionandattachprobes; the device owner test passeship_serve.OptionsHow the model PRs adopt it.
29f40344b). Its kernels stay in the no-argument contract run as on main; adots_mocrimage with animage dots_mocrentry can follow.offer;refusal(o); itsvision.hppkernels join theops/vision.hppthat #1938 added (one LayerNorm kernel if both round the same).offerwithhip_serve.vision.offer(lighton and qwen3_5);hip_serve.cancelinstead of its own cancel type;refusal(o); its contract modes becomeimageentriesOffer.warm_turns,frame_key,on_thread,policyandthinking_budgetnow have a user on main: dots.mocr.Source.strict,hip_serve.vision.offerandhip_serve.cancelhave no user on main yet; their first users are #1941 and #1965.Overlap. Other open PRs touch the same files: #1877, #1622 and #2087 (
hip_records.zig,contract_main.zig), #1886 (build/hip.zig,native/hip.zig), #2039 (alsoqwen3/native.zig), #2047 and #2048 (native/hip.zig), and the OCR PRs #1941 and #1965.