MLIR  22.0.0git
Public Member Functions | Static Public Member Functions | List of all members
mlir::tosa::TargetEnv Class Reference

This class represents the capability enabled in the target implementation such as profile, extension, and level. More...

#include "mlir/Dialect/Tosa/IR/TargetEnv.h"

Public Member Functions

 TargetEnv ()
 
void addProfile (Profile p)
 
void addExtension (Extension e)
 
TosaSpecificationVersion getSpecVersion () const
 
TosaLevel getLevel () const
 
bool allows (Profile prof) const
 
bool allowsAnyOf (ArrayRef< Profile > profs) const
 
bool allowsAllOf (ArrayRef< Profile > profs) const
 
bool allows (Extension ext) const
 
bool allowsAnyOf (ArrayRef< Extension > exts) const
 
bool allowsAllOf (ArrayRef< Extension > exts) const
 

Static Public Member Functions

static FailureOr< TargetEnvcreateTargetEnvFromAttr (TargetEnvAttr targetAttr, Location targetEnvAttrLoc)
 
static LogicalResult verifyTargetInformation (TargetEnvAttr targetAttr, Location targetAttrLoc)
 

Detailed Description

This class represents the capability enabled in the target implementation such as profile, extension, and level.

It's a wrapper class around tosa::TargetEnvAttr.

Definition at line 97 of file TargetEnv.h.

Constructor & Destructor Documentation

◆ TargetEnv()

mlir::tosa::TargetEnv::TargetEnv ( )
inline

Definition at line 99 of file TargetEnv.h.

Referenced by createTargetEnvFromAttr().

Member Function Documentation

◆ addExtension()

void mlir::tosa::TargetEnv::addExtension ( Extension  e)
inline

Definition at line 108 of file TargetEnv.h.

◆ addProfile()

void mlir::tosa::TargetEnv::addProfile ( Profile  p)
inline

Definition at line 107 of file TargetEnv.h.

◆ allows() [1/2]

bool mlir::tosa::TargetEnv::allows ( Extension  ext) const
inline

Definition at line 135 of file TargetEnv.h.

◆ allows() [2/2]

bool mlir::tosa::TargetEnv::allows ( Profile  prof) const
inline

Definition at line 124 of file TargetEnv.h.

Referenced by allowsAllOf(), and allowsAnyOf().

◆ allowsAllOf() [1/2]

bool mlir::tosa::TargetEnv::allowsAllOf ( ArrayRef< Extension >  exts) const
inline

Definition at line 141 of file TargetEnv.h.

References allows().

◆ allowsAllOf() [2/2]

bool mlir::tosa::TargetEnv::allowsAllOf ( ArrayRef< Profile >  profs) const
inline

Definition at line 130 of file TargetEnv.h.

References allows().

Referenced by TosaProfileCompliance::checkProfileOrExtension().

◆ allowsAnyOf() [1/2]

bool mlir::tosa::TargetEnv::allowsAnyOf ( ArrayRef< Extension >  exts) const
inline

Definition at line 137 of file TargetEnv.h.

References allows().

◆ allowsAnyOf() [2/2]

bool mlir::tosa::TargetEnv::allowsAnyOf ( ArrayRef< Profile >  profs) const
inline

Definition at line 126 of file TargetEnv.h.

References allows().

Referenced by TosaProfileCompliance::checkProfileOrExtension().

◆ createTargetEnvFromAttr()

FailureOr< TargetEnv > mlir::tosa::TargetEnv::createTargetEnvFromAttr ( TargetEnvAttr  targetAttr,
Location  targetEnvAttrLoc 
)
static

Definition at line 63 of file TargetEnv.cpp.

References mlir::remark::failed(), TargetEnv(), and verifyTargetInformation().

◆ getLevel()

TosaLevel mlir::tosa::TargetEnv::getLevel ( ) const
inline

Definition at line 114 of file TargetEnv.h.

References mlir::tosa::TOSA_LEVEL_EIGHTK, and mlir::tosa::TOSA_LEVEL_NONE.

◆ getSpecVersion()

TosaSpecificationVersion mlir::tosa::TargetEnv::getSpecVersion ( ) const
inline

Definition at line 110 of file TargetEnv.h.

Referenced by TosaProfileCompliance::checkProfileOrExtension().

◆ verifyTargetInformation()

LogicalResult mlir::tosa::TargetEnv::verifyTargetInformation ( TargetEnvAttr  targetAttr,
Location  targetAttrLoc 
)
static

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