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

Switch to using transaction binary flow with no control packet #1517

Merged
merged 25 commits into from
Jun 10, 2024
Merged

Conversation

nirvedhmeshram
Copy link
Collaborator

@nirvedhmeshram nirvedhmeshram commented May 28, 2024

Requires this xdna-driver (or newer)

lib/Targets/AIETargetNPU.cpp Outdated Show resolved Hide resolved
lib/Targets/AIETargetNPU.cpp Outdated Show resolved Hide resolved
lib/Targets/AIETargetNPU.cpp Outdated Show resolved Hide resolved
lib/Targets/AIETargetNPU.cpp Outdated Show resolved Hide resolved
lib/Targets/AIETargetNPU.cpp Outdated Show resolved Hide resolved
programming_examples/basic/passthrough_dmas/test.cpp Outdated Show resolved Hide resolved
programming_examples/basic/passthrough_dmas/test.cpp Outdated Show resolved Hide resolved
programming_examples/basic/passthrough_dmas/test.cpp Outdated Show resolved Hide resolved
programming_examples/basic/passthrough_dmas/test.cpp Outdated Show resolved Hide resolved
programming_examples/basic/passthrough_dmas/test.cpp Outdated Show resolved Hide resolved
python/compiler/aiecc/main.py Outdated Show resolved Hide resolved
python/compiler/aiecc/main.py Show resolved Hide resolved
python/compiler/aiecc/main.py Outdated Show resolved Hide resolved
python/compiler/aiecc/main.py Outdated Show resolved Hide resolved
@fifield
Copy link
Collaborator

fifield commented May 29, 2024

Requires this xdna-driver (or newer)

@fifield
Copy link
Collaborator

fifield commented May 29, 2024

The test npu-xrt/matrix_multiplication_using_dma is still failing, but I don't understand how it was ever passing. I could be missing something / reading it wrong, but it looks like the aie.mlir only returns half the data expected by the test.cpp

seems to be resolved

@fifield fifield force-pushed the no-prolog branch 2 times, most recently from 0731971 to 24b985e Compare May 30, 2024 15:15
programming_examples/basic/vector_exp/test.cpp Outdated Show resolved Hide resolved
programming_examples/basic/vector_reduce_add/test.cpp Outdated Show resolved Hide resolved
programming_examples/basic/vector_reduce_max/test.cpp Outdated Show resolved Hide resolved
programming_examples/basic/vector_reduce_min/test.cpp Outdated Show resolved Hide resolved
programming_examples/basic/vector_scalar_mul/test.cpp Outdated Show resolved Hide resolved
programming_examples/ml/eltwise_mul/test.cpp Outdated Show resolved Hide resolved
programming_examples/ml/relu/test.cpp Outdated Show resolved Hide resolved
programming_examples/ml/softmax/test.cpp Outdated Show resolved Hide resolved
programming_examples/vision/edge_detect/test.cpp Outdated Show resolved Hide resolved
programming_examples/vision/edge_detect/test.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

github-actions bot commented May 30, 2024

Coverage Report

Created: 2024-06-07 21:05

Click here for information about interpreting this report.

FilenameFunction CoverageLine CoverageRegion CoverageBranch Coverage
IR/AIEXDialect.cpp 100.00% 85.83% 85.42% 76.56%
Transforms/AIEDmaToNpu.cpp 100.00% 95.76% 91.86% 82.76%
Transforms/AIEXToStandard.cpp 100.00% 95.65% 83.33% 50.00%
Totals 100.00% 92.61% 88.30% 79.03%
Generated by llvm-cov -- llvm version 14.0.0

@fifield fifield force-pushed the no-prolog branch 2 times, most recently from 362d946 to c1a0d7b Compare May 31, 2024 17:18
@fifield fifield marked this pull request as ready for review May 31, 2024 19:00
@fifield fifield force-pushed the no-prolog branch 2 times, most recently from 5e829b7 to c966112 Compare June 5, 2024 14:53
fifield added a commit to fifield/mlir-aie that referenced this pull request Jun 6, 2024
Rename npu.shimtile_push_queue to npu.push_queue, remove metadata operand. Add
direction, channel, column and row operands.

Rename npu.writebd_shimtile to npu.writebd, remove column_num operand, add row
operand.

