[Mlir-commits] [mlir] [mlir][gpu] Add extra value types for gpu::ShuffleOp (PR #104605)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Aug 19 09:19:40 PDT 2024


================
@@ -1250,17 +1250,17 @@ def GPU_ShuffleMode : I32EnumAttr<"ShuffleMode",
 def GPU_ShuffleModeAttr : EnumAttr<GPU_Dialect, GPU_ShuffleMode,
                                    "shuffle_mode">;
 
-def I32I64F32OrF64 : TypeConstraint<Or<[I32.predicate,
-                                        I64.predicate,
-                                        F32.predicate,
-                                        F64.predicate]>,
-                                       "i32, i64, f32 or f64">;
+def GPUShuffleTypes : TypeConstraint<Or<[
+  SignlessIntOfWidths<[8, 16, 32, 64]>.predicate,
+  FloatOfWidths<[16, 32, 64]>.predicate
----------------
FMarno wrote:

I'd be open to changing that to `AnyIntegerOrFloatOr1DVector` and returning `failure()` for types other than `i8,i16,i32,i64,f16,f32,f64` from the `gpu-to-llvm-spv` backend.

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


More information about the Mlir-commits mailing list