13#ifndef MLIR_DIALECT_SPARSETENSOR_PIPELINES_PASSES_H_
14#define MLIR_DIALECT_SPARSETENSOR_PIPELINES_PASSES_H_
34 *
this,
"parallelization-strategy",
35 ::llvm::cl::desc(
"Set the parallelization strategy"),
39 "Turn off sparse parallelization."),
42 "Enable dense outer loop sparse parallelization."),
44 "any-storage-outer-loop",
45 "Enable sparse parallelization regardless of storage for "
49 "Enable dense parallelization for any loop."),
52 "any-storage-any-loop",
53 "Enable sparse parallelization for any storage and loop."))};
55 *
this,
"sparse-emit-strategy",
57 "Emit functional code or interfaces (to debug) for sparse loops"),
61 "Emit functional code (with scf.for/while)."),
64 "Emit (experimental) loops (with sparse.iterate)."),
67 "Emit non-functional but easy-to-read interfaces to debug."))};
70 *
this,
"enable-runtime-library",
71 desc(
"Enable runtime library for manipulating sparse tensors"),
75 *
this,
"test-bufferization-analysis-only",
76 desc(
"Run only the inplacability analysis"), init(
false)};
79 *
this,
"enable-buffer-initialization",
80 desc(
"Enable zero-initialization of memory buffers"), init(
false)};
85 *
this,
"create-sparse-deallocs",
86 desc(
"Specify if the temporary buffers created by the sparse "
87 "compiler should be deallocated. For compatibility with core "
88 "bufferization passes. "
89 "This option is only used when enable-runtime-library=false."),
93 *
this,
"vl", desc(
"Set the vector length (0 disables vectorization)"),
99 *
this,
"reassociate-fp-reductions",
100 desc(
"Allows llvm to reassociate floating-point reductions for speed"),
103 *
this,
"enable-index-optimizations",
104 desc(
"Allows compiler to assume indices fit in 32-bit if that yields "
109 desc(
"Enables the use of AMX dialect while lowering the vector dialect"),
112 *
this,
"enable-arm-neon",
113 desc(
"Enables the use of ArmNeon dialect while lowering the vector "
117 *
this,
"enable-arm-sve",
118 desc(
"Enables the use of ArmSVE dialect while lowering the vector "
122 *
this,
"enable-x86vector",
123 desc(
"Enables the use of X86Vector dialect while lowering the vector "
129 desc(
"GPU target triple")};
131 desc(
"GPU target architecture")};
133 desc(
"GPU target features")};
150 *
this,
"gpu-format", desc(
"GPU compilation format"), init(
"fatbin")};
154 *
this,
"enable-gpu-libgen",
155 desc(
"Enables GPU acceleration by means of direct library calls (like "
static llvm::ManagedStatic< PassManagerOptions > options
This class represents a pass manager that runs passes on either a specific operation type,...
This class represents a specific pass option, with a provided data type.
void buildSparsifier(OpPassManager &pm, const SparsifierOptions &options)
Adds the "sparsifier" pipeline to the OpPassManager.
void registerSparseTensorPipelines()
Registers all pipelines for the sparse_tensor dialect.
Include the generated interface declarations.
bool force32BitVectorIndices
bool reassociateFPReductions
Options for the Sparsification pass.
Options for the "sparsifier" pipeline.
PassOptions::Option< mlir::SparseParallelizationStrategy > parallelization
PassOptions::Option< mlir::SparseEmitStrategy > emitStrategy
PassOptions::Option< bool > armNeon
PassOptions::Option< bool > reassociateFPReductions
SparsificationOptions sparsificationOptions() const
Projects out the options for createSparsificationPass.
PassOptions::Option< bool > testBufferizationAnalysisOnly
PassOptions::Option< std::string > gpuFormat
For NVIDIA GPUs there are 3 compilation format options:
PassOptions::Option< std::string > gpuTriple
These options are used to enable GPU code generation.
PassOptions::Option< bool > enableBufferInitialization
PassOptions::Option< bool > x86Vector
PassOptions::Option< bool > createSparseDeallocs
PassOptions::Option< bool > enableRuntimeLibrary
PassOptions::Option< bool > amx
PassOptions::Option< bool > enableGPULibgen
This option is used to enable GPU library generation.
PassOptions::Option< bool > force32BitVectorIndices
PassOptions::Option< std::string > gpuFeatures
ConvertVectorToLLVMPassOptions convertVectorToLLVMOptions() const
Projects out the options for createConvertVectorToLLVMPass.
PassOptions::Option< std::string > gpuChip
PassOptions::Option< bool > armSVE
PassOptions::Option< int32_t > vectorLength