File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
compiler/src/iree/compiler/Codegen/LLVMGPU Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,12 @@ static llvm::cl::opt<int64_t> clLLVMGPUSharedMemoryLimit(
6767 "allocated for the given target"),
6868 llvm::cl::init(163 * 1024));
6969
70+ static llvm::cl::opt<bool> clLLVMGPUEnableSharedMemoryReuse(
71+ "iree-llvmgpu-enable-shared-memory-reuse",
72+ llvm::cl::desc(
73+ "Enable shared memory reuse in the vector distribute pipeline"),
74+ llvm::cl::init(false));
75+
7076//===----------------------------------------------------------------------===//
7177// Bufferization Configuration
7278//===----------------------------------------------------------------------===//
@@ -914,10 +920,13 @@ void addGPUVectorDistributePassPipeline(OpPassManager &funcPassManager,
914920 options.paddingBits = 64;
915921 funcPassManager.addPass(createGPUReduceBankConflictsPass(options));
916922 }
917-
918923 if (options.prefetchSharedMemory) {
919924 funcPassManager.addPass(createLLVMGPUPrefetchSharedMemoryPass());
920925 }
926+ if (clLLVMGPUEnableSharedMemoryReuse) {
927+ funcPassManager.addPass(createHoistStaticallyBoundAllocationsPass());
928+ funcPassManager.addPass(createGPUReuseSharedMemoryAllocsPass());
929+ }
921930 funcPassManager.addPass(memref::createFoldMemRefAliasOpsPass());
922931 funcPassManager.addPass(createCSEPass());
923932 funcPassManager.addPass(createCanonicalizerPass());
You can’t perform that action at this time.
0 commit comments