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

Add Multi-Dimensional Address Generation to Object Fifo #664

Merged
merged 23 commits into from
Oct 5, 2023

Conversation

jgmelber
Copy link
Collaborator

@jgmelber jgmelber commented Sep 29, 2023

Creating a branch within Xilinx/milir-aie/main. Comment from original PR #589

I recently added support for the n-dimensional data layout transformations (strides/wraps) of AIE2 to the dmaBdOp, #547. This PR adds the same functionality at the objectFifo level.

You can specify two data layout transformations; toStream and fromStream. toStream is applied at the producer side; data in the buffer referenced by the objectFifo is put in the stream by following the strides and wraps given. fromStream is the analog on the consumer side; what comes in from the stream is written into the memory addresses obtained by applying the given strides wraps.

Since these data layout transformations require a DMA to perform them, if either toStream or fromStream is used, a DMA connection between tiles is forced, even if they are adjacent and have shared memory. (This required some light refactoring of the objectFifo code.)

To be more consistent with the AIEX.dma_nd_memcpy operation, which first lists lengths and then strides, I also refactored the strides and wraps tuples in both dmaBdOp and objectFifo (this PR) to now be in order <wrap, stepsize> (== synonymously <length, stride>).

@AndraBisca AndraBisca closed this Oct 4, 2023
@AndraBisca AndraBisca reopened this Oct 4, 2023
@AndraBisca AndraBisca marked this pull request as ready for review October 5, 2023 15:46
@AndraBisca AndraBisca changed the base branch from main to vitis2023_2 October 5, 2023 16:02
@AndraBisca AndraBisca merged commit 090bc3f into vitis2023_2 Oct 5, 2023
5 checks passed
@AndraBisca AndraBisca deleted the andre_of_nd branch October 5, 2023 17:30
fifield added a commit to fifield/mlir-aie that referenced this pull request Nov 8, 2023
* Solve conflicts with upstream commit a2ae91d

* Make objectfifo-generated locks and buffers early to avoid SSA domination issue (Xilinx#670)

* Add Multi-Dimensional Address Generation to Object Fifo (Xilinx#664)

* add multi-dimensional address generation features to objectFifo

* do not emit strides/wraps if multi-dim address generation is not used

* swap stride and wrap order in ND DMA tuple to be consistent with AIEX.nd_dma_memcpy

* add nd-dma documentation

* allow for different data layout transformations for each consumer in objectFifo

* add early error about architectural stepsize/wrap limitations

* fix printer of multi-dim objectFifo; add multi-dim register process test

* fix typos; fix objectFifoCreateOp printer for multiple consumers; refactor requiresDMAs

* fix broken nd_dma test

* Added distribute test case

* Working on solving failing .py test.

* Generate error when LinkOp is used with objFifos that have to/from Stream dimensions.

* register attribute builders for AIE_DimTupleArrayAttr and AIE_DimTupleArrayArrayAttr

* Settle on final syntax version for ObjectFifoCreateOp dimensional inputs.

* Fixed failing tests.

* Fix wrong commit.

* Fix python test

* Fix failing test.

* Clang patch

* Fix failing tests

---------

Co-authored-by: andrej <[email protected]>
Co-authored-by: abisca <[email protected]>
Co-authored-by: max <[email protected]>

Co-authored-by: Jeff Fifield <[email protected]>
Co-authored-by: erwei-xilinx <[email protected]>
Co-authored-by: Joseph Melber <[email protected]>
Co-authored-by: andrej <[email protected]>
Co-authored-by: max <[email protected]>
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.

5 participants