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.");
The base class of the all the Use "curiously recurring template pattern".
Definition: attrs.h:870
Runtime primitive data type.
Definition: data_type.h:43
static DataType Int(int bits, int lanes=1)
Construct an int type.
Definition: data_type.h:219
Optional container that to represent to a Nullable variant of T.
Definition: optional.h:51
Helpers for attribute objects.
#define TVM_ATTR_FIELD(FieldName)
Declare an attribute field.
Definition: attrs.h:76
runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36
DataType NullValue< DataType >()
Definition: attrs.h:90
Base classes for the Relay IR.
Relay expression language.
Attributes used in argsort operators.
Definition: algorithm.h:37
int axis
Definition: algorithm.h:38
TVM_DECLARE_ATTRS(ArgsortAttrs, "relay.attrs.ArgsortAttrs")
Definition: algorithm.h:42
DataType dtype
Definition: algorithm.h:40
bool is_ascend
Definition: algorithm.h:39
Definition: algorithm.h:79
DataType dtype
Definition: algorithm.h:81
bool right
Definition: algorithm.h:80
TVM_DECLARE_ATTRS(SearchSortedAttrs, "relay.attrs.SearchSortedAttrs")
Definition: algorithm.h:83
Definition: algorithm.h:55
std::string ret_type
Definition: algorithm.h:59
Optional< Integer > k
Definition: algorithm.h:56
int axis
Definition: algorithm.h:57
DataType dtype
Definition: algorithm.h:60
bool is_ascend
Definition: algorithm.h:58
TVM_DECLARE_ATTRS(TopKAttrs, "relay.attrs.TopkAttrs")
Definition: algorithm.h:62