[Mlir-commits] [mlir] [MLIR][GPUToLLVMSPV] Use `llvm.func` attributes to convert `gpu.shuffle` (PR #116967)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Nov 20 05:46:45 PST 2024
================
@@ -383,7 +308,20 @@ gpu.module @shuffles attributes {
%shuffleResult4, %valid4 = gpu.shuffle up %f16_val, %offset, %width : f16
%shuffleResult5, %valid5 = gpu.shuffle up %f32_val, %offset, %width : f32
%shuffleResult6, %valid6 = gpu.shuffle down %f64_val, %offset, %width : f64
- return
+ llvm.return
+ }
+}
+
+// -----
+
+// Check attaching a discardable attribute to a `gpu.func` hosting a `gpu.shuffle` operation works,
+// i.e., the attribute is propagated.
+
+gpu.module @shuffles_ {
+ gpu.func @propagated_size(%val: i32, %id: i32) attributes {intel_reqd_sub_group_size = 16 : i32} {
----------------
FMarno wrote:
```suggestion
gpu.func @propagated_size(%val: i32, %id: i32) attributes {llvm.intel_reqd_sub_group_size = 16 : i32} {
```
I thought discardable attributes needed a prefix
https://github.com/llvm/llvm-project/pull/116967
More information about the Mlir-commits
mailing list