24 #ifndef TVM_RELAX_ATTRS_MANIPULATE_H_
25 #define TVM_RELAX_ATTRS_MANIPULATE_H_
35 ffi::Optional<int64_t>
axis;
40 "The axis at which the input arrays are concatenated."
41 "Should lie in range `[-ndim, ndim)`.");
52 refl::ObjectDef<ExpandDimsAttrs>().def_ro(
54 "The axes at which the input array are expanded. "
55 "All values are required to lie in range `[-data.ndim - 1, data.ndim]`, "
56 "with the convention of negative indexing.");
83 refl::ObjectDef<LayoutTransformAttrs>()
85 "The layout transformation to apply.")
88 "The specific value to be used to pad if the layout transform would result in implicit "
89 "padding. If not specified, the compiler is free to choose any value.")
91 "The separators between input axes when generating flat output axes")
93 "The separators between axes to regenerate output");
101 ffi::Optional<ffi::Array<Integer>>
axes;
105 refl::ObjectDef<PermuteDimsAttrs>().def_ro(
119 refl::ObjectDef<SplitAttrs>()
121 "The input array of indices or the number of split sections.")
129 ffi::Optional<ffi::Array<Integer>>
axis;
134 "The axis to squeeze in the input tensor."
135 "If `axis = None`, all axis of dimension 1 get squeezed;"
136 "Else, the dimension in axes get squeezed."
137 "It is an error if an axis does not has dimension 1.");
148 refl::ObjectDef<StackAttrs>().def_ro(
150 "The axis along which to stack the input tensors. "
151 "The axis will be inserted at this position in the output, "
152 "so it must be in range [-ndim-1, ndim] where ndim is the "
153 "number of dimensions of the input tensors.");
165 refl::ObjectDef<RepeatAttrs>()
168 "The axis along which to repeat values. The negative numbers are interpreted "
169 "counting from the backward. By default, use the flattened input array, and "
170 "return a flat output array.");
182 "The number of repetitions of data along each axis.");
194 "The axis along which to flip over.",
195 refl::DefaultValue(NullValue<Integer>()));
207 "The axis along which to index.",
208 refl::DefaultValue(0));
221 "The number of batch dims.", refl::DefaultValue(0));
232 refl::ObjectDef<IndexPutAttrs>().def_ro(
234 "Whether to accumulate (add) values rather than replace. "
235 "If true, performs tensor[indices] += values, "
236 "otherwise performs tensor[indices] = values.",
237 refl::DefaultValue(
false));
249 "Specifies how the grid dimensions are ordered.");
261 refl::ObjectDef<ScatterElementsAttrs>()
263 refl::DefaultValue(0))
265 "Reduction mode of the scatter elements, "
266 "either \"update\", \"add\", \"mul\", \"mean\", \"min\" or \"max\".",
267 refl::DefaultValue(
"update"));
279 refl::ObjectDef<ScatterNDAttrs>().def_ro(
281 "Accumulation mode of the ScatterND, "
282 "either \"update\", \"add\", \"mul\", \"min\" or \"max\".",
283 refl::DefaultValue(
"update"));
295 "the dimension to insert the slice into ",
296 refl::DefaultValue(0));
309 refl::ObjectDef<OneHotAttrs>()
Adapter for AttrsNode with the new reflection API.
Definition: attrs.h:385
Base class of all attribute class.
Definition: attrs.h:102
Container of constant int that adds more constructors.
Definition: expr.h:600
Definition: index_map.h:169
Defines a remapping of buffer indices.
Definition: repr_printer.h:91
Performance counters for profiling via the PAPI library.
Definition: analyzer.h:37
Attributes used in concat operators.
Definition: manipulate.h:34
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.ConcatAttrs", ConcatAttrs, BaseAttrsNode)
static void RegisterReflection()
Definition: manipulate.h:37
ffi::Optional< int64_t > axis
Definition: manipulate.h:35
Attributes used in expand_dims operators.
Definition: manipulate.h:47
static void RegisterReflection()
Definition: manipulate.h:50
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.ExpandDimsAttrs", ExpandDimsAttrs, BaseAttrsNode)
ffi::Array< Integer > axis
Definition: manipulate.h:48
Attributes used in flip operators.
Definition: manipulate.h:188
static void RegisterReflection()
Definition: manipulate.h:191
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.FlipAttrs", FlipAttrs, BaseAttrsNode)
Integer axis
Definition: manipulate.h:189
Attributes used in gather_elements operators.
Definition: manipulate.h:201
static void RegisterReflection()
Definition: manipulate.h:204
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.GatherElementsAttrs", GatherElementsAttrs, BaseAttrsNode)
Integer axis
Definition: manipulate.h:202
Attributes used in gather_nd operators.
Definition: manipulate.h:215
Integer batch_dims
Definition: manipulate.h:216
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.GatherNDAttrs", GatherNDAttrs, BaseAttrsNode)
static void RegisterReflection()
Definition: manipulate.h:218
Attributes used in index_put operator.
Definition: manipulate.h:227
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.IndexPutAttrs", IndexPutAttrs, BaseAttrsNode)
bool accumulate
Definition: manipulate.h:228
static void RegisterReflection()
Definition: manipulate.h:230
Attribute used in meshgrid operator.
Definition: manipulate.h:243
ffi::Optional< ffi::String > indexing
Definition: manipulate.h:244
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.MeshgridAttrs", MeshgridAttrs, BaseAttrsNode)
static void RegisterReflection()
Definition: manipulate.h:246
Attributes used in one_hot operator.
Definition: manipulate.h:303
static void RegisterReflection()
Definition: manipulate.h:307
int axis
Definition: manipulate.h:305
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.OneHotAttrs", OneHotAttrs, BaseAttrsNode)
int depth
Definition: manipulate.h:304
Attributes used in permute_dims operator.
Definition: manipulate.h:100
static void RegisterReflection()
Definition: manipulate.h:103
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.PermuteDimsAttrs", PermuteDimsAttrs, BaseAttrsNode)
ffi::Optional< ffi::Array< Integer > > axes
Definition: manipulate.h:101
Attributes used in repeat operators.
Definition: manipulate.h:159
ffi::Optional< int64_t > axis
Definition: manipulate.h:161
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.RepeatAttrs", RepeatAttrs, BaseAttrsNode)
int repeats
Definition: manipulate.h:160
static void RegisterReflection()
Definition: manipulate.h:163
Attributes used in scatter_elements operators.
Definition: manipulate.h:255
Integer axis
Definition: manipulate.h:256
ffi::String reduction
Definition: manipulate.h:257
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.ScatterElementsAttrs", ScatterElementsAttrs, BaseAttrsNode)
static void RegisterReflection()
Definition: manipulate.h:259
Attributes used in scatter_nd operators.
Definition: manipulate.h:274
static void RegisterReflection()
Definition: manipulate.h:277
ffi::String reduction
Definition: manipulate.h:275
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.ScatterNDAttrs", ScatterNDAttrs, BaseAttrsNode)
Attributes used in slice_scatter operator.
Definition: manipulate.h:289
static void RegisterReflection()
Definition: manipulate.h:292
int axis
Definition: manipulate.h:290
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.SliceScatterAttrs", SliceScatterAttrs, BaseAttrsNode)
Attributes used in split operator.
Definition: manipulate.h:113
static void RegisterReflection()
Definition: manipulate.h:117
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.SplitAttrs", SplitAttrs, BaseAttrsNode)
ObjectRef indices_or_sections
Definition: manipulate.h:114
int axis
Definition: manipulate.h:115
Attributes used in squeeze operators.
Definition: manipulate.h:128
static void RegisterReflection()
Definition: manipulate.h:131
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.SqueezeAttrs", SqueezeAttrs, BaseAttrsNode)
ffi::Optional< ffi::Array< Integer > > axis
Definition: manipulate.h:129
Attributes used in stack operators.
Definition: manipulate.h:143
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.StackAttrs", StackAttrs, BaseAttrsNode)
ffi::Optional< Integer > axis
Definition: manipulate.h:144
static void RegisterReflection()
Definition: manipulate.h:146
Attributes used in tile operators.
Definition: manipulate.h:176
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.TileAttrs", TileAttrs, BaseAttrsNode)
static void RegisterReflection()
Definition: manipulate.h:179
ffi::Array< Integer > repeats
Definition: manipulate.h:177