Repository navigation
nemotron cuda: a host test counts the RADIO tower's passes in a lane prefill (follow-up to #1057) - #1109
Closed
plotarmordev wants to merge 2 commits into
Closed
nemotron cuda: a host test counts the RADIO tower's passes in a lane prefill (follow-up to #1057)#1109plotarmordev wants to merge 2 commits into
plotarmordev wants to merge 2 commits into
Conversation
…ot twice The merge of ashhart#897 and ashhart#938 put a `Vision.begin` where Bolt's branch set up its image rows, after the kept-prefix restore, and kept the one Super VL's images brought after the prompt-rows setup. The second ends the first pass and encodes every image again, so each image request ran the tower twice before its first chunk. The first call stays.
…prefill Vision.test_encode, a test-only hook like Head.test_network, stands in for the tower pass. A lane prefill with two images encodes each once; with the second Vision.begin ashhart#1057 removed, each went through twice. Release builds compile no hook.
Contributor
Author
|
Closing in favour of #1104, which adds the same encode hook on |
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.
What this changes
A follow-up to #1057, as invited there, on that branch's head:
Vision.test_encodeis a test-only hook on Nemotron's CUDAVision, shaped likeHead.test_networkincuda_mtp.zig. It stands in for the RADIO tower pass inVision.begin, so a host test can count encodes per request. The new test incuda_vision_test.zigrunsCuda.prefillFnfor a prompt with two images and checks that each image went through the tower once. With #1057's fix reverted, it finds each image encoded twice. Outside test builds the hook's type isvoidand its branch is comptime-false, so release code does not change.Receipt
CUDA_VISIBLE_DEVICES=for the host tests). No GPU work and no checkpoint.zig build native -Dsm=121 -Dnvcc=… -Dstrip=truewas built from this branch and from e2357b5, each in its own checkout. The two binaries are the same size and differ in 14 bytes, all of them inside one embedded fatbin's nvcc-generated_INTERNAL_<hash>_12_glm_quant_cunames. nvcc derives those names from the source path, and the two checkouts were at different paths.zig build native -Dsm=121 -Dnvcc=…(unstripped) also builds and links.tools/bench_concurrent.py --alone --serialortoken_shaagainst"draft": false: n/a. No served code changes, and the release builds above match outside nvcc's path-derived names.tools/bench_openai.py: n/a, for the same reason.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. The hook is compiled into test builds only.zig build test test-kernel-contract test-golden test-cuda-hostwith a fresh cache: 2456 of 2466 tests passed, 9 skipped and 1 failed. The failure wascortheon fuzz: every reader takes linear time on long inputs, a wall-clock bound in the server suite that this change does not reach. A second run passed it, and that binary's 428 of 428 tests passed.test-golden: 306/319 equal to the frozen answers, 0 unexpected differences.test-kernel-contract: every step passed.zig fmt --check build.zig zigandgit diff --check: clean.tools/zig/lean_check.py: 503 problems here and 503 on e2357b5, 0 new (tools/zig/lean_new.py).cuda_lanes.zigrestored to d46d17a (the secondbeginand itsdeferback),test-cuda-hostfails only the new test: it expected{ 1, 1 }encodes and found{ 2, 2 }.Visionis CUDA-only.reuse.restore's device copies, which this fixture does not fake.Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo. (No served code changes; the stripped release builds match outside nvcc's path-derived names.)SUMMARYline is in the receipt. (No kernel changed.)