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

[WIP] Enable init values for Object FIFO #1813

Draft
wants to merge 71 commits into
base: main
Choose a base branch
from
Draft

Conversation

AndraBisca
Copy link
Collaborator

@AndraBisca AndraBisca commented Oct 2, 2024

This PR builds on top of #1801 to enable objectfifos to take as input an array of initial values.

Specifically:

  • initial values should be of the MLIR type ElementsAttr,
  • the above should also be of the same memref type as the objectfifo type,
  • the initial values array should be of the same size as the depth of the objectfifo,
  • the objectfifo lowering is modified to generate AIE_LockOps with init values such that the initialized objects will not be overwritten before they are communicated to the consumer(s).

abisca and others added 30 commits October 1, 2024 08:19
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…u-xrt/objectfifo_repeat); delete unused cmake files
abisca and others added 21 commits October 31, 2024 08:32
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
of_in = object_fifo("in", ShimTile, MemTile, 1, tensor_ty)
of_out = object_fifo(
"out",
MemTile,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black] reported by reviewdog 🐶

Suggested change
MemTile,
MemTile,

MemTile = tile(col, 1)

# AIE-array data movement with object fifos
#of_in = object_fifo("in", ShimTile, MemTile, 1, tensor_ty)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black] reported by reviewdog 🐶

Suggested change
#of_in = object_fifo("in", ShimTile, MemTile, 1, tensor_ty)
# of_in = object_fifo("in", ShimTile, MemTile, 1, tensor_ty)

],
)
of_out.set_repeat_count(memtile_repeat_count + 1)
#object_fifo_link(of_in, of_out)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black] reported by reviewdog 🐶

Suggested change
#object_fifo_link(of_in, of_out)
# object_fifo_link(of_in, of_out)

# To/from AIE-array data movement
@runtime_sequence(tensor_ty, tensor_ty, tensor_out_ty)
def sequence(A, B, C):
#npu_dma_memcpy_nd(metadata=of_in, bd_id=1, mem=A, sizes=[1, 1, 1, N])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black] reported by reviewdog 🐶

Suggested change
#npu_dma_memcpy_nd(metadata=of_in, bd_id=1, mem=A, sizes=[1, 1, 1, N])
# npu_dma_memcpy_nd(metadata=of_in, bd_id=1, mem=A, sizes=[1, 1, 1, N])

abisca and others added 3 commits November 7, 2024 12:16
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

4 participants