Class OpDesc

Inheritance Relationships

Base Type

Class Documentation

class cinn::frontend::paddle::pb::OpDesc : public cinn::frontend::paddle::cpp::OpDescAPI

Public Functions

OpDesc() = delete
OpDesc(framework_proto::OpDesc *desc)
framework_proto::OpDesc *Proto()
const framework_proto::OpDesc &ReadonlyProto() const
std::string Type() const override

Get operator’s type.

void SetType(const std::string &type) override

Set operator’s type.

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

Get arguments given the parameter.

std::vector<std::string> InputArgumentNames() const override

Get parameters.

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

Set a input given the parameter and arguments.

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

Get arguments given the parameter.

std::vector<std::string> OutputArgumentNames() const override

Get parameters.

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

Tell whether this desc has an attribute.

AttrType GetAttrType(const std::string &name) const override

Get the type of an attribute.

std::vector<std::string> AttrNames() const override
template<typename T>
void SetAttr(const std::string &name, const T &v)
template<typename T>
T GetAttr(const std::string &name) const
template<>
void SetAttr(const std::string &name, const int &v)
template<>
void SetAttr(const std::string &name, const float &v)
template<>
void SetAttr(const std::string &name, const bool &v)
template<>
void SetAttr(const std::string &name, const int64_t &v)
template<>
int32_t GetAttr(const std::string &name) const
template<>
int16_t GetAttr(const std::string &name) const
template<>
float GetAttr(const std::string &name) const
template<>
bool GetAttr(const std::string &name) const
template<>
int64_t GetAttr(const std::string &name) const
template<>
void SetAttr(const std::string &name, const std::string &v)
template<>
void SetAttr(const std::string &name, const std::vector<int> &v)