Class CinnBuilder
Defined in File cinn_builder.h
Inheritance Relationships
Base Type
public cinn::frontend::BaseBuilder
(Class BaseBuilder)
Class Documentation
-
class
cinn::frontend
::
CinnBuilder
: public cinn::frontend::BaseBuilder Public Functions
-
template<typename
T
>
VariableConstScalar
(T value, const std::string &name) Create scalar with the specific value and type.
- Return
The result variable.
- Parameters
value
: The scalar value to be set.name
: The name of output variable.
-
Variable
Conv
(const Variable &lhs, const Variable &rhs, const std::vector<int> &strides = {1, 1}, const std::vector<int> &paddings = {0, 0}, const std::vector<int> &dilations = {1, 1}, int groups = 1, const std::string &conv_type = "forward", const std::string &data_format = "NCHW", const std::string &padding_algorithm = "EXPLICIT", const std::vector<int> &output_shape = {})
-
Variable
Compare
(const Variable &lhs, const Variable &rhs, ComparisonKind kind)
-
Variable
Reduce
(const Variable &operand, ReduceKind kind, const std::vector<int> &dim, bool keep_dim = false) Reduce array elements over the given dims.
- Return
The result variable.
- Parameters
operand
: The input variable.dim
: The dims along which a sum is performed. If dim is empty, the operation will sum over all elements of the input array. If the dim has negative value, it should count from the last dim to the first.keep_dim
: If it is set true, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array.
-
Variable
BroadcastTo
(const Variable &operand, const std::vector<int> &out_shape, const std::vector<int> &broadcast_axes)
-
Variable
Slice
(const Variable &operand, const std::vector<int> &axes, const std::vector<int> &starts = {}, const std::vector<int> &ends = {})
-
template<typename