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

Optimize dynamic objectFifo #1934

Merged
merged 4 commits into from
Dec 9, 2024
Merged

Optimize dynamic objectFifo #1934

merged 4 commits into from
Dec 9, 2024

Conversation

pvasireddy-amd
Copy link
Collaborator

@pvasireddy-amd pvasireddy-amd commented Nov 19, 2024

Using add-compare-subtract alternative to replace modulo operation in dynamic objectFifo lowering.

Copy link
Contributor

github-actions bot commented Nov 19, 2024

Coverage Report

Created: 2024-12-09 21:41

Click here for information about interpreting this report.

FilenameFunction CoverageLine CoverageRegion CoverageBranch Coverage
home/runner/work/mlir-aie/mlir-aie/lib/Dialect/AIE/Transforms/AIEObjectFifoStatefulTransform.cpp 100.00% 93.51% 90.11% 84.84%
Totals 100.00% 93.51% 90.11% 84.84%
Generated by llvm-cov -- llvm version 14.0.0

@pvasireddy-amd pvasireddy-amd marked this pull request as ready for review November 20, 2024 03:46
@pvasireddy-amd pvasireddy-amd changed the title [TEST] Optimize dynamic objectFifo for ping-pong buffers Optimize dynamic objectFifo for ping-pong buffers Nov 20, 2024
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

clang-format

[clang-format] reported by reviewdog 🐶

return XAie_LockAcquire(&(ctx->DevInst), XAie_TileLoc(0,0), XAie_LockInit(id,value), timeout);


[clang-format] reported by reviewdog 🐶

int mlir_aie_release_out_cons_cons_lock(aie_libxaie_ctx_t* ctx, int value, int timeout) {


[clang-format] reported by reviewdog 🐶

return XAie_LockRelease(&(ctx->DevInst), XAie_TileLoc(0,0), XAie_LockInit(id,value), timeout);


[clang-format] reported by reviewdog 🐶

int mlir_aie_acquire_out_prod_lock(aie_libxaie_ctx_t* ctx, int value, int timeout) {


[clang-format] reported by reviewdog 🐶

return XAie_LockAcquire(&(ctx->DevInst), XAie_TileLoc(0,2), XAie_LockInit(id,value), timeout);


[clang-format] reported by reviewdog 🐶

int mlir_aie_release_out_prod_lock(aie_libxaie_ctx_t* ctx, int value, int timeout) {


[clang-format] reported by reviewdog 🐶

return XAie_LockRelease(&(ctx->DevInst), XAie_TileLoc(0,2), XAie_LockInit(id,value), timeout);


[clang-format] reported by reviewdog 🐶

int mlir_aie_acquire_out_cons_lock(aie_libxaie_ctx_t* ctx, int value, int timeout) {


[clang-format] reported by reviewdog 🐶

return XAie_LockAcquire(&(ctx->DevInst), XAie_TileLoc(0,2), XAie_LockInit(id,value), timeout);


[clang-format] reported by reviewdog 🐶

int mlir_aie_release_out_cons_lock(aie_libxaie_ctx_t* ctx, int value, int timeout) {


[clang-format] reported by reviewdog 🐶

return XAie_LockRelease(&(ctx->DevInst), XAie_TileLoc(0,2), XAie_LockInit(id,value), timeout);


[clang-format] reported by reviewdog 🐶

int mlir_aie_acquire_in_cons_prod_lock(aie_libxaie_ctx_t* ctx, int value, int timeout) {


[clang-format] reported by reviewdog 🐶

return XAie_LockAcquire(&(ctx->DevInst), XAie_TileLoc(0,2), XAie_LockInit(id,value), timeout);


[clang-format] reported by reviewdog 🐶

int mlir_aie_release_in_cons_prod_lock(aie_libxaie_ctx_t* ctx, int value, int timeout) {


[clang-format] reported by reviewdog 🐶

return XAie_LockRelease(&(ctx->DevInst), XAie_TileLoc(0,2), XAie_LockInit(id,value), timeout);


[clang-format] reported by reviewdog 🐶

int mlir_aie_acquire_in_cons_cons_lock(aie_libxaie_ctx_t* ctx, int value, int timeout) {


[clang-format] reported by reviewdog 🐶

return XAie_LockAcquire(&(ctx->DevInst), XAie_TileLoc(0,2), XAie_LockInit(id,value), timeout);


[clang-format] reported by reviewdog 🐶

int mlir_aie_release_in_cons_cons_lock(aie_libxaie_ctx_t* ctx, int value, int timeout) {


[clang-format] reported by reviewdog 🐶

return XAie_LockRelease(&(ctx->DevInst), XAie_TileLoc(0,2), XAie_LockInit(id,value), timeout);


[clang-format] reported by reviewdog 🐶

int mlir_aie_acquire_in_prod_lock(aie_libxaie_ctx_t* ctx, int value, int timeout) {


[clang-format] reported by reviewdog 🐶

return XAie_LockAcquire(&(ctx->DevInst), XAie_TileLoc(0,0), XAie_LockInit(id,value), timeout);


[clang-format] reported by reviewdog 🐶

int mlir_aie_release_in_prod_lock(aie_libxaie_ctx_t* ctx, int value, int timeout) {


[clang-format] reported by reviewdog 🐶

return XAie_LockRelease(&(ctx->DevInst), XAie_TileLoc(0,0), XAie_LockInit(id,value), timeout);


[clang-format] reported by reviewdog 🐶

int mlir_aie_acquire_in_cons_lock(aie_libxaie_ctx_t* ctx, int value, int timeout) {


[clang-format] reported by reviewdog 🐶

return XAie_LockAcquire(&(ctx->DevInst), XAie_TileLoc(0,0), XAie_LockInit(id,value), timeout);


[clang-format] reported by reviewdog 🐶

int mlir_aie_release_in_cons_lock(aie_libxaie_ctx_t* ctx, int value, int timeout) {


[clang-format] reported by reviewdog 🐶

return XAie_LockRelease(&(ctx->DevInst), XAie_TileLoc(0,0), XAie_LockInit(id,value), timeout);

@jgmelber
Copy link
Collaborator

Before merging please move the dynamic object fifo tests to tests/npu-xrt since they are not programming examples and remove the Makefiles

@pvasireddy-amd pvasireddy-amd marked this pull request as draft December 5, 2024 23:09
@pvasireddy-amd pvasireddy-amd marked this pull request as ready for review December 7, 2024 02:10
@pvasireddy-amd pvasireddy-amd changed the title Optimize dynamic objectFifo for ping-pong buffers Optimize dynamic objectFifo Dec 9, 2024
Copy link
Collaborator

@AndraBisca AndraBisca left a comment

Choose a reason for hiding this comment

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

LGTM :)

@pvasireddy-amd pvasireddy-amd added this pull request to the merge queue Dec 9, 2024
Merged via the queue into main with commit c7e37e9 Dec 9, 2024
53 checks passed
@pvasireddy-amd pvasireddy-amd deleted the optimize_modulo branch December 9, 2024 22:19
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