Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[quidditch_snitch] Implement L1 allocation lowering #42

Merged
merged 4 commits into from
Jun 25, 2024

Conversation

zero9178
Copy link
Member

Bufferization will represent L1 allocations as memref.alloca with the l1_encoding as the address space of memref types. To lower these, we need to assign offsets of the actual buffers into L1 memory. This PR implements that by collecting all such allocas and replacing them with a memref.view into the quidditch_snitch.l1_memory_view.

zero9178 added 3 commits June 25, 2024 15:39
This operation is used to represent L1 memory as one single large i8 memref.
Allocation within L1 is then simply a `memref.view` into this memref. This PR also implements lowering it to LLVM.

Note that the operation always returns the same memref descriptor, i.e. the memref being returned aliases all other memrefs returned by the operation.
Bufferization will represent L1 allocations as `memref.alloca` with the `l1_encoding` as the address space of memref types. To lower these, we need to assign offsets of the actual buffers into L1 memory.
This PR implements that by collecting all such `alloca`s and replacing them with a `memref.view` into the `quidditch_snitch.l1_memory_view`.
Base automatically changed from l1-memory-view-lowering to main June 25, 2024 15:22
# Conflicts:
#	codegen/compiler/src/Quidditch/Target/CMakeLists.txt
#	codegen/tools/quidditch-opt.cpp
@zero9178 zero9178 merged commit 8afdc66 into main Jun 25, 2024
1 check passed
@zero9178 zero9178 deleted the l1-alloca-lowering branch June 25, 2024 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant