summaryrefslogtreecommitdiff
path: root/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
diff options
context:
space:
mode:
authorMaksim Levental <maksim.levental@gmail.com>2025-07-25 11:48:00 -0500
committerGitHub <noreply@github.com>2025-07-25 11:48:00 -0500
commit258d04c810ab10f101324cbf1fe3c7be65eb1938 (patch)
tree0c8ce2fba1c89fb462ae41491221b10326d27fb6 /mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
parenta6bf40d1c6cf010b3ad90bf7f410983453f4deb2 (diff)
[mlir][NFC] update `mlir/Dialect` create APIs (28/n) (#150641)
See https://github.com/llvm/llvm-project/pull/147168 for more info.
Diffstat (limited to 'mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp')
-rw-r--r--mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp b/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
index a7285ab8cb15..cf8353a4089e 100644
--- a/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
+++ b/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
@@ -546,8 +546,8 @@ static Value allocateGlobalSharedMemory(Location loc, OpBuilder &builder,
auto ip = builder.saveInsertionPoint();
builder.setInsertionPoint(moduleOp);
- auto global = builder.create<memref::GlobalOp>(
- loc,
+ auto global = memref::GlobalOp::create(
+ builder, loc,
/*sym_name=*/symbolName,
/*sym_visibility=*/builder.getStringAttr("private"),
/*type=*/memrefType,
@@ -560,13 +560,13 @@ static Value allocateGlobalSharedMemory(Location loc, OpBuilder &builder,
global->moveBefore(&moduleOp.front());
builder.restoreInsertionPoint(ip);
- return builder.create<memref::GetGlobalOp>(loc, memrefType, symbolName);
+ return memref::GetGlobalOp::create(builder, loc, memrefType, symbolName);
}
static Value warpReduction(Location loc, OpBuilder &builder, Value input,
CombiningKind kind, uint32_t size) {
// First reduce on a single thread to get per lane reduction value.
- Value laneVal = builder.create<vector::ReductionOp>(loc, kind, input);
+ Value laneVal = vector::ReductionOp::create(builder, loc, kind, input);
// Parallel reduction using butterfly shuffles.
for (uint64_t i = 1; i < size; i <<= 1) {
Value shuffled = builder
@@ -647,9 +647,9 @@ struct TestVectorDistribution
"unsupported shuffle type");
Type i32Type = builder.getIntegerType(32);
Value srcIdxI32 =
- builder.create<arith::IndexCastOp>(loc, i32Type, srcIdx);
- Value warpSzI32 = builder.create<arith::ConstantOp>(
- loc, builder.getIntegerAttr(i32Type, warpSz));
+ arith::IndexCastOp::create(builder, loc, i32Type, srcIdx);
+ Value warpSzI32 = arith::ConstantOp::create(
+ builder, loc, builder.getIntegerAttr(i32Type, warpSz));
Value result = builder
.create<gpu::ShuffleOp>(loc, val, srcIdxI32, warpSzI32,
gpu::ShuffleMode::IDX)
@@ -680,7 +680,7 @@ struct TestVectorDistribution
options.warpAllocationFn = allocateGlobalSharedMemory;
options.warpSyncronizationFn = [](Location loc, OpBuilder &builder,
gpu::WarpExecuteOnLane0Op warpOp) {
- builder.create<gpu::BarrierOp>(loc);
+ gpu::BarrierOp::create(builder, loc);
};
// Test on one pattern in isolation.
if (warpOpToSCF) {