Repository navigation
dgx-spark: P0, the host crates and the engine build on aarch64 (design R) - #14
Merged
Merged
Conversation
…"x86_64"), design R off it P0 of docs/contrib/dgx-spark.md with answer 1 of its section 5. Each AVX2 function, helper, table and x86-only test carries the cfg per item, so no #[target_feature] body moves or splits; the x86_64 text is otherwise unchanged and its assembly equals the parent's but for panic-location line numbers. Off x86_64 qdot's has_features is false: dot_row and quantize_col are the scalar mirrors, the host union refuses its stacks by name (HostStack, UnsupportedType), flash_simd is false, kq_dot_simd and markov-accept panic by name, warm_touch reads the line it would prefetch, and the tile and row-lane dispatchers are unreachable behind tile_kind, has_features and has_lanes. Tests that would pass vacuously off x86_64 (the flash SIMD and KV prefetch lever pairs) are x86_64-only too. recipes.py's self-test finds qdot's non-pure reason in bloomery-threads' Linux paths.
…es (aarch64-unknown-linux-gnu for a DGX Spark) check and combos take the triple and read its own BINDGEN_EXTRA_CLANG_ARGS_<triple>. A value that is not a Linux triple is a named 64, and so are lint (tools/lint-ratchet.txt counts the x86_64 lint) and combos --ledger (its keys do not carry the target) under another triple. The header says how the aarch64 pieces are made; the lever registry gains the name's row.
Owner
|
완전 감사합니다!!! |
Collaborator
Author
|
바로 이어서 작업하겠습니다. 다음 PR에 메인테이너께서 해주셨으면 하는 것들 정리해서 적어둘게용!! |
This was referenced Oct 10, 2026
Owner
|
Thank you. We checked it on our x86 box, rebased on main:
Merging now. We will update the stale doc lines you listed (dgx-spark.md S1 and §6, local-check.md:14 and :50) in a follow-up commit. |
midagedev
added a commit
that referenced
this pull request
Oct 10, 2026
…the contributor's aarch64 record, mac-check.sh line refs Co-Authored-By: Claude Opus 5.5 <[email protected]>
7 tasks done
midagedev
added a commit
that referenced
this pull request
Oct 10, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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 and why
P0 of
docs/contrib/dgx-spark.md, with answer 1 of §5. Part of #13. The tree did not compile on aarch64:crates/qdot/src/lib.rsimportsstd::arch::x86_64unconditionally, and the AVX2 code in qdot,deepseek2/attn.rs,ops.rsandmarkov-acceptis reached by every engine crate. With this change the host chain andgenerate_qwen3moebuild on a DGX Spark and Qwen3.6-35B-A3B runs whole on its card. The x86_64 source is unchanged apart from added
cfglines, and its generated code is the same.
#[inline(always)]helper, table and x86-only test carries#[cfg(target_arch = "x86_64")],per item, so no
#[target_feature]body moves or splits. The only removed lines takedot_row_avx2out of an importlist in
crates/qdot/tests/qdot.rs.qdot::has_featuresis false, sosupports,fuses,has_tileandhas_lanesare too.dot_rowandquantize_colare the scalar mirrors. The host union refuses its stacks through the existingHostStack { why: UnsupportedType }, so a plan with host experts stops with the tensor named instead of taking thef32 round trip.
flash_simdis false,kq_dot_simdandmarkov-acceptpanic by name, andwarm_touchreads the lineit would prefetch.
tile,r8_tile,pack_groupandlanesareunreachable!there, behindtile_kind,has_features(Q3_K)andcheck_lanes.flash SIMD and KV prefetch lever pairs).
tools/mac-check.shtakes the triple fromBLOOMERY_CHECK_TARGETforcheckandcombos, reads that triple'sBINDGEN_EXTRA_CLANG_ARGS_<triple>, and refuses a value that is not a Linux triple.lintandcombos --ledgerrefuse another target, since the lint ratchet and the ledger keys are x86_64's. The header gains the aarch64 pieces,
and the name has its lever-registry row.
tools/recipes.py's self-test pinned qdot's non-pure reason to "x86_64 intrinsics". With that code undercfg, theMac-side classifier reports it from
bloomery-threads' Linux paths, which the real-tree line now checks; thesynthetic cases still cover the x86 rule.
Left out on purpose.
.cargo/cuda-oxide.tomlkeeps its flattarget-cpu=znver3, which makes rustc SIGSEGV on aarch64(#13), so the DGX Spark builds below use a local
target-cpu=nativecopy until S2. The docs are unchanged; this PRleaves stale the S1 row of
docs/contrib/dgx-spark.md("not done") and "Compile on aarch64" in its §6, anddocs/contrib/local-check.md:14and:50, whosetools/mac-check.sh:1-12and:31-35become:1-15and:35-39.Code shape
builds with no warning.
kq_dot_simdandmarkov-acceptrefuse by name.cargo fmtandcargo clippyare clean on what I touched; the lint count did not go up.Duplication found or removed:
flash_segment_headsrepeats its two scalar calls undercfg(not(target_arch = "x86_64"))so the x86_64 lines stay as they are; folding them into an early return changed thex86_64 code generation of its caller.
What I ran
On a Mac with the pinned nightly and the CUDA 13.3 headers, the static tier and the aarch64 cross check:
tools/mac-check.sh --self-testandpython3 tools/recipes.py --self-testpass. The x86_64 assembly ofbloomery-qdotandbloomery-model(--emit=asm, one codegen unit) equals main's apart from the line numbers in paniclocations. The box's gates (
just ptx-scan,gate-qdot,gate-opsand the rest ofjust affected) are yours to run.On a DGX Spark, in
nvidia/cuda:13.3.1-devel-ubuntu24.04with LLVM 21.1.8 andcargo-oxideat4da6c138:The
tools/recipes.py host-nightlyunits pass in 17 of the 19 crates.bloomery-qdot(9) andbloomery-model(16)fail in tests of the fused host tier, which design R refuses: P1's starting list. One is numeric:
swiglu_clamp_matches_ik_ruleis one ulp off becauseswiglu_clampwithout AVX2 uses libm'sexp.The 25 tests
bloomery-qdot:quantize_col_non_finite_panics_on_both_paths,quantize_col_q8k_first_max_ties,quantize_col_random_bit_identical,quantize_col_rounding_ties,quantize_col_saturation_ends,quantize_col_subnormal_tiny_scales,quantize_col_zero_blocks_bit_identical(each stops inrequire_quantizer_avx2),rejects_unaligned_k(the supported-type table),swiglu_clamp_matches_ik_rule.bloomery-model:arch::coverage::tests::{a_glm5next_routed_stack_runs_on_a_card_or_the_host, a_qwen38_routed_stack_runs_on_a_card_or_the_host, the_real_mimo2_file_lists_nothing, what_the_mimo2_body_does_not_run_is_an_item},moe::tests::{a_step_union_reads_the_tier_from_its_slots, a_tier_slot_is_lent_or_refused_by_name, a_warm_lists_what_the_leg_reads_and_never_fills, a_warm_of_a_sidecar_layer_carries_the_groups_of_the_pass, host_layer_build_refuses_a_stack_without_a_fused_kernel, routed_scratch_refuses_a_list_past_its_width, ten_a_column_through_the_narrow_claims, union_call_on_glm_stacks_matches_its_columns, union_call_with_an_up_on_other_bytes_matches_its_columns},ops::tests::{matmul_refuses_weight_types_without_an_activation_format, union_stack_refusals_carry_their_context, union_stack_refuses_row_lane_layouts_where_they_do_not_stand}; each meetsHostStack/UnsupportedTypeor afusesthat is false.Hardware
A DGX Spark (NVIDIA GB10, cc 12.1, 48 SMs, 128 GB unified LPDDR5x; 10 Cortex-X925 and 10 Cortex-A725 cores), DGX OS
7.6.0 (Ubuntu 24.04.5, kernel
6.17.0-1032-nvidia), driver 595.84. The host keeps DGX OS's CUDA 13.0; the build ranin the container above with
NVIDIA_DISABLE_REQUIRE=1. No speed numbers here.AI help
An AI coding agent wrote the code changes and this description, ran the commands above on my machines, and compared
the x86_64 assembly. I did the code review of the diff and the review of this pull request myself.