24 #ifndef TVM_RELAY_ATTRS_ALGORITHM_H_ 25 #define TVM_RELAY_ATTRS_ALGORITHM_H_ 44 "Axis along which to sort the input tensor." 45 "If not given, the flattened array is used.");
47 "Whether to sort in ascending or descending order." 48 "By default, sort in ascending order");
51 .describe(
"DType of the output indices.");
64 TVM_ATTR_FIELD(axis).set_default(-1).describe(
"Axis along which to sort the input tensor.");
66 "The return type [both, values, indices]." 67 "both - return both top k data and indices." 68 "values - return top k data only." 69 "indices - return top k indices only.");
71 "Whether to sort in ascending or descending order." 72 "By default, sort in descending order");
75 .describe(
"Data type of the output indices.");
85 "Controls which index is returned if a value lands exactly on one of sorted values. If " 86 " false, the index of the first suitable location found is given. If true, return the " 87 "last such index. If there is no suitable index, return either 0 or N (where N is the " 88 "size of the innermost dimension).");
91 .describe(
"Data type of the output indices.");
97 #endif // TVM_RELAY_ATTRS_ALGORITHM_H_ int axis
Definition: algorithm.h:38
bool is_ascend
Definition: algorithm.h:39
Relay expression language.
runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36
Attributes used in argsort operators.
Definition: algorithm.h:37
bool right
Definition: algorithm.h:80
Definition: algorithm.h:79
Helpers for attribute objects.
Runtime primitive data type.
Definition: data_type.h:41
DataType dtype
Definition: algorithm.h:60
int axis
Definition: algorithm.h:57
bool is_ascend
Definition: algorithm.h:58
#define TVM_ATTR_FIELD(FieldName)
Declare an attribute field.
Definition: attrs.h:76
DataType NullValue< DataType >()
Definition: attrs.h:90
TVM_DECLARE_ATTRS(SearchSortedAttrs, "relay.attrs.SearchSortedAttrs")
Definition: algorithm.h:83
DataType dtype
Definition: algorithm.h:81
The base class of the all the Use "curiously recurring template pattern".
Definition: attrs.h:834
TVM_DECLARE_ATTRS(TopKAttrs, "relay.attrs.TopkAttrs")
Definition: algorithm.h:62
std::string ret_type
Definition: algorithm.h:59
Base classes for the Relay IR.
Optional container that to represent to a Nullable variant of T.
Definition: optional.h:51
Optional< Integer > k
Definition: algorithm.h:56
Definition: algorithm.h:55
DataType dtype
Definition: algorithm.h:40
static DataType Int(int bits, int lanes=1)
Construct an int type.
Definition: data_type.h:164
TVM_DECLARE_ATTRS(ArgsortAttrs, "relay.attrs.ArgsortAttrs")
Definition: algorithm.h:42