[Mlir-commits] [mlir] 1bfa40a - [mlir][spirv] Change default subgroup size

Lei Zhang llvmlistbot at llvm.org
Fri Dec 10 16:21:17 PST 2021


Author: Lei Zhang
Date: 2021-12-10T19:20:49-05:00
New Revision: 1bfa40a5d6e117bd932a928961a67c17380be83e

URL: https://github.com/llvm/llvm-project/commit/1bfa40a5d6e117bd932a928961a67c17380be83e
DIFF: https://github.com/llvm/llvm-project/commit/1bfa40a5d6e117bd932a928961a67c17380be83e.diff

LOG: [mlir][spirv] Change default subgroup size

This should really come from a matching target environment. But
as a default, it can be handy (to avoid always listing the full
resource limits attribute in IR, etc.). It's common to see 32
so use that as the subgroup size.

Reviewed By: scotttodd

Differential Revision: https://reviews.llvm.org/D115534

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/SPIRV/IR/TargetAndABI.td

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/SPIRV/IR/TargetAndABI.td b/mlir/include/mlir/Dialect/SPIRV/IR/TargetAndABI.td
index f9a6600df2ac6..22fd54221c332 100644
--- a/mlir/include/mlir/Dialect/SPIRV/IR/TargetAndABI.td
+++ b/mlir/include/mlir/Dialect/SPIRV/IR/TargetAndABI.td
@@ -78,8 +78,7 @@ def SPV_ResourceLimitsAttr : StructAttr<"ResourceLimitsAttr", SPIRV_Dialect, [
                     DefaultValuedAttr<I32ElementsAttr, "{128, 128, 64}">>,
 
     // The default number of invocations in each subgroup.
-    // 0x7FFFFFFF means unknown.
-    StructFieldAttr<"subgroup_size", DefaultValuedAttr<I32Attr, "0x7FFFFFFF">>,
+    StructFieldAttr<"subgroup_size", DefaultValuedAttr<I32Attr, "32">>,
 
     // The configurations of cooperative matrix operations
     // supported. Default is an empty list.


        


More information about the Mlir-commits mailing list