Skip to content

Commit fc7818f

Browse files
committed
[mlir][vector] rephrased description
More carefully worded description. Added constructor to options. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D92664
1 parent 1b404ad commit fc7818f

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

mlir/include/mlir/Conversion/Passes.td

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -394,9 +394,10 @@ def ConvertVectorToLLVM : Pass<"convert-vector-to-llvm", "ModuleOp"> {
394394

395395
Convert operations from the vector dialect into the LLVM IR dialect
396396
operations. The lowering pass provides several options to control
397-
the kind of optimizations that are allowed. It also provides options
398-
that augment the architectural-neutral vector dialect with
399-
architectural-specific dialects (AVX512, Neon, etc.).
397+
the kinds of optimizations that are allowed. It also provides options
398+
that enable the use of one or more architectural-specific dialects
399+
(AVX512, Neon, SVE, etc.) in combination with the architectural-neutral
400+
vector dialect lowering.
400401

401402
}];
402403
let constructor = "mlir::createConvertVectorToLLVMPass()";
@@ -411,7 +412,8 @@ def ConvertVectorToLLVM : Pass<"convert-vector-to-llvm", "ModuleOp"> {
411412
"faster code">,
412413
Option<"enableAVX512", "enable-avx512",
413414
"bool", /*default=*/"false",
414-
"Augments the vector dialect with the AVX512 dialect during lowering">
415+
"Enables the use of AVX512 dialect while lowering the vector "
416+
"dialect.">
415417
];
416418
}
417419

mlir/include/mlir/Conversion/VectorToLLVM/ConvertVectorToLLVM.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ class OperationPass;
2121
/// This should kept in sync with VectorToLLVM options defined for the
2222
/// ConvertVectorToLLVM pass in include/mlir/Conversion/Passes.td
2323
struct LowerVectorToLLVMOptions {
24-
bool reassociateFPReductions = false;
25-
bool enableIndexOptimizations = true;
26-
bool enableAVX512 = false;
24+
LowerVectorToLLVMOptions()
25+
: reassociateFPReductions(false), enableIndexOptimizations(true),
26+
enableAVX512(false) {}
27+
2728
LowerVectorToLLVMOptions &setReassociateFPReductions(bool b) {
2829
reassociateFPReductions = b;
2930
return *this;
@@ -36,6 +37,10 @@ struct LowerVectorToLLVMOptions {
3637
enableAVX512 = b;
3738
return *this;
3839
}
40+
41+
bool reassociateFPReductions;
42+
bool enableIndexOptimizations;
43+
bool enableAVX512;
3944
};
4045

4146
/// Collect a set of patterns to convert from Vector contractions to LLVM Matrix

0 commit comments

Comments
 (0)