24 #ifndef TVM_RELAX_ATTRS_SORTING_H_
25 #define TVM_RELAX_ATTRS_SORTING_H_
40 "Axis along which the sort is computed."
41 "The default the last axis is used.");
45 "Whether to sort in descending order."
46 "If it is not specified, it defaults to the ascending order.");
58 "Axis along which the argsort is computed."
59 "The default the last axis is used.");
63 "Whether to argsort in descending order."
64 "If it is not specified, it defaults to the ascending order.");
67 .describe(
"DType of the output indices.");
81 TVM_ATTR_FIELD(
axis).set_default(-1).describe(
"Axis along which to sort the input tensor.");
83 "The return type [both, values, indices]."
84 "both - return both top k data and indices."
85 "values - return top k data only."
86 "indices - return top k indices only.");
88 "Whether to return largest or smallest elements."
89 "By default, return the largest k elements.");
92 .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
Reference to string objects.
Definition: string.h:98
Defines a remapping of buffer indices.
#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
Attributes used in argsort operator.
Definition: sorting.h:51
DataType dtype
Definition: sorting.h:54
int axis
Definition: sorting.h:52
TVM_DECLARE_ATTRS(ArgsortAttrs, "relax.attrs.ArgsortAttrs")
Definition: sorting.h:56
bool descending
Definition: sorting.h:53
Attributes used in sort operator.
Definition: sorting.h:34
bool descending
Definition: sorting.h:36
int axis
Definition: sorting.h:35
TVM_DECLARE_ATTRS(SortAttrs, "relax.attrs.SortAttrs")
Definition: sorting.h:38
Attributes used in topk operator.
Definition: sorting.h:72
TVM_DECLARE_ATTRS(TopKAttrs, "relax.attrs.TopKAttrs")
Definition: sorting.h:79
int k
Definition: sorting.h:73
String ret_type
Definition: sorting.h:76
DataType dtype
Definition: sorting.h:77
int axis
Definition: sorting.h:74
bool largest
Definition: sorting.h:75