Repository navigation
[WS1][CUDA][MiniMax-H3] Follow-up to #699 / #700 / #701: round-3 review fixes and the run_world test doubles (RFC #420 follow-up) - #719
Conversation
…rerun provenance honest - fused_qkv refuses a ctx that evaluation_ctx did not make, instead of adding a cache to the caller's own ctx, where a later evaluation could read an earlier one's outputs. - A CUDA out-of-memory error while building the candidate ops propagates; only other RuntimeErrors there (e.g. missing kernels) are a CandidateBindingError. - The audit provider rerun passes no provider_nodes, so its trace names no diagnostic hybrid. Signed-off-by: Wenbo Ji <[email protected]>
…embedder-norm-out Signed-off-by: Wenbo Ji <[email protected]>
The projection rows now go through _cuda_row like time_embedder and norm_out. Their CUDA priority lists hold the CUDA op alone today, so nothing changes on a working build; a reference added to one of those lists later is refused instead of being bound and recorded as "row". Signed-off-by: Wenbo Ji <[email protected]>
RL-Align#701's ring commit d6459f4 added `with_collective` to h3_ws2._bootstrap and run_world passes it positionally, but the five doubles that replace _bootstrap in tests/distributed still took seven arguments. Every spawned double raised TypeError: test_run_world_reaps_workers[success/error/crash] and test_run_world_returns_rank_ordered_results failed on test-h3, and test_run_world_cleans_up_failed_workers passed only because a crashed worker also ends in RuntimeError (or the 1 s timeout fires first). The doubles now accept `with_collective`, and the cleanup test matches each mode's message, so a double that cannot be called fails it. Signed-off-by: Wenbo Ji <[email protected]>
…to fix/h3-ws2-test-doubles 424f627 (RL-Align#699) and 390ac69 (RL-Align#700) were committed after both PRs were merged into test-h3. 390ac69 sits on c738355, a merge of 424f627, so merging it brings both. Signed-off-by: Wenbo Ji <[email protected]>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 9 selected item(s). |
|
@fusheng-ji The automated OCR review has completed. Please review and address all automated review bot findings, then push your updates. Maintainers will begin manual review after the bot findings have been addressed. |
Follow-up to #699, #700 and #701, all merged into
test-h3. It contains two things those PRs left out.What
Four
tests/distributedtests fail ontest-h3since [WS2][CUDA][MiniMax-H3] ws2 full model: ring context parallel, CP weight gradients and the 50-block H3 on TP x CP x SP, bitwise against the single-GPU run (RFC #420 follow-up 3/3) #701; fixed here (2575e44c).d6459f49gaveh3_ws2._bootstrapan eighth argument,with_collective, andrun_worldpasses it by position. The five test doubles that replace_bootstrapstill took seven arguments, so each spawned double raisedTypeError.test_run_world_reaps_workers[success/error/crash]andtest_run_world_returns_rank_ordered_resultsfail.test_run_world_cleans_up_failed_workerspassed anyway: a crashed worker also ends inRuntimeError, and in the timeout case the 1 s timeout fires while the workers are still importing torch.tests/distributed.with_collective. The cleanup test now matches each mode's message, so a double that cannot be called fails it in theclean_exit,crashandreported_errorcases.The OpenCodeReview round-3 fixes for [WS1][CUDA][MiniMax-H3] Review follow-up for #568 / #570 / #571 / #574 and the strict full-model backward session (RFC #420 follow-up 1/3) #699 and [WS1][CUDA][MiniMax-H3] Strict full model binds time_embedder and norm_out to timestep_mlp_fp32 / final_adaln_out (RFC #420 follow-up 2/3) #700. They were committed after both PRs were merged, so
test-h3does not have them. They are merged here unchanged inba811b90:424f6279fused_qkvrefuses actxthatevaluation_ctxdid not make, instead of adding a cache to the caller'sctx. A CUDA out-of-memory error while building the candidate ops propagates instead of becoming aCandidateBindingError. The audit provider rerun names no diagnostic provider nodes.390ac695_cuda_rowliketime_embedderandnorm_out, so a reference op added to one of their CUDA lists later is refused instead of being recorded asrow.evaluation_ctx, and the projection rows' CUDA lists hold the CUDA op alone.390ac695sits onc7383555, a merge of424f6279, so one merge brings both.2575e44cwith_collective; the cleanup test matches messagesba811b90390ac695(with424f6279): the #699 / #700 round-3 fixesPrior art & reuse decision
There is no new operator, no new kernel and no runtime change. Both parts reuse what is already reviewed:
run_worldh3_ws2._bootstrapsignature of #701 (d6459f49); the doubles only acceptwith_collective424f6279and390ac695as reviewed on those PRs, merged unchangedDecision: adapt the tests and merge the reviewed fixes; nothing new to write.
Results (B200 / Blackwell)
Measured on 2 x NVIDIA B200 (sm100), driver 580.126.20, CUDA 13.0, torch 2.13.0+cu130, strict build and pinned
MiniMax-H3@42ed227weights where noted.test-h3(10552d82) against this branch, same environment for both trees.tests/distributed2575e44c)tests/models/minimax_h3ba811b90)tests/models/minimax_h3ba811b90)The chart and the table hold the same counts: the pytest summaries of the runs in Tests below. The
tests/distributedrow is at2575e44c, the commit that changes those tests; the twotests/models/minimax_h3rows are atba811b90.tests/distributed, only the four_bootstrapdouble tests, from failed to passed. The 6 extra passes intests/models/minimax_h3are the round-3 tests (see Tests).test-h3. Two are not H3: a ROCmOpBackendKeyErrorintest_rocm_attention_transport, and a call to the removedKernelRegistry.get_loss_op.test_h3_tp_adaln::test_nccl_byte_equal_to_ws1[2]failed allocating its CUDA IPC buffer on these shared GPUs (invalid argument), on rank 0 fortest-h3and on rank 1 here.clean_exit,crashandreported_errorcases now fail, andtest_run_world_returns_rank_ordered_resultsfails as before.test_h3_token_refiner.py::test_nodes_accuracy_repeat_batch_and_isolated[1-257]fails on both trees on B200 (itsswigluerror against the bound); it passes on H100.Results (H100 / Hopper)
Measured on 2 x NVIDIA H100 (sm90), driver 580.173.02, CUDA 13.0, torch 2.13.0+cu130, both trees at
ba811b90and10552d82with the strict build in place (_Cinside each worktree) and the same pinned weights. The two trees ran at the same time on separate nodes, two GPUs each.tests/distributedba811b90)tests/models/minimax_h3ba811b90)Logs, failure lists and their
comm:h100/.test-h3are exactly the four_bootstrapdouble tests; no test fails only on this branch.--tb=no).tests/models/minimax_h3: no failure on either tree, so[1-257]passes on H100. Of the same 1231 tests, H100 passes 2 more than B200:[1-257], and one test that skips on B200.Status
Current head
ba811b90. Ready for review. Run on 2 x B200 and 2 x H100 (Results).Tests
pytest tests/distributedtest-h3: 237 / 7 / 31); see Resultsba811b90(test-h3: 237 / 7 / 31); the same three fail on both treespytest tests/models/minimax_h3ba811b90(test-h3: 424 / 1). The 6 are the round-3 tests; the failure is the known[gather]timing case.pytest tests/models/minimax_h3ba811b90;test-h3tree: 1159 / 1 / 71. The difference is the round-3 tests:390ac695renames the time_embedder / norm_out refusal test totest_strict_refuses_the_reference_op_of_a_boundary_rowand adds three rows to it, and424f6279adds three tests. No other test changes. The one failure is the same on both:test_h3_token_refiner.py::test_nodes_accuracy_repeat_batch_and_isolated[1-257](B200swigluerror against its bound; it passes on H100, next row).ba811b90;test-h3tree: 1161 / 0 / 70. The difference is the same 6 round-3 tests;[1-257]passes on both trees.mypy --ignore-missing-imports rl_engine/test-h3pre-commiton the diffScope / Known limitations
2575e44c): the doubles and one assertion;run_worldis unchanged.Summary by CodeRabbit
Bug Fixes
Documentation