Class OpDescAPI

Inheritance Relationships

Derived Types

Class Documentation

class cinn::frontend::paddle::cpp::OpDescAPI

Subclassed by cinn::frontend::paddle::cpp::OpDesc, cinn::frontend::paddle::pb::OpDesc

Public Types

enum AttrType

Values:

enumerator INT
enumerator FLOAT
enumerator STRING
enumerator INTS
enumerator FLOATS
enumerator STRINGS
enumerator BOOLEAN
enumerator BOOLEANS
enumerator BLOCK
enumerator LONG
enumerator BLOCKS
enumerator LONGS
enumerator UNK

Public Functions

~OpDescAPI() = default
std::string Type() const = 0

Get operator’s type.

void SetType(const std::string &type) = 0

Set operator’s type.

std::vector<std::string> Input(const std::string &param) const = 0

Get arguments given the parameter.

std::vector<std::string> InputArgumentNames() const = 0

Get parameters.

std::vector<std::string> Output(const std::string &param) const = 0

Get arguments given the parameter.

std::vector<std::string> OutputArgumentNames() const = 0

Get parameters.

void SetInput(const std::string &param, const std::vector<std::string> &args) = 0

Set a input given the parameter and arguments.

void SetOutput(const std::string &param, const std::vector<std::string> &args) = 0
bool HasAttr(const std::string &name) const = 0

Tell whether this desc has an attribute.

AttrType GetAttrType(const std::string &name) const = 0

Get the type of an attribute.

std::vector<std::string> AttrNames() const = 0
template<typename T>
void SetAttr(const std::string &name, const T &v)

Set an attribute.

template<typename T>
T GetAttr(const std::string &name) const

Get an attribute.

std::string Repr() const