Skip to content

Commit 3748970

Browse files
nirvedhmeshramkeshavvinayak01
authored andcommitted
[NFC] Add a dev flag to not do reduction vector distribution (iree-org#21532)
Does not change default behavior. But developers can use `--iree-codegen-llvmgpu-use-reduction-vector-distribution=false ` if they wish. Signed-off-by: Nirvedh Meshram <[email protected]> Signed-off-by: keshavvinayak01 <[email protected]>
1 parent 3f38e97 commit 3748970

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

compiler/src/iree/compiler/Codegen/LLVMGPU/KernelConfig.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ llvm::cl::opt<bool> clGPUEnableVectorDistribution(
7373
llvm::cl::desc("enable the usage of the vector distribution pipeline"),
7474
llvm::cl::init(true));
7575

76+
llvm::cl::opt<bool> clGPUEnableReductionVectorDistribution(
77+
"iree-codegen-llvmgpu-use-reduction-vector-distribution",
78+
llvm::cl::desc(
79+
"enable the usage of the reduction vector distribution pipeline"),
80+
llvm::cl::init(true));
81+
7682
// TODO (nirvedhmeshram): Drop this whole path after we have support with
7783
// TileAndFuse pipeline from completion of
7884
// https://github.com/iree-org/iree/issues/18858
@@ -746,6 +752,10 @@ static LogicalResult
746752
setReductionVectorDistributionConfig(IREE::GPU::TargetAttr target,
747753
mlir::FunctionOpInterface entryPoint,
748754
linalg::LinalgOp op) {
755+
if (!clGPUEnableReductionVectorDistribution) {
756+
LDBG() << "Reduction Vector Distribution not enabled, skipping...";
757+
return failure();
758+
}
749759
MLIRContext *context = op.getContext();
750760
OpBuilder b(context);
751761

0 commit comments

Comments
 (0)