[Mlir-commits] [mlir] [mlir][gpu] Allow subgroup reductions over 1-d vector types (PR #76015)

Ivan Butygin llvmlistbot at llvm.org
Wed Dec 20 05:40:11 PST 2023


================
@@ -591,10 +592,12 @@ class GPUSubgroupReduceConversion final
   LogicalResult
   matchAndRewrite(gpu::SubgroupReduceOp op, OpAdaptor adaptor,
                   ConversionPatternRewriter &rewriter) const override {
-    auto opType = op.getOp();
-    auto result =
-        createGroupReduceOp(rewriter, op.getLoc(), adaptor.getValue(), opType,
-                            /*isGroup*/ false, op.getUniform());
+    if (isa<VectorType>(adaptor.getValue().getType()))
----------------
Hardcode84 wrote:

IMO, instead of rejecting vector, better to check types which are supported:
```
if (!isa<IntegerType, FloatType>(...))
```
Also, `notifyMatchFailure`

https://github.com/llvm/llvm-project/pull/76015


More information about the Mlir-commits mailing list