Repository navigation
Inkling-2: Add fused EXL3 projections for a layer's inputs - #4874
ajensenwaud wants to merge 4 commits into
Conversation
Adds tf_exl3_rot_group5 and tf_exl3_group5_* to exl3_linear.cu: up to five layers of one K, each with its own input rows, as one rotation launch and one linear launch. The family's launcher is proj_group.zig. The kernels are registered with the contract through contract_exl3's Case as replacements of each member's rot_in and linear_body.
63e5f97 to
a9889b9
Compare
|
5060 Ti (sm_120) kernel-contract
rc=1 is the limit-problem exit; the new group launch is clean on sm_120. |
|
Thanks @ajensenwaud. The five-way group reuses the existing rotation and linear bodies without changing their arithmetic, and no serving path calls it yet. It complements #4127's shared experts; it does not replace Mini's mixed-format projections. We'll apply this narrow addition on top of the integrated #4127 on our side, rather than stacking the old #4127 branch again. This is ready for the final kernel comparison. The posted results support the new forms, with existing limit failures and the pending compiler records kept separate. Before landing, retain the final shared-image identity and exact member-by-member results, including distinct member inputs and FP32 outputs, which the current cases do not cover. The changelog overlap is mechanical and can be handled during integration.
|
With an Ext, each member now reads its own input rows, and a case can ask for fp32 outputs. Main's own group cases keep one shared input and bf16, so their inputs are unchanged.
Adds fp32-output cases for the six group5 kernels and three controls that swap two members' inputs or outputs. The cases' host tests now run in test-inkling2-cuda-host.
|
I tested zig build test-inkling2-cuda-host test-inkling2-host test-gradient-serving test-kernel-symbols-host test-exl3-cuda-host check-native-cuda-host -Dfixed-cpu -j2 --summary all
zig build compile-cuda-tests -Dtarget=aarch64-linux-gnu -Dfixed-cpu -j2 --summary allOne test-runner cleanup gap remains in Igor Lessio - AIFLOW LABS |
Set.add left the linear module loaded, the group and its cases made, and its list entries in place when a later step failed. It now frees them and restores the list to its entry length.
|
Follow-up on I trial-merged the revised head into zig build test-inkling2-cuda-host test-inkling2-host test-gradient-serving test-kernel-symbols-host check-native-cuda-host -Dfixed-cpu -j2 --summary all
zig build test-exl3-cuda-host -Dfixed-cpu -j2 --summary all
zig build compile-cuda-tests -Dtarget=aarch64-linux-gnu -Dfixed-cpu -j2 --summary allI did not inject a GPU setup failure or rerun the device gates. The published GB10 measurement remains the device evidence. Igor Lessio - AIFLOW LABS |
|
Thanks, Ash, and thanks @AIFlowML. These are in
Under the |
|
Thanks, @ajensenwaud. The distinct member inputs, FP32 comparisons and swap controls close the earlier coverage asks. Set.add now also releases its acquisitions and restores the list on error. The measured kernel code is unchanged by that cleanup. This is ready for the bounded kernel comparison; please retain the final shared-image identity, old-function comparison and per-member results before landing, with pending compiler records kept separate. Changelog integration stays with us.
|
Before attention, every Inkling 2 layer projects its normed input five ways: q, gate, r, k and v. Main's EXL3 group launch takes at most three layers that read the same input rows, so these five projections need several launches. This PR adds a group launch that takes all five.
What this changes
Adds
tf_exl3_rot_group5and sixtf_exl3_group5_*kernels toexl3_linear.cu, the family launcherproj_group.zig, and their contract registrations. Each member keeps its own input rows and runs main'slinear_bodyon its own blocks, so its output has the bits of its own launch. Nothing serves them yet.Checks on this head
a9889b94don main68ff0ad8e; lean checker 165 on the base, 165 on this head, 0 new.tools/pr_check.py: 0 errors.zig build test-cuda-host test-inkling2-cuda-host test-inkling2-host test-gradient-serving test-kernel-symbols-host test-exl3-cuda-host -Dfixed-cpu: 500 of 500 steps, 9,090 of 9,138 tests, 48 skipped, from a fresh cache, one77a9ad57.zig fmt --check build.zig zig,git diff --check,cuda_common_check.pyandcuda_fragment_check.py: clean.Receipt
n/a: no served path reaches these kernels yet.
Kernel contract
rot_inandlinear_body, through an extension hook oncontract_exl3.Case. Each form has a planted control.e77a9ad57, which has this head's patch on main9fa8863bc:kernel-contract inkling2 exl3givesSUMMARY 80 kernels: 80 pass gates 1-4, 0 fail, 0 known findings; 49 controls: 49 red as planted, 0 missed; 18 limit problems.exl3_linearimage compile to identical SASS on nvcc 13.0 and 13.3 for sm_80, 86, 89, 120 and 121.