Repository navigation
test: fix two stale tests that keep make verify-test red - #3720
Closed
Jaeyeong-CHOI wants to merge 1 commit into
Closed
Jaeyeong-CHOI wants to merge 1 commit into
Jaeyeong-CHOI wants to merge 1 commit into
Conversation
step3p7_parity::text_decode_delegates_sequence_local_native_batching was written against model-owned Step 3.5 state. lablup#3648 moved Step3p5Model to scheduler-owned layer state and enabled padded prefill, so the test failed first on `!supports_padded_prefill()` and then on the by-id forward, which a scheduler-owned family refuses. Assert that the wrapper's padded-prefill answer is its backbone's, as the neighbouring sequence_state_layout check does, and drive the by-id part through Pooled, the adapter lablup#3648 put the in-crate tests on, so the wrapper is exercised through forward_layer_state on pool layer state. nemotron_h_nano_omni_tests::pos_embed_resample_runs_in_f32 (lablup#3681) evaluates MLX arrays without holding mlx_test_guard(), which mlx_test_guard_coverage rejects (lablup#3660). Take the guard as its first statement. Refs lablup#3652
12 tasks
This was referenced Dec 3, 2026
Contributor
Author
|
Closing: both fixes are already on main. #3686 added |
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.
Summary
Refs #3652.
make verify-testonmainfails two platform-independent tests (nightly run 46937282079 at4d8a05c4; still failing atbeedecbb1). Both are test-only staleness left by recent merges, not product bugs, and this PR changes only the two tests.tests/step3p7_parity.rs:text_decode_delegates_sequence_local_native_batchingThe test was written against model-owned Step 3.5 state. #3648 (
00aa0a8dd) movedStep3p5Modelonto scheduler-ownedLayerStateand enabled padded prefill, andStep3p7VlModeldelegates both to its backbone. #3648 updated the in-crate tests (--lib) but not this integration test, which now fails twice in a row:assert!(!wrapper.supports_padded_prefill())fails, becauseStep3p5Model::supports_padded_prefillis nowkv_cache_layer_modes.supports_padded_prefill(..), true for the test's default KV mode.forward_with_embeddings_and_sequence_id(.., Some(id), ..)) panics withStep 3.5 state is scheduler-owned: sequence seq-0 must be forwarded through forward_layer_state with its pool layer state(refuse_scheduler_owned_sequence_id), which is the intended refusal for a scheduler-owned family.Changes:
assert_eq!(wrapper.supports_padded_prefill(), wrapper.backbone.supports_padded_prefill())), the same form as thesequence_state_layoutcheck below it. The test is about delegation, and the backbone's own value is already pinned for Step 3.5 insrc/models/sliding_window_layer_state_tests.rs.mlxcel::models::pooled_model::Pooled, the adapter refactor: move remaining sliding-window families to scheduler-owned state #3648 moved the in-crate model tests onto (mixed_cache_batched_decode_tests::contracts,vlm_mimo_v2_forward_tests). Its by-id calls resolve each sequence to pool layer state and call the wrapper'sforward_layer_state, and itssync_sequence_storagemirrors the layer lengths into the test's paged shadow. The rest of the test body is unchanged: it still checks that every paged shadow layer is non-empty after prefill and that the two-row native batched decode matches each row decoded alone (max abs error at most 1e-5). The capability checks above still run on the bare wrapper. The paged-shadow assertion message says "scheduler-owned" instead of "model-owned".src/vision/encoders/nemotron_h_nano_omni_tests.rs:pos_embed_resample_runs_in_f32Added by #3681, the test evaluates MLX arrays (through the file's
raw_byteshelper, which callsevalandarray_to_raw_bytes) without holding the MLX test guard, sotests/mlx_test_guard_coverage.rs(mlx_evaluating_lib_tests_take_mlx_test_guard, #3660) rejects it. The test now takeslet _guard = crate::models::embedding_test_support::mlx_test_guard();as its first statement.The file's other four tests stay without the guard. The scanner flags a test only when it reaches an eval or host-readback call (
EVAL_CALLS, directly or through a same-file helper) before taking the guard, and those four only build lazy graphs and read shapes (array_shape) or loader results.Checks
supports_padded_prefill()assertions (src/models/sliding_window_layer_state_tests.rs,src/vision/nemotron_h_nano_omni_vl_tests.rs,src/vision/unlimited_ocr_tests.rs,tests/vlm_wrapper_capability_delegation.rs) are unchanged and pass in the gate below. Among the integration tests that call the by-id entry points (forward_with_sequence_id,forward_with_embeddings_and_sequence_id,forward_batched_with_ids,prepare_sequence_state,sync_sequence_storage), the only other one that names a refactor: move remaining sliding-window families to scheduler-owned state #3648 family istests/pipeline_remote_real_models.rs. It drives pipeline stage runtimes (the GPT-OSS stage executor stays onCacheper refactor: move remaining sliding-window families to scheduler-owned state #3648), and its tests are#[ignore]d because they need real weights, so it is not changed or run here. The guard scanner reports no other test.Verification
NVIDIA GB10 (sm_121), CUDA 13, Rust 1.97.1,
--profile test-fast --features cuda.Before (
mainatbeedecbb1, and the same at517ede2d7):mlx_test_guard_coverage: 5 passed, 1 failed (mlx_evaluating_lib_tests_take_mlx_test_guard:src/vision/encoders/nemotron_h_nano_omni_tests.rs:276 pos_embed_resample_runs_in_f32).step3p7_parity: 7 passed, 1 failed (assertion failed: !wrapper.supports_padded_prefill()attests/step3p7_parity.rs:519).517ede2d7),step3p7_paritystill fails, now with the scheduler-owned refusal panic (src/models/model_owned.rs:179) quoted above.After (this branch):
mlx_test_guard_coverage: 6 passed, 0 failed.step3p7_parity: 8 passed, 0 failed.vlm_wrapper_capability_delegation: 3 passed, 0 failed.Related lib tests:
74 passed, 0 failed.
Gates on this branch:
cargo fmt --all -- --check: pass.cargo clippy --locked --workspace --all-targets --features cuda -- -D warnings: pass.python3 scripts/ci/check_used_by.pyandbash scripts/ci/check_used_by_test.sh: pass.make verify-test-cuda(cargo test --workspace --profile test-fast --features cuda --no-fail-fast -- --test-threads=1): exit 0, 207 test binaries, 18,880 passed, 0 failed, 567 ignored. The three tests above pass inside it:text_decode_delegates_sequence_local_native_batching,mlx_evaluating_lib_tests_take_mlx_test_guardandvision::encoders::nemotron_h_nano_omni::tests::pos_embed_resample_runs_in_f32.The branch is one commit on
beedecbb1and merges onto it without conflicts.Limits
Pooledrouting depends on the backend.cache::turbo::codebook::tests::device_boundary_indices_match_host_at_the_edges,cache::turbo::quant::device_tests::device_pack_handles_boundary_ties_and_extremesandmodels::gemma3::gemma3_tests::quantized_snapshot::a_truncated_quantized_restore_reproduces_a_cold_prefill_of_the_prefix. All three pass in the CUDA gate above, and they were not run on Metal here.