Remove "atom specific" functions from matrix classes - PR 2 - #121
Merged
Merged
Conversation
…son 3, M2a) promote's Jacobian is a row gather with an all-zero map. The atom now builds that map in jacobian_init and calls row_gather_alloc/fill_values; the promote_alloc / promote_fill_values slots and their sparse, permuted_dense and stacked_pd kernels are removed. New atom-level test proves a pd child Jacobian stays pd through promote. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Azb8o1AgiFRU4t9aAY7oDr
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.
Summary
Second PR of lesson 3, first of the three-way split of M2 (promote; broadcast; diag_vec).
promote's Jacobian is a row gather with an all-zero map.jacobian_init_implbuilds the map, callsrow_gather_alloc, frees it;eval_jacobian_implcallsrow_gather_fill_values.promote_alloc/promote_fill_valuesslots inmatrix.h,sparse_promote_*,promote_pd_*(+ public decls), the stacked_pd wrapper and vtable functions, and their wiring.bound_iwork) that promote did not need.Tests
test_promote_jacobian_pd_preserved: a pd child Jacobian stays pd through promote, withrow_permand tiled values checked.test_permuted_dense_promoteandtest_spd_vtable_promote(they exercised the deleted slot; the M1 gather tests cover the kernels).452 tests Release, 454 with SP_TRACK_MEMORY. UBSan, guard-malloc + leaks, PROFILE_ONLY, clang-format clean. Mutation check: a non-zero map crashes the first promote test.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Azb8o1AgiFRU4t9aAY7oDr