[Mlir-commits] [mlir] 99a1986 - [mlir][Python][linalg] Fix to limit size of SmallVector.

Tobias Gysi llvmlistbot at llvm.org
Thu May 20 00:27:22 PDT 2021


Author: Tobias Gysi
Date: 2021-05-20T07:24:41Z
New Revision: 99a198641cbb196a1bdfd444ae64c0ab8d4d4c55

URL: https://github.com/llvm/llvm-project/commit/99a198641cbb196a1bdfd444ae64c0ab8d4d4c55
DIFF: https://github.com/llvm/llvm-project/commit/99a198641cbb196a1bdfd444ae64c0ab8d4d4c55.diff

LOG: [mlir][Python][linalg] Fix to limit size of SmallVector.

Stack allocate at most two ScalarAssign elements. Using the default number of inlined elements triggered a static assert in some setups (https://reviews.llvm.org/D102075).

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

Added: 
    

Modified: 
    mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-yaml-gen.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-yaml-gen.cpp b/mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-yaml-gen.cpp
index 1c5a20b80f538..90c237e4bf7cc 100644
--- a/mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-yaml-gen.cpp
+++ b/mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-yaml-gen.cpp
@@ -117,7 +117,7 @@ struct LinalgStructuredOpConfig {
   SmallVector<LinalgTensorDef> args;
   LinalgIndexingMapsConfig indexingMaps;
   SmallVector<LinalgIteratorTypeDef> iteratorTypes;
-  SmallVector<ScalarAssign> assignments;
+  SmallVector<ScalarAssign, 2> assignments;
 };
 
 struct LinalgOpConfig {


        


More information about the Mlir-commits mailing list