Asymmetric consumer element type in ObjectFifo#3117
Open
yenjames wants to merge 2 commits into
Open
Conversation
ObjectFifo now supports an optional consumer element type for asymmetric transfer granularity. The producer sends elemType-sized transfers and the consumer receives consumerElemType-sized transfers. The DMA hardware handles the size mismatch via AXI backpressure.
Contributor
Coverage ReportCreated: 2026-05-27 17:45Click here for information about interpreting this report.
Generated by llvm-cov -- llvm version 18.1.3 |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR proposes adding an optional consumer element type to aie.objectfifo to support asymmetric transfer granularity, where the producer and consumer sides use different element sizes while remaining compatible (producer size is an integer multiple of consumer size). This spans IR syntax/parsing/verification, the stateful ObjectFifo transform, Python bindings, and new tests.
Changes:
- Extend
aie.objectfifowith an optionalconsumerElemTypeand-> <type>assembly syntax, plus verifier support for producer/consumer size ratio. - Update
aie.objectfifo.acquireverification and the stateful transform to respect the consumer-side element type (buffer type + DMA BD lengths). - Plumb the feature through Python (dialect + IRON) and add MLIR + Python regression tests.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
include/aie/Dialect/AIE/IR/AIEOps.td |
Adds optional consumerElemType, custom -> assembly hook, and helper accessor. |
lib/Dialect/AIE/IR/AIEDialect.cpp |
Adds verifier for asymmetric sizing, parser/printer for ->, and relaxes acquire verifier to accept consumer type. |
lib/Dialect/AIE/Transforms/AIEObjectFifoStatefulTransform.cpp |
Forces DMA path for asymmetric FIFOs and uses consumer type for consumer-side split FIFO/buffer. |
python/dialects/aie.py |
Adds consumer_datatype plumbing and makes consumer-side acquire() return the consumer element type when provided. |
python/iron/dataflow/objectfifo.py |
Adds IRON-level consumer_obj_type and passes it to the dialect op builder. |
test/dialect/AIE/objectfifo_bad.mlir |
Adds a verifier-negative test for non-integer-multiple sizing and fixes formatting in an existing case. |
test/objectFifo-stateful-transform/asymmetric_element_type/asymmetric_element_type.mlir |
New stateful-transform test validating producer/consumer buffer and BD lengths with asymmetric types. |
test/objectFifo-stateful-transform/asymmetric_element_type/asymmetric_with_initvalues.mlir |
New stateful-transform test covering asymmetric types with initValues and depth>1. |
test/python/objFifo_asymmetric.py |
New Python test validating IRON plumbing and printed IR contains the -> consumer type. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…se dyn_cast for safer guarding.
jgmelber
approved these changes
May 29, 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.
Summary
This PR is a proposal to introduce an optional
consumerElemTypefor asymmetric transfers in ObjectFifos.elemType-sized transfers, consumer receivesconsumerElemType-sized transfers. Producer element count must be an integer multiple of consumer element count.Example
Input — a single ObjectFifo with 40xi32 producer type and 10xi32 consumer type:
After
--aie-objectFifo-stateful-transform, the producer and consumer get independently-sized buffers and BD lengths:The MemTile DMA sends 40 elements, and the CoreTile DMA receives them 10 at a time across 4 acquire/release cycles.
Changes
AIEOps.td: OptionalconsumerElemTypeattribute,->assembly format,getConsumerElemTypeOrDefault()helperAIEDialect.cpp: Verifier (integer multiple check), parser/printer for-> <type>syntax,AcquireOpverifier accepts consumer typeAIEObjectFifoStatefulTransform.cpp:requiresDMAs()returns true for asymmetric types, split fifo uses consumer type for consumer bufferpython/dialects/aie.py:consumer_datatypeparameter,acquire()returns consumer type for Consume portpython/iron/dataflow/objectfifo.py:consumer_obj_typeparameter plumbed through to low-level bindings