-
Notifications
You must be signed in to change notification settings - Fork 102
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
Remove (X, Y) coordinates from NpuDmaMemcpyNdOp #1971
base: main
Are you sure you want to change the base?
Conversation
Coverage ReportCreated: 2025-02-12 19:24Click here for information about interpreting this report.
Generated by llvm-cov -- llvm version 18.1.3 |
Debug status:
|
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>
… into target-model-issue
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>
test/dialect/AIEX/bad_npu_nd.mlir
Outdated
@@ -9,26 +9,29 @@ | |||
// | |||
//===----------------------------------------------------------------------===// | |||
|
|||
// RUN: aie-opt --split-input-file --verify-diagnostics %s | |||
// RUN: aie-opt --split-input-file --aie-dma-to-npu --verify-diagnostics %s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the pass added here just to run verification? Why the move of the verifier from the dialect to the pass?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously, the verifyStridesWraps
function was part of NpuDmaMemcpy::verify()
, but it relied on getX()
and getY()
to retrieve row and column values. As a result, the function has been moved into the pass, where it now obtains row and column values from ShimDmaAllocOp
. This change means that some tests in bad_npu_nd.mlir
related to sizes and strides, which were previously verifiable directly from the dialect, can no longer be verified this way and now require the pass.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously, the
verifyStridesWraps
function was part ofNpuDmaMemcpy::verify()
, but it relied ongetX()
andgetY()
to retrieve row and column values. As a result, the function has been moved into the pass, where it now obtains row and column values fromShimDmaAllocOp
. This change means that some tests inbad_npu_nd.mlir
related to sizes and strides, which were previously verifiable directly from the dialect, can no longer be verified this way and now require the pass.
But all we've done by moving the verification is hard code the row to zero and get the column from the info op. I don't understand how that is dependent on being inside the pass? Can't we do the same hardcode + info op lookup in the previous code location?
… into target-model-issue
Issue #1964
Requires #1997
This PR fixes an issue where the X and Y input attributes of the
NpuDmaMemcpyNdOp
given through the python bindings were always (0, 0), which may not be the coordinates of the Shim tile that the operation will be mapped to (and were not intended to represent that, by design). Instead, the lowering uses the metadata input of theNpuDmaMemcpyNdOp
to find the correspondingShimDMAAllocationOp
. As this operation has the column coordinate (and the row coordinate is implicit for Shim tiles) this PR removes the X and Y coordinates from theNpuDmaMemcpyNdOp
altogether and fully relies on the metadata to find the information.