Make npu.write32 column and row operands optional. Before Xilinx#1517 this operation
mapped to a firmware operation that interprets the address operand as a tile
relative offset, then under the head uses (row, column, offset) to compute the
write32 address. For backwards compatablity, if row and column are present, this
behavior is preserved by aie-translate --aie-npu-instgen. Otherwise, the address
operand is used without modification as the write32 address.
fifield added a commit to fifield/mlir-aie that referenced this pull request Jun 6, 2024
Rename npu.shimtile_push_queue to npu.push_queue, remove metadata operand. Add
direction, channel, column and row operands.

Rename npu.writebd_shimtile to npu.writebd, remove column_num operand, add row
operand.

Make npu.write32 column and row operands optional. Before Xilinx#1517 this operation
mapped to a firmware operation that interprets the address operand as a tile
relative offset, then under the head uses (row, column, offset) to compute the
write32 address. For backwards compatablity, if row and column are present, this
behavior is preserved by aie-translate --aie-npu-instgen. Otherwise, the address
operand is used without modification as the write32 address.
fifield added a commit to fifield/mlir-aie that referenced this pull request Jun 6, 2024
Rename npu.shimtile_push_queue to npu.push_queue, remove metadata operand. Add
direction, channel, column and row operands.

Rename npu.writebd_shimtile to npu.writebd, remove column_num operand, add row
operand.

Make npu.write32 column and row operands optional. Before Xilinx#1517 this operation
mapped to a firmware operation that interprets the address operand as a tile
relative offset, then under the head uses (row, column, offset) to compute the
write32 address. For backwards compatablity, if row and column are present, this
behavior is preserved by aie-translate --aie-npu-instgen. Otherwise, the address
operand is used without modification as the write32 address.
fifield added a commit to fifield/mlir-aie that referenced this pull request Jun 6, 2024
Rename npu.shimtile_push_queue to npu.push_queue, remove metadata operand. Add
direction, channel, column and row operands.

Rename npu.writebd_shimtile to npu.writebd, remove column_num operand, add row
operand.

Make npu.write32 column and row operands optional. Before Xilinx#1517 this operation
mapped to a firmware operation that interprets the address operand as a tile
relative offset, then under the hood uses (row, column, offset) to compute the
write32 address. For backwards compatablity, if row and column are present, this
behavior is preserved by aie-translate --aie-npu-instgen. Otherwise, the address
operand is used without modification as the write32 address.
fifield added a commit to fifield/mlir-aie that referenced this pull request Jun 6, 2024
Rename npu.shimtile_push_queue to npu.push_queue, remove metadata operand. Add
direction, channel, column and row operands.

Rename npu.writebd_shimtile to npu.writebd, remove column_num operand, add row
operand.

Make npu.write32 column and row operands optional. Before Xilinx#1517 this operation
mapped to a firmware operation that interprets the address operand as a tile
relative offset, then under the hood uses (row, column, offset) to compute the
write32 address. For backwards compatibility, if row and column are present, this
behavior is preserved by aie-translate --aie-npu-instgen. Otherwise, the address
operand is used without modification as the write32 address.
@fifield fifield added this pull request to the merge queue Jun 10, 2024
Merged via the queue into main with commit 1a362e6 Jun 10, 2024
51 checks passed
@fifield fifield deleted the no-prolog branch June 10, 2024 21:19
fifield added a commit to Xilinx/mlir-air that referenced this pull request Jun 10, 2024
@andrej
Copy link
Collaborator

andrej commented Jun 10, 2024

@jgmelber I believe we need to update the version in utils/quick_setup.sh when you get a chance. With these changes none of the matrix examples work otherwise.

@jgmelber
Copy link
Collaborator

@jgmelber I believe we need to update the version in utils/quick_setup.sh when you get a chance. With these changes none of the matrix examples work otherwise.

Fixed in #1546

nirvedhmeshram added a commit to nod-ai/iree-amd-aie that referenced this pull request Jun 13, 2024
This PR makes the required changes to switch to executing kernels with
transaction binary flow with no control packets. This is done by simply
updating the mlir-aie wheel to latest so that this PR is contained in
it,
Xilinx/mlir-aie#1517
fifield added a commit to Xilinx/mlir-air that referenced this pull request Jun 14, 2024
fifield added a commit to Xilinx/mlir-air that referenced this pull request Jun 14, 2024
* bump mlir-aie, llvm

* update tests for Xilinx/mlir-aie#1517

* Apply suggestions from code review

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* update pipelines to use one shot bufferize

* bump mlir-aie

* update xrt backend

* update test

* update for Xilinx/mlir-aie#1540

* Apply suggestions from code review

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* update for write32 changes

* update for write32 change part 2

* bump mlir-aie

* fixup

---------

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