Repository navigation
core: move tp_settings.zig and owned.zig out of flashnext, so core imports no family file - #4878
Conversation
|
I test-merged On Apple silicon, I used the existing engine module in a scratch test target and ran the moved Igor Lessio - AIFLOW LABS |
|
Thank you, @jschmied. Both helper bodies are retained, with only the required import-path changes, and the callers resolve to their new core locations. The relevant moved tests and combined host results are recorded. This looks ready to land.
|
The speed-up settings reader (rank, MCDMA library, links) is read by core/pair.zig, core/pair_rows.zig and families/glm/ep.zig, so core imported a family file. Moved as is with its tests; only import paths change.
core/pair_rows.zig keeps its Metal objects in flashnext's Owner, the last core file importing a family file. Moved as is; only import paths change.
6cdbccb to
0b60178
Compare
|
Thank you @jschmied. This is merged into main with your commits under your own name, so you're listed as a TensorFold contributor. It ships in the next release, credited to you in the changelog and the release notes. |
Head:
6cdbccbb4f(2 commits on0b39f4d64e).What moved
Two files move from
families/flashnextintocore, unchanged except their own import paths:families/flashnext/tp_settings.zig->core/tp_settings.zig: the speed-up settings file reader (rank, MCDMA library,links) and
pairMin, with its 5 tests. It only needsfabricandcore/stagger.zig.families/flashnext/owned.zig->core/owned.zig: the 45-lineOwner(Metal)that keeps acquired Metal objectsand queues for a prefix.
core/pair_rows.ziguses it too, so after the first move it was the last core fileimporting a family file. Its tests stay in
families/flashnext/owned_test.zig(they also cover flashnext'sload prefix and run cleanup); only that file's import path changes.
Importers updated (import path only):
core/pair.zig,core/pair_rows.zig,families/glm/ep.zig,families/flashnext/{engine,engine_load,tp,replay_run,owned_test}.zig, and thetensorfold.zigtest list.No build file names either path. No logic, name or signature change.
Why
#4804 found one 8-module import cycle on main, closed by core importing a family file (
core/pair.zigandcore/pair_rows.zig->families/flashnext/tp_settings.zig). This is the first cleanup PR proposed there.glm's
ep.zigalso read flashnext's file, one of the 15 family -> family reaches; it now reads core.Import graph, before and after (
zig_deslop.py, the #4804 checker prototype)Before (
0b39f4d64e):After (
6cdbccbb4f):No core -> family edge is left. The 8-module group splits in two: core/cuda/fabric stays a cycle through
core/weight_only_cuda.zig -> cuda(a separate topic), and flashnext <-> native is two test files.Verification
zig testofcore/tp_settings.zigwithfabric/verbs/sys:8/8 pass (its 5 plus
stagger.zig's 3); the same compiles foraarch64-macosandx86_64-linux-gnu.test-flashnext-cleanup-host(runsowned_test.zigagainst the recording Metal fake, and compilescore/pair.zig,glm/ep.zig,flashnext/{tp,engine,engine_load,replay_run}.zigthroughresidency_owner_tests.zig),test-flashnext-vision-memory-host,test-cluster-membership-host: 80/81 pass,1 skip, on aarch64 Linux.
6cdbccbb4f(x86_64, dispatcher):X86-ALL-GREEN: test-host, test, test-golden,test-kernel-contract, test-server-security, test-pull-security, fuzz-cortheon, check-release-paths,
check-native-cuda-host, compile-cuda-tests, pr_check, zig fmt, diff --check, lean (0 new).
zig build native -Dsm=121 -Doptimize=ReleaseSafe, both built in the same worktree path:main
0b39f4d64eand this head give the sametensorfold-native, md5104ff3784536f8a1948aef4534cf001b.(An earlier branch build, made hours before with a different build cache, came out
7693b055; a rebuild ofthe same head matches main. The CUDA server reaches none of the touched files; its strings name none of them.)
zig build teston macOS is not run (no Mac in this loop). Every Metal file touched exceptcore/pair_rows.zigis compiled bytest-flashnext-cleanup-hostabove;pair_rows.zig's two changed importswere checked to resolve to the moved files.
zig fmt --checkclean.Not applicable: no opt-in path, kernel, refusal, env flag, served behaviour or speed change, so no served rows
(seeded, resume or concurrency), no parity_controls.py run and no planted control. Equal against main is the byte-identity line above.
Overlap
No open PR moves either file. One textual conflict with an open PR: #3293 adds two imports right above
ep.zig's settings import; whichever lands second takes the other side's one-line path. #3380, #3480 and#3688 also touch importers here but already conflict with main.
Proposed CHANGELOG line
tp_settings.zigandowned.zigmoved from Flash Next into core (RFC: an import structure check in pr_check: no new cycles, no new family-to-family imports #4804).Refs #4804, #2251