MLIR  16.0.0git
Public Member Functions | Public Attributes | List of all members
mlir::sparse_tensor::SparseCompilerOptions Struct Reference

Options for the "sparse-compiler" pipeline. More...

#include "mlir/Dialect/SparseTensor/Pipelines/Passes.h"

+ Inheritance diagram for mlir::sparse_tensor::SparseCompilerOptions:
+ Collaboration diagram for mlir::sparse_tensor::SparseCompilerOptions:

Public Member Functions

SparsificationOptions sparsificationOptions () const
 Projects out the options for createSparsificationPass. More...
 
SparseTensorConversionOptions sparseTensorConversionOptions () const
 Projects out the options for createSparsificationPass. More...
 
LowerVectorToLLVMOptions lowerVectorToLLVMOptions () const
 Projects out the options for createConvertVectorToLLVMPass. More...
 
- Public Member Functions inherited from mlir::detail::PassOptions
 PassOptions ()=default
 
 PassOptions (const PassOptions &)=delete
 Delete the copy constructor to avoid copying the internal options map. More...
 
 PassOptions (PassOptions &&)=delete
 
void copyOptionValuesFrom (const PassOptions &other)
 Copy the option values from 'other' into 'this', where 'other' has the same options as 'this'. More...
 
LogicalResult parseFromString (StringRef options)
 Parse options out as key=value pairs that can then be handed off to the llvm::cl command line passing infrastructure. More...
 
void print (raw_ostream &os)
 Print the options held by this struct in a form that can be parsed via 'parseFromString'. More...
 
void printHelp (size_t indent, size_t descIndent) const
 Print the help string for the options held by this struct. More...
 
size_t getOptionWidth () const
 Return the maximum width required when printing the help string. More...
 

Public Attributes

PassOptions::Option< mlir::SparseParallelizationStrategyparallelization
 
PassOptions::Option< mlir::SparseVectorizationStrategyvectorization
 
PassOptions::Option< int32_t > vectorLength
 
PassOptions::Option< bool > enableSIMDIndex32
 
PassOptions::Option< bool > enableVLAVectorization
 
PassOptions::Option< bool > enableRuntimeLibrary
 
PassOptions::Option< bool > testBufferizationAnalysisOnly
 
PassOptions::Option< int32_t > sparseToSparse
 
PassOptions::Option< bool > reassociateFPReductions
 
PassOptions::Option< bool > indexOptimizations
 
PassOptions::Option< bool > amx
 
PassOptions::Option< bool > armNeon
 
PassOptions::Option< bool > armSVE
 
PassOptions::Option< bool > x86Vector
 

Additional Inherited Members

- Public Types inherited from mlir::detail::PassOptions
template<typename DataType >
using OptionParser = std::conditional_t< std::is_base_of< llvm::cl::generic_parser_base, llvm::cl::parser< DataType > >::value, GenericOptionParser< DataType >, llvm::cl::parser< DataType > >
 The specific parser to use depending on llvm::cl parser used. More...
 
- Static Public Member Functions inherited from mlir::PassPipelineOptions< SparseCompilerOptions >
static std::unique_ptr< SparseCompilerOptions > createFromString (StringRef options)
 Factory that parses the provided options and returns a unique_ptr to the struct. More...
 

Detailed Description

Options for the "sparse-compiler" pipeline.

So far this only contains a subset of the options that can be set for the underlying passes, because it must be manually kept in sync with the tablegen files for those passes.

Definition at line 30 of file Passes.h.

Member Function Documentation

◆ lowerVectorToLLVMOptions()

LowerVectorToLLVMOptions mlir::sparse_tensor::SparseCompilerOptions::lowerVectorToLLVMOptions ( ) const
inline

◆ sparseTensorConversionOptions()

SparseTensorConversionOptions mlir::sparse_tensor::SparseCompilerOptions::sparseTensorConversionOptions ( ) const
inline

Projects out the options for createSparsificationPass.

Definition at line 101 of file Passes.h.

References mlir::sparseToSparseConversionStrategy().

Referenced by mlir::sparse_tensor::buildSparseCompiler().

◆ sparsificationOptions()

SparsificationOptions mlir::sparse_tensor::SparseCompilerOptions::sparsificationOptions ( ) const
inline

Projects out the options for createSparsificationPass.

Definition at line 89 of file Passes.h.

Referenced by mlir::sparse_tensor::buildSparseCompiler().

Member Data Documentation

◆ amx

PassOptions::Option<bool> mlir::sparse_tensor::SparseCompilerOptions::amx
Initial value:
{
*this, "enable-amx",
desc("Enables the use of AMX dialect while lowering the vector dialect."),
init(false)}

Definition at line 117 of file Passes.h.

◆ armNeon

