CI: isolate PR 2031 macOS unit-test reproduction - #17
Open
doraemonmj wants to merge 6 commits into
Open
Conversation
…w-native-sys#2018) The DeepSeek-V4 FLASH decode case is a completion smoke with no golden, yet the scene-test harness forced its 78 per-rank parameters through host memory: the fixture materialized 42.6 GiB per rank, _RehostedTaskArgs copied all of it into shm, --rounds cloned it again, and the runtime staged it H2D on every round. None of those bytes was ever checked. Both directories now drive an L3 Worker from their own main.py with a thin pytest wrapper beside it, and every per-rank parameter is one alloc_child_tensor buffer allocated before the first round: the runtime passes a device-resident tensor through without malloc, H2D staging or copy-back, so the same device memory backs every round. What goes into those buffers is the one knob, and it keeps the framework's flag shape: by default the fixture is streamed in one parameter at a time, and --skip-golden (store_true, as in pytest and run_module) uploads nothing. This case has no host-computable expected output, so its pytest wrapper passes skip_golden=True the way CASES[*]["skip_golden"] used to. num_tokens_per_owner stays host-backed because host_build_graph's orchestrator reads it with get_tensor_data to size a task's block count, and a child-memory tensor reaches the device without a host view. - simpler_setup/goldens/deepseek_v4_flash_decode.py splits into PARAM_SPECS (shape / dtype / rank fan-out, allocation-free) and a param_tensors generator holding one parameter at a time; its 159 arguments stay byte-identical to the previous fixture - scene_test's compile_chip_callable_spec, build_output_prefix and effective_diagnostic_options lose their underscore. conftest and the UT suite already imported them across modules, and a standalone case needs the same compile cache, the same artifact directory and the same rounds-versus-diagnostics rule as a scene test - the driver's diagnostic flags mirror the scene-test CLI name for name, including --dump-args' 0-3 level and --enable-pmu's bare-flag default, so the DFX tools' recipes carry over unchanged - the DeepSeek CI job warms its kernels through main.py --compile-only, since scene_test_compile only walks SceneTestCase classes - the hbg-bind-phases skill and doc take the dsv4 entry point, and their timeline recipe now reads the host log where a non-empty output_prefix actually puts it: outputs/<case>_<ts>/host.<pid>.log, not the run's stdout. Verified both modes on the standalone case: 12 binds parsed in numbers mode, 4186 phase records attached in timeline mode Measured on two a2a3 dies, both ranks outcome=0: the mode CI runs takes 1:53 wall and 1.35 GiB peak host RSS where the scene test took 299 s over a ~85 GiB fixture, three rounds cost the same as one, and the fixture mode peaks at 24.1 GiB instead. Bind phases are unchanged except that dsv4's args phase collapses from 1.48 s over 45.8 GB to 0.045-0.074 ms. A fresh child-memory allocation is not zeroed by anything, so under --skip-golden the parameters the device dereferences as indices carry whatever HBM held; a 1 MiB probe found 15 stale bytes. The case README records that group, and that uploading only its 127 MiB is the fix if a run ever trips over it.
Resolve the platform-default compiler paths once when callers leave CC and CXX unset, keeping ccache keys stable across packaging modes and nested runtime builds. Preserve complete and partial caller overrides. Report the resolved default toolchain and fail with a clear provisioning diagnostic when it is absent. Keep the workflow contract test explicit about its extraction markers and cover compiler selection and failure paths.
Host graph binding already retains caller buffers for host-visible entry tensors. Prefer those buffers over registering device allocations so large inputs do not create unnecessary SVM mappings. Leave pure output tensors unregistered because they have no valid bytes before execution, making both reads and writes fail closed. Treat platform mapping addresses independently from device addresses, and keep fallback writes synchronized to device memory. Read the BGEMM config through the tensor-access API, cover the address and write-back contracts with unit tests, and update the bind-phase docs for the mapping-free path.
Run only the existing macOS no-hardware unit-test lane so the two failing C++ tests can be reproduced without consuming unrelated CI jobs. Disable the docs pull-request trigger on this diagnostic branch.
Owner
Author
|
Diagnostic result: the isolated macOS UT job passed in 7m39s. Python UT and the full C++ UT suite both passed, so the two failures from hw-native-sys#2031 did not reproduce in this rerun. Run: https://github.com/doraemonmj/simpler_wc/actions/runs/33030181526 |
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.
Purpose
Notes
This is a diagnostic PR and must not be merged. The source change is the current hw-native-sys#2031 head plus one CI-only commit.
Local evidence