summaryrefslogtreecommitdiff
path: root/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
diff options
context:
space:
mode:
authorKrzysztof Drewniak <Krzysztof.Drewniak@amd.com>2025-05-06 11:22:15 -0500
committerGitHub <noreply@github.com>2025-05-06 11:22:15 -0500
commitc7c1283ab2fbef0843c1ec2ea80477834cccb0eb (patch)
tree6ef20f7283acb4daeff349a97ec42fa072784360 /mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
parent6fc092fc417e5c4e9fd78c3cc5892bacae405c72 (diff)
[mlir][MemRef] Remove integer address space builders (#138579)
The forms of the MemRef builder that took an integer argument instead of an attribute have been deprecated for years now, and have almost no upstream uses (the remaining ones are handled in this PR). Therefore, remove them.
Diffstat (limited to 'mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp')
-rw-r--r--mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp b/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
index eda2594fbc7c..b73c40adcffa 100644
--- a/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
+++ b/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
@@ -518,15 +518,17 @@ struct TestVectorScanLowering
static Value allocateGlobalSharedMemory(Location loc, OpBuilder &builder,
gpu::WarpExecuteOnLane0Op warpOp,
Type type) {
- static constexpr int64_t kSharedMemorySpace = 3;
+ Attribute sharedMemorySpaceAttr =
+ builder.getAttr<gpu::AddressSpaceAttr>(gpu::AddressSpace::Workgroup);
// Compute type of shared memory buffer.
MemRefType memrefType;
if (auto vectorType = dyn_cast<VectorType>(type)) {
memrefType =
- MemRefType::get(vectorType.getShape(), vectorType.getElementType(), {},
- kSharedMemorySpace);
+ MemRefType::get(vectorType.getShape(), vectorType.getElementType(),
+ MemRefLayoutAttrInterface{}, sharedMemorySpaceAttr);
} else {
- memrefType = MemRefType::get({1}, type, {}, kSharedMemorySpace);
+ memrefType = MemRefType::get({1}, type, MemRefLayoutAttrInterface{},
+ sharedMemorySpaceAttr);
}
// Get symbol table holding all shared memory globals.