Repository navigation
native: the Metal open paths' shared helpers move to metal_shared.zig (metal.zig 593 to 546 lines) - #2425
Open
ashhart wants to merge 1 commit into
Open
native: the Metal open paths' shared helpers move to metal_shared.zig (metal.zig 593 to 546 lines)#2425ashhart wants to merge 1 commit into
ashhart wants to merge 1 commit into
Conversation
…, so metal.zig has room for #1850 zig/src/native/metal.zig was at 593 lines. chip, deviceName, generation, prefillStep, modelContext and gibBytes, with generation's test, move unchanged to metal_shared.zig; only the three that were private gain pub. metal.zig names each as before, so every call site and its arguments stay as they were, and chip and deviceName stay public there. metal.zig is now 546 lines.
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.
zig/src/native/metal.zigis at 593 lines, and #1850 (Nemotron on Metal withTF_KV_SHARE) needs about 10 more, which would take it past the 600 limit.This moves six helpers that the Metal open paths share, unchanged, into
zig/src/native/metal_shared.zig, together with their test:chip,deviceName,generation,prefillStep,modelContextandgibBytes. The only change to them ispubon the three thatmetal.zignow reaches from the other file.metal.ziggoes from 593 to 546 lines.For #1850: it moves
modelContexttocuda_window.zig. After this lands, its rebase removesmodelContextfrommetal_shared.ziginstead of frommetal.zig.Tests
metal.zig,zig build testand the plainzig buildgive the same results before and after.zig build -lis byte-identical.metal.zig's steps.No behaviour change.