summaryrefslogtreecommitdiff
path: root/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
diff options
context:
space:
mode:
authorPetr Kurapov <petr.a.kurapov@intel.com>2024-11-22 15:30:47 +0100
committerGitHub <noreply@github.com>2024-11-22 15:30:47 +0100
commitecaf2c335cd612646086ec53315cb1018a5b9d91 (patch)
tree093b2dec51f6c730222c79e04359df27d1298b07 /mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
parent556ea5265a254aabfd8d520a3b841785e99f4328 (diff)
[MLIR] Move warp_execute_on_lane_0 from vector to gpu (#116994)
Please see the related RFC here: https://discourse.llvm.org/t/rfc-move-execute-on-lane-0-from-vector-to-gpu-dialect/82989. This patch does exactly one thing - moves the op to gpu.
Diffstat (limited to 'mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp')
-rw-r--r--mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp b/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
index 72aaa7dc4f89..9d8969edfd90 100644
--- a/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
+++ b/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
@@ -519,7 +519,7 @@ struct TestVectorScanLowering
/// Allocate shared memory for a single warp to test lowering of
/// WarpExecuteOnLane0Op.
static Value allocateGlobalSharedMemory(Location loc, OpBuilder &builder,
- WarpExecuteOnLane0Op warpOp,
+ gpu::WarpExecuteOnLane0Op warpOp,
Type type) {
static constexpr int64_t kSharedMemorySpace = 3;
// Compute type of shared memory buffer.
@@ -583,8 +583,9 @@ struct TestVectorDistribution
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(TestVectorDistribution)
void getDependentDialects(DialectRegistry &registry) const override {
- registry.insert<scf::SCFDialect, memref::MemRefDialect, gpu::GPUDialect,
- affine::AffineDialect>();
+ registry
+ .insert<vector::VectorDialect, scf::SCFDialect, memref::MemRefDialect,
+ gpu::GPUDialect, affine::AffineDialect>();
}
StringRef getArgument() const final { return "test-vector-warp-distribute"; }
@@ -622,7 +623,7 @@ struct TestVectorDistribution
RewritePatternSet patterns(&getContext());
getOperation().walk([&](Operation *op) {
- if (auto warpOp = dyn_cast<WarpExecuteOnLane0Op>(op)) {
+ if (auto warpOp = dyn_cast<gpu::WarpExecuteOnLane0Op>(op)) {
if (hoistUniform) {
moveScalarUniformCode(warpOp);
}
@@ -677,7 +678,7 @@ struct TestVectorDistribution
WarpExecuteOnLane0LoweringOptions options;
options.warpAllocationFn = allocateGlobalSharedMemory;
options.warpSyncronizationFn = [](Location loc, OpBuilder &builder,
- WarpExecuteOnLane0Op warpOp) {
+ gpu::WarpExecuteOnLane0Op warpOp) {
builder.create<gpu::BarrierOp>(loc);
};
// Test on one pattern in isolation.