PassOptions::Option<bool> mlir::sparse_tensor::SparseCompilerOptions::armNeon
Initial value:
{*this, "enable-arm-neon",
desc("Enables the use of ArmNeon dialect "
"while lowering the vector dialect."),
init(false)}

Definition at line 121 of file Passes.h.

◆ armSVE

PassOptions::Option<bool> mlir::sparse_tensor::SparseCompilerOptions::armSVE
Initial value:
{*this, "enable-arm-sve",
desc("Enables the use of ArmSVE dialect "
"while lowering the vector dialect."),
init(false)}

Definition at line 125 of file Passes.h.

◆ enableRuntimeLibrary

PassOptions::Option<bool> mlir::sparse_tensor::SparseCompilerOptions::enableRuntimeLibrary
Initial value:
{
*this, "enable-runtime-library",
desc("Enable runtime library for manipulating sparse tensors"),
init(true)}

Definition at line 78 of file Passes.h.

Referenced by mlir::sparse_tensor::buildSparseCompiler().

◆ enableSIMDIndex32

PassOptions::Option<bool> mlir::sparse_tensor::SparseCompilerOptions::enableSIMDIndex32
Initial value:
{
*this, "enable-simd-index32",
desc("Enable i32 indexing into vectors (for efficiency)"), init(false)}

Definition at line 72 of file Passes.h.

◆ enableVLAVectorization

PassOptions::Option<bool> mlir::sparse_tensor::SparseCompilerOptions::enableVLAVectorization
Initial value:
{
*this, "enable-vla-vectorization",
desc("Enable vector length agnostic vectorization"), init(false)}

Definition at line 75 of file Passes.h.

◆ indexOptimizations

PassOptions::Option<bool> mlir::sparse_tensor::SparseCompilerOptions::indexOptimizations
Initial value:
{
*this, "enable-index-optimizations",
desc("Allows compiler to assume indices fit in 32-bit if that yields "
"faster code"),
init(true)}

Definition at line 112 of file Passes.h.

◆ parallelization

PassOptions::Option<mlir::SparseParallelizationStrategy> mlir::sparse_tensor::SparseCompilerOptions::parallelization
Initial value:
{
*this, "parallelization-strategy",
::llvm::cl::desc("Set the parallelization strategy"),
llvm::cl::values(
"Turn off sparse parallelization."),
"dense-outer-loop",
"Enable dense outer loop sparse parallelization."),
"any-storage-outer-loop",
"Enable sparse parallelization regardless of storage for "
"the outer loop."),
"dense-any-loop",
"Enable dense parallelization for any loop."),
clEnumValN(
"any-storage-any-loop",
"Enable sparse parallelization for any storage and loop."))}

Definition at line 34 of file Passes.h.

◆ reassociateFPReductions

PassOptions::Option<bool> mlir::sparse_tensor::SparseCompilerOptions::reassociateFPReductions
Initial value:
{
*this, "reassociate-fp-reductions",
desc("Allows llvm to reassociate floating-point reductions for speed"),
init(false)}

Definition at line 108 of file Passes.h.

◆ sparseToSparse

PassOptions::Option<int32_t> mlir::sparse_tensor::SparseCompilerOptions::sparseToSparse
Initial value:
{
*this, "s2s-strategy",
desc("Set the strategy for sparse-to-sparse conversion"), init(0)}

Definition at line 96 of file Passes.h.

◆ testBufferizationAnalysisOnly

PassOptions::Option<bool> mlir::sparse_tensor::SparseCompilerOptions::testBufferizationAnalysisOnly
Initial value:
{
*this, "test-bufferization-analysis-only",
desc("Run only the inplacability analysis"), init(false)}

Definition at line 84 of file Passes.h.

Referenced by mlir::sparse_tensor::buildSparseCompiler().

◆ vectorization

PassOptions::Option<mlir::SparseVectorizationStrategy> mlir::sparse_tensor::SparseCompilerOptions::vectorization
Initial value:
{
*this, "vectorization-strategy",
::llvm::cl::desc("Set the vectorization strategy"),
llvm::cl::values(
"Turn off sparse vectorization."),
"dense-inner-loop",
"Enable vectorization for dense inner loops."),
"any-storage-inner-loop",
"Enable sparse vectorization for inner loops with any "
"storage."))}

Definition at line 55 of file Passes.h.

◆ vectorLength

PassOptions::Option<int32_t> mlir::sparse_tensor::SparseCompilerOptions::vectorLength
Initial value:
{
*this, "vl", desc("Set the vector length"), init(1)}

Definition at line 70 of file Passes.h.

◆ x86Vector

PassOptions::Option<bool> mlir::sparse_tensor::SparseCompilerOptions::x86Vector
Initial value:
{
*this, "enable-x86vector",
desc("Enables the use of X86Vector dialect while lowering the vector "
"dialect."),
init(false)}

Definition at line 129 of file Passes.h.


The documentation for this struct was generated from the following file: