Raising: buffer normalizations for viewed geps and raw accesses - #3006
Open
wsmoses wants to merge 1 commit into
Open
Raising: buffer normalizations for viewed geps and raw accesses#3006wsmoses wants to merge 1 commit into
wsmoses wants to merge 1 commit into
Conversation
Kernels that are not fully inlined reach the raising with buffers addressed through pointer plumbing the tensor semantics cannot stand for. Normalize before raising: - rebaseViewedGeps: a typed view carved out of a buffer at an offset (gep feeding a pointer2memref) rebases its accesses onto the underlying buffer at base plus offset. - convertRawGepAccesses: data-dependent indexing (CSR-style loops over runtime offsets) can never become affine and stays as raw gep+load; the access still addresses whole elements, so it becomes a plain memref access through a flat view, which raising gathers. - inlineAllocaScopes/linearizeRegionBlocks: alloca scopes only delimit stack lifetime, meaningless under value semantics; splice them into the parent so scratch normalizations see the whole function. - dropDeadPointerChains: sweep the pointer plumbing the rewrites strand. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016zErYp7upmqr4NHfhod9UD
This was referenced Aug 28, 2026
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.
mfem kernels that are not fully inlined reach the raising with buffers addressed through pointer plumbing tensor semantics cannot stand for. This ports the foundation of the normalization suite used to bring the MFEM CUDA suite through the raising path (#2968):
pointer2memref) rebases its accesses onto the underlying buffer at base + offset.Follow-up PRs stack on this: buffer-branch expansion, packed capture-struct forwarding, struct scratch splitting/flattening.
🤖 Generated with Claude Code
https://claude.ai/code/session_016zErYp7upmqr4NHfhod9UD