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."))};
56 *
this,
"enable-runtime-library",
57 desc(
"Enable runtime library for manipulating sparse tensors"),
61 *
this,
"test-bufferization-analysis-only",
62 desc(
"Run only the inplacability analysis"), init(
false)};
65 *
this,
"enable-buffer-initialization",
66 desc(
"Enable zero-initialization of memory buffers"), init(
false)};
71 *
this,
"create-sparse-deallocs",
72 desc(
"Specify if the temporary buffers created by the sparse "
73 "compiler should be deallocated. For compatibility with core "
74 "bufferization passes. "
75 "This option is only used when enable-runtime-library=false."),
79 *
this,
"vl", desc(
"Set the vector length (0 disables vectorization)"),
85 *
this,
"reassociate-fp-reductions",
86 desc(
"Allows llvm to reassociate floating-point reductions for speed"),
89 *
this,
"enable-index-optimizations",
90 desc(
"Allows compiler to assume indices fit in 32-bit if that yields "
95 desc(
"Enables the use of AMX dialect while lowering the vector dialect"),
98 *
this,
"enable-arm-neon",
99 desc(
"Enables the use of ArmNeon dialect while lowering the vector "
103 *
this,
"enable-arm-sve",
104 desc(
"Enables the use of ArmSVE dialect while lowering the vector "
108 *
this,
"enable-x86vector",
109 desc(
"Enables the use of X86Vector dialect while lowering the vector "
115 desc(
"GPU target triple")};
117 desc(
"GPU target architecture")};
119 desc(
"GPU target features")};
136 *
this,
"gpu-format", desc(
"GPU compilation format"), init(
"fatbin")};
140 *
this,
"enable-gpu-libgen",
141 desc(
"Enables GPU acceleration by means of direct library calls (like "
151 ConvertVectorToLLVMPassOptions opts{};
152 opts.reassociateFPReductions = reassociateFPReductions;
153 opts.force32BitVectorIndices = force32BitVectorIndices;
154 opts.armNeon = armNeon;
155 opts.armSVE = armSVE;
157 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...
Detect if any of the given parameter types has a sub-element handler.
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.
ConvertVectorToLLVMPassOptions lowerVectorToLLVMOptions() const
Projects out the options for createConvertVectorToLLVMPass.
SparsificationOptions sparsificationOptions() const
Projects out the options for createSparsificationPass.