My Project
Public Member Functions | Static Public Member Functions | List of all members
mlir::OpTrait::linalg::StructuredOpTraits< ConcreteType > Class Template Reference

#include <LinalgTraits.h>

Inheritance diagram for mlir::OpTrait::linalg::StructuredOpTraits< ConcreteType >:
Inheritance graph
[legend]
Collaboration diagram for mlir::OpTrait::linalg::StructuredOpTraits< ConcreteType >:
Collaboration graph
[legend]

Public Member Functions

Value getInput (unsigned i)
 Return the i-th input value. More...
 
Optional< unsigned > getIndexOfInput (Value value)
 
ShapedType getInputShapedType (unsigned i)
 Return the i-th input buffer type. More...
 
Operation::operand_range getInputs ()
 Return the range over inputs. More...
 
Value getOutput (unsigned i)
 Return the i-th output. More...
 
Optional< unsigned > getIndexOfOutput (Value value)
 
ShapedType getOutputShapedType (unsigned i)
 Return the i-th output buffer type. More...
 
bool hasBufferSemantics ()
 Query whether the op has only MemRef input and outputs. More...
 
SmallVector< RankedTensorType, 4 > getInputTensorTypes ()
 Query the subset of input operands that are of ranked tensor type. More...
 
SmallVector< RankedTensorType, 4 > getOutputTensorTypes ()
 Query the subset of output operands that are of ranked tensor type. More...
 
Operation::operand_range getOutputs ()
 Return the range over outputs. More...
 
unsigned getNumInputsAndOutputs ()
 Return the number of inputs and outputs. More...
 
ShapedType getShapedType (unsigned i)
 Return the i-th buffer type. More...
 
Operation::operand_range getInputsAndOutputs ()
 Return the range over inputs and outputs. More...
 
unsigned getNumParallelLoops ()
 
unsigned getNumReductionLoops ()
 
unsigned getNumWindowLoops ()
 
unsigned getNumLoops ()
 

Static Public Member Functions

static LogicalResult verifyTrait (Operation *op)
 

Additional Inherited Members

- Protected Member Functions inherited from mlir::OpTrait::TraitBase< ConcreteType, StructuredOpTraits >
OperationgetOperation ()
 Return the ultimate Operation being worked on. More...
 
- Static Protected Member Functions inherited from mlir::OpTrait::TraitBase< ConcreteType, StructuredOpTraits >
static LogicalResult verifyTrait (Operation *op)
 
static AbstractOperation::OperationProperties getTraitProperties ()
 

Detailed Description

template<typename ConcreteType>
class mlir::OpTrait::linalg::StructuredOpTraits< ConcreteType >

This class provides the API for structured ops that are known to operate on buffers or tensors. This trait must be used in conjunction with an op definition or a trait that provides the methods getNumInputs and getNumOutputs. Use as a trait as follows:

class DotOp : public Op<DotOp, OpTrait::StructuredOpTraits> {

Member Function Documentation

◆ getIndexOfInput()

template<typename ConcreteType >
Optional<unsigned> mlir::OpTrait::linalg::StructuredOpTraits< ConcreteType >::getIndexOfInput ( Value  value)
inline

Return the index of value in the list of inputs if found, llvm::None otherwise.

◆ getIndexOfOutput()

template<typename ConcreteType >
Optional<unsigned> mlir::OpTrait::linalg::StructuredOpTraits< ConcreteType >::getIndexOfOutput ( Value  value)
inline

Return the index of value in the list of output values if found, llvm::None otherwise.

◆ getInput()

template<typename ConcreteType >
Value mlir::OpTrait::linalg::StructuredOpTraits< ConcreteType >::getInput ( unsigned  i)
inline

Return the i-th input value.

◆ getInputs()

template<typename ConcreteType >
Operation::operand_range mlir::OpTrait::linalg::StructuredOpTraits< ConcreteType >::getInputs ( )
inline

Return the range over inputs.

◆ getInputsAndOutputs()

template<typename ConcreteType >
Operation::operand_range mlir::OpTrait::linalg::StructuredOpTraits< ConcreteType >::getInputsAndOutputs ( )
inline

Return the range over inputs and outputs.

◆ getInputShapedType()

template<typename ConcreteType >
ShapedType mlir::OpTrait::linalg::StructuredOpTraits< ConcreteType >::getInputShapedType ( unsigned  i)
inline

Return the i-th input buffer type.

◆ getInputTensorTypes()

template<typename ConcreteType >
SmallVector<RankedTensorType, 4> mlir::OpTrait::linalg::StructuredOpTraits< ConcreteType >::getInputTensorTypes ( )
inline

Query the subset of input operands that are of ranked tensor type.

◆ getNumInputsAndOutputs()

template<typename ConcreteType >
unsigned mlir::OpTrait::linalg::StructuredOpTraits< ConcreteType >::getNumInputsAndOutputs ( )
inline

Return the number of inputs and outputs.

◆ getNumLoops()

template<typename ConcreteType >
unsigned mlir::OpTrait::linalg::StructuredOpTraits< ConcreteType >::getNumLoops ( )
inline

◆ getNumParallelLoops()

template<typename ConcreteType >
unsigned mlir::OpTrait::linalg::StructuredOpTraits< ConcreteType >::getNumParallelLoops ( )
inline

◆ getNumReductionLoops()

template<typename ConcreteType >
unsigned mlir::OpTrait::linalg::StructuredOpTraits< ConcreteType >::getNumReductionLoops ( )
inline

◆ getNumWindowLoops()

template<typename ConcreteType >
unsigned mlir::OpTrait::linalg::StructuredOpTraits< ConcreteType >::getNumWindowLoops ( )
inline

◆ getOutput()

template<typename ConcreteType >
Value mlir::OpTrait::linalg::StructuredOpTraits< ConcreteType >::getOutput ( unsigned  i)
inline

Return the i-th output.

◆ getOutputs()

template<typename ConcreteType >
Operation::operand_range mlir::OpTrait::linalg::StructuredOpTraits< ConcreteType >::getOutputs ( )
inline

Return the range over outputs.

◆ getOutputShapedType()

template<typename ConcreteType >
ShapedType mlir::OpTrait::linalg::StructuredOpTraits< ConcreteType >::getOutputShapedType ( unsigned  i)
inline

Return the i-th output buffer type.

◆ getOutputTensorTypes()

template<typename ConcreteType >
SmallVector<RankedTensorType, 4> mlir::OpTrait::linalg::StructuredOpTraits< ConcreteType >::getOutputTensorTypes ( )
inline

Query the subset of output operands that are of ranked tensor type.

◆ getShapedType()

template<typename ConcreteType >
ShapedType mlir::OpTrait::linalg::StructuredOpTraits< ConcreteType >::getShapedType ( unsigned  i)
inline

Return the i-th buffer type.

◆ hasBufferSemantics()

template<typename ConcreteType >
bool mlir::OpTrait::linalg::StructuredOpTraits< ConcreteType >::hasBufferSemantics ( )
inline

Query whether the op has only MemRef input and outputs.

◆ verifyTrait()

template<typename ConcreteType >
static LogicalResult mlir::OpTrait::linalg::StructuredOpTraits< ConcreteType >::verifyTrait ( Operation op)
inlinestatic

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