Skip to content

Commit

Permalink
Delete LoadStoreVectorizationPass which is unused in IREE (#5514)
Browse files Browse the repository at this point in the history
We have a proper flow to vectorize element wise ops after tiling, and it
is not used in old pipeline. We can delete the pass and the option.

The registration of `createVectorizeLinalgConvPass` was missing. The
PR also adds it to init_conversions.h.
  • Loading branch information
hanhanW authored Apr 19, 2021
1 parent 064a416 commit d1b5956
Show file tree
Hide file tree
Showing 12 changed files with 1 addition and 538 deletions.
6 changes: 0 additions & 6 deletions iree/compiler/Conversion/LinalgToSPIRV/CodeGenOptionUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ SPIRVCodegenOptions getSPIRVCodegenOptionsFromClOptions() {
llvm::cl::desc("Use workgroup memory in SPIR-V code generation"),
llvm::cl::init(false));

static llvm::cl::opt<bool> clVectorizeMemref(
"iree-spirv-enable-memref-vectorization",
llvm::cl::desc("Vectorize memref if possible in SPIR-V code generation"),
llvm::cl::init(false));

static llvm::cl::list<unsigned> clWorkgroupSizes(
"iree-spirv-workgroup-size",
llvm::cl::desc("Set workgroup size to use for SPIR-V code generation"),
Expand All @@ -68,7 +63,6 @@ SPIRVCodegenOptions getSPIRVCodegenOptionsFromClOptions() {
options.enableVectorization =
clEnableLinalgOnTensorsSPIRV || clEnableVectorization;
options.useWorkgroupMemory = clUseWorkgroupMemory;
options.vectorizeMemref = clVectorizeMemref;
options.usingLinalgOnTensors = clEnableLinalgOnTensorsSPIRV;
return options;
}
Expand Down
4 changes: 0 additions & 4 deletions iree/compiler/Conversion/LinalgToSPIRV/Passes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,6 @@ static void addLinalgToSPIRVPasses(OpPassManager &pm,
}

pm.addPass(createTileAndVectorizeInOneWorkgroupPass(options));
if (options.vectorizeMemref) {
pm.nest<ModuleOp>().addNestedPass<FuncOp>(
createLoadStoreVectorizationPass());
}
pm.nest<ModuleOp>().addPass(createCanonicalizerPass());

//===--------------------------------------------------------------------===//
Expand Down
1 change: 0 additions & 1 deletion iree/compiler/Conversion/LinalgToVector/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ package(
cc_library(
name = "LinalgToVector",
srcs = [
"LoadStoreVectorization.cpp",
"VectorizeConv.cpp",
],
hdrs = [
Expand Down
1 change: 0 additions & 1 deletion iree/compiler/Conversion/LinalgToVector/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ iree_cc_library(
HDRS
"Passes.h"
SRCS
"LoadStoreVectorization.cpp"
"VectorizeConv.cpp"
DEPS
LLVMSupport
Expand Down
319 changes: 0 additions & 319 deletions iree/compiler/Conversion/LinalgToVector/LoadStoreVectorization.cpp

This file was deleted.

3 changes: 0 additions & 3 deletions iree/compiler/Conversion/LinalgToVector/Passes.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
namespace mlir {
namespace iree_compiler {

/// Creates a pass to vectorize Linalg operations.
std::unique_ptr<Pass> createLoadStoreVectorizationPass();

/// Creates a pass to vectorize a very specific form of linalg.conv ops.
std::unique_ptr<Pass> createVectorizeLinalgConvPass();

Expand Down
1 change: 0 additions & 1 deletion iree/compiler/Conversion/LinalgToVector/test/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ iree_lit_test_suite(
srcs = enforce_glob(
[
"vectorize_linalg_conv.mlir",
"vectorize_linalg_ops.mlir",
],
include = ["*.mlir"],
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ iree_lit_test_suite(
lit
SRCS
"vectorize_linalg_conv.mlir"
"vectorize_linalg_ops.mlir"
DATA
iree::tools::IreeFileCheck
iree::tools::iree-opt
Expand Down
Loading

0 comments on commit d1b5956

Please sign in to comment.