[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 08:04:05 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:
if it's not your use case then I maybe wouldn't worry about it. Add what you need, right?
I will say that you have called it a discardable attribute in the comment above.
I could be wrong about this but I was under the impression that there are inherent and discardable attributes, and this seems to be neither.
https://github.com/llvm/llvm-project/pull/116967
More information about the Mlir-commits
mailing list