13 #ifndef MLIR_DIALECT_SPARSETENSOR_PIPELINES_PASSES_H_
14 #define MLIR_DIALECT_SPARSETENSOR_PIPELINES_PASSES_H_
24 namespace sparse_tensor {
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 "
161 enableRuntimeLibrary);
166 ConvertVectorToLLVMPassOptions opts{};
167 opts.reassociateFPReductions = reassociateFPReductions;
168 opts.force32BitVectorIndices = force32BitVectorIndices;
169 opts.armNeon = armNeon;
170 opts.armSVE = armSVE;
172 opts.x86Vector = x86Vector;
static llvm::ManagedStatic< PassManagerOptions > options
This class represents a pass manager that runs passes on either a specific operation type,...
Subclasses of PassPipelineOptions provide a set of options that can be used to initialize a pass pipe...
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.
Options for the Sparsification pass.
Options for the "sparsifier" pipeline.
SparsificationOptions sparsificationOptions() const
Projects out the options for createSparsificationPass.
ConvertVectorToLLVMPassOptions convertVectorToLLVMOptions() const
Projects out the options for createConvertVectorToLLVMPass.