-
Notifications
You must be signed in to change notification settings - Fork 15.3k
[mlir][amdgpu] Add amdgpu.make_dma_descriptor #169407
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
Changes from all commits
a4a1a59
d14f3e2
d3ca18c
76e47f1
f6f67e3
1e2668c
f1df3c5
a24a840
ccaf771
566d2e6
2be4ccc
b3ba450
d34c423
cfb20cc
5e98ed0
5cca5f9
0f913f5
adcbc32
61fd94d
3de0f3c
0a70e24
ec58b7c
29072b8
50e76d4
b339c7a
fb82ac3
445f96e
e022322
850d6d0
a8fbe1a
d51853c
3b6bd2c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -705,6 +705,44 @@ LogicalResult TransposeLoadOp::verify() { | |
| return success(); | ||
| } | ||
|
|
||
| //===----------------------------------------------------------------------===// | ||
| // MakeDmaDescriptorOp | ||
| //===----------------------------------------------------------------------===// | ||
|
|
||
| LogicalResult MakeDmaDescriptorOp::verify() { | ||
| ArrayRef<int64_t> globalStaticStrides = getGlobalStaticStrides(); | ||
|
|
||
| if (globalStaticStrides.empty()) { | ||
| return emitOpError("strides must not be empty."); | ||
| } | ||
| if (globalStaticStrides.back() != 1) { | ||
| return emitOpError("strides for the innermost dimension must be 1."); | ||
| } | ||
|
|
||
| ArrayRef<int64_t> globalStaticSizes = getGlobalStaticSizes(); | ||
| size_t rank = globalStaticSizes.size(); | ||
| if (rank != globalStaticStrides.size()) { | ||
| return emitOpError("strides and sizes must have same rank."); | ||
| } | ||
|
|
||
| ArrayRef<int64_t> sharedStaticSizes = getSharedStaticSizes(); | ||
| if (rank != sharedStaticSizes.size()) { | ||
| return emitOpError("tensor must have same rank as tile."); | ||
| } | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should probably check that the atomic barrier is in LDS if it is present (if I'm remembering the conditions correctly)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the review! d51853c I will merge after the tests finish and continue working on the comments on the next one. Will ping you when ready :) |
||
| if (Value atomicBarrierAddress = getAtomicBarrierAddress()) { | ||
| MemRefType atomicBarrierAddressType = | ||
| cast<MemRefType>(atomicBarrierAddress.getType()); | ||
| bool barrierInLDS = | ||
| hasWorkgroupMemorySpace(atomicBarrierAddressType.getMemorySpace()); | ||
| if (!barrierInLDS) { | ||
| return emitOpError("atomic barrier address must be in LDS."); | ||
| } | ||
| } | ||
|
|
||
| return success(); | ||
krzysz00 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| //===----------------------------------------------------------------------===// | ||
| // ScaledMFMAOp | ||
| //===----------------------------------------------------------------------===// | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.