24#ifndef TVM_RELAX_ATTRS_MANIPULATE_H_
25#define TVM_RELAX_ATTRS_MANIPULATE_H_
35 ffi::Optional<int64_t>
axis;
38 namespace refl = tvm::ffi::reflection;
40 "The axis at which the input arrays are concatenated."
41 "Should lie in range `[-ndim, ndim)`.");
51 namespace refl = tvm::ffi::reflection;
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.");
69 namespace refl = tvm::ffi::reflection;
70 refl::ObjectDef<LayoutTransformAttrs>()
72 "The layout transformation to apply.")
75 "The specific value to be used to pad if the layout transform would result in implicit "
76 "padding. If not specified, the compiler is free to choose any value.");
84 ffi::Optional<ffi::Array<int64_t>>
axes;
87 namespace refl = tvm::ffi::reflection;
88 refl::ObjectDef<PermuteDimsAttrs>().def_ro(
100 namespace refl = tvm::ffi::reflection;
101 refl::ObjectDef<SplitAttrs>()
103 "The input array of indices or the number of split sections.")
111 ffi::Optional<ffi::Array<int64_t>>
axis;
114 namespace refl = tvm::ffi::reflection;
116 "The axis to squeeze in the input tensor."
117 "If `axis = None`, all axis of dimension 1 get squeezed;"
118 "Else, the dimension in axes get squeezed."
119 "It is an error if an axis does not has dimension 1.");
129 namespace refl = tvm::ffi::reflection;
130 refl::ObjectDef<StackAttrs>().def_ro(
132 "The axis along which to stack the input tensors. "
133 "The axis will be inserted at this position in the output, "
134 "so it must be in range [-ndim-1, ndim] where ndim is the "
135 "number of dimensions of the input tensors.");
146 namespace refl = tvm::ffi::reflection;
147 refl::ObjectDef<RepeatAttrs>()
150 "The axis along which to repeat values. The negative numbers are interpreted "
151 "counting from the backward. By default, use the flattened input array, and "
152 "return a flat output array.");
162 namespace refl = tvm::ffi::reflection;
164 "The number of repetitions of data along each axis.");
174 namespace refl = tvm::ffi::reflection;
176 "The axis along which to flip over.");
187 namespace refl = tvm::ffi::reflection;
188 refl::ObjectDef<ReverseSequenceAttrs>()
190 "The axis along which to reverse variable length slices.")
192 "The axis that indexes the batch.");
203 namespace refl = tvm::ffi::reflection;
205 "The axis along which to index.",
206 refl::DefaultValue(0));
217 namespace refl = tvm::ffi::reflection;
219 "The number of batch dims.", refl::DefaultValue(0));
229 namespace refl = tvm::ffi::reflection;
230 refl::ObjectDef<IndexPutAttrs>().def_ro(
232 "Whether to accumulate (add) values rather than replace. "
233 "If true, performs tensor[indices] += values, "
234 "otherwise performs tensor[indices] = values.",
235 refl::DefaultValue(
false));
245 namespace refl = tvm::ffi::reflection;
247 "Specifies how the grid dimensions are ordered.");
258 namespace refl = tvm::ffi::reflection;
259 refl::ObjectDef<ScatterElementsAttrs>()
261 refl::DefaultValue(0))
263 "Reduction mode of the scatter elements, "
264 "either \"update\", \"add\", \"mul\", \"mean\", \"min\" or \"max\".",
265 refl::DefaultValue(
"update"));
276 namespace refl = tvm::ffi::reflection;
277 refl::ObjectDef<ScatterNDAttrs>().def_ro(
279 "Accumulation mode of the ScatterND, "
280 "either \"update\", \"add\", \"mul\", \"min\" or \"max\".",
281 refl::DefaultValue(
"update"));
291 namespace refl = tvm::ffi::reflection;
293 "the dimension to insert the slice into ",
294 refl::DefaultValue(0));
305 namespace refl = tvm::ffi::reflection;
306 refl::ObjectDef<OneHotAttrs>()
Base class of all attribute class.
Definition attrs.h:49
RAII wrapper function to enter and exit a context object similar to python's with syntax.
Definition with_context.h:59
Definition index_map.h:192
Defines a remapping of buffer indices.
An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
Definition analyzer.h:40
Attributes used in concat operators.
Definition manipulate.h:34
static void RegisterReflection()
Definition manipulate.h:37
ffi::Optional< int64_t > axis
Definition manipulate.h:35
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.ConcatAttrs", ConcatAttrs, AttrsNode)
Attributes used in expand_dims operators.
Definition manipulate.h:47
static void RegisterReflection()
Definition manipulate.h:50
ffi::Array< int64_t > axis
Definition manipulate.h:48
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.ExpandDimsAttrs", ExpandDimsAttrs, AttrsNode)
Attributes used in flip operators.
Definition manipulate.h:170
static void RegisterReflection()
Definition manipulate.h:173
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.FlipAttrs", FlipAttrs, AttrsNode)
int64_t axis
Definition manipulate.h:171
Attributes used in gather_elements operators.
Definition manipulate.h:199
int64_t axis
Definition manipulate.h:200
static void RegisterReflection()
Definition manipulate.h:202
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.GatherElementsAttrs", GatherElementsAttrs, AttrsNode)
Attributes used in gather_nd operators.
Definition manipulate.h:213
int64_t batch_dims
Definition manipulate.h:214
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.GatherNDAttrs", GatherNDAttrs, AttrsNode)
static void RegisterReflection()
Definition manipulate.h:216
Attributes used in index_put operator.
Definition manipulate.h:225
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.IndexPutAttrs", IndexPutAttrs, AttrsNode)
bool accumulate
Definition manipulate.h:226
static void RegisterReflection()
Definition manipulate.h:228
Attribute used in meshgrid operator.
Definition manipulate.h:241
ffi::Optional< ffi::String > indexing
Definition manipulate.h:242
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.MeshgridAttrs", MeshgridAttrs, AttrsNode)
static void RegisterReflection()
Definition manipulate.h:244
Attributes used in one_hot operator.
Definition manipulate.h:300
static void RegisterReflection()
Definition manipulate.h:304
int axis
Definition manipulate.h:302
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.OneHotAttrs", OneHotAttrs, AttrsNode)
int depth
Definition manipulate.h:301
Attributes used in permute_dims operator.
Definition manipulate.h:83
static void RegisterReflection()
Definition manipulate.h:86
ffi::Optional< ffi::Array< int64_t > > axes
Definition manipulate.h:84
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.PermuteDimsAttrs", PermuteDimsAttrs, AttrsNode)
Attributes used in repeat operators.
Definition manipulate.h:141
ffi::Optional< int64_t > axis
Definition manipulate.h:143
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.RepeatAttrs", RepeatAttrs, AttrsNode)
int repeats
Definition manipulate.h:142
static void RegisterReflection()
Definition manipulate.h:145
Attributes used in reverse_sequence operators.
Definition manipulate.h:182
int64_t batch_axis
Definition manipulate.h:184
static void RegisterReflection()
Definition manipulate.h:186
int64_t seq_axis
Definition manipulate.h:183
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.ReverseSequenceAttrs", ReverseSequenceAttrs, AttrsNode)
Attributes used in scatter_elements operators.
Definition manipulate.h:253
ffi::String reduction
Definition manipulate.h:255
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.ScatterElementsAttrs", ScatterElementsAttrs, AttrsNode)
static void RegisterReflection()
Definition manipulate.h:257
int64_t axis
Definition manipulate.h:254
Attributes used in scatter_nd operators.
Definition manipulate.h:272
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.ScatterNDAttrs", ScatterNDAttrs, AttrsNode)
static void RegisterReflection()
Definition manipulate.h:275
ffi::String reduction
Definition manipulate.h:273
Attributes used in slice_scatter operator.
Definition manipulate.h:287
static void RegisterReflection()
Definition manipulate.h:290
int axis
Definition manipulate.h:288
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.SliceScatterAttrs", SliceScatterAttrs, AttrsNode)
Attributes used in split operator.
Definition manipulate.h:95
static void RegisterReflection()
Definition manipulate.h:99
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.SplitAttrs", SplitAttrs, AttrsNode)
ffi::ObjectRef indices_or_sections
Definition manipulate.h:96
int axis
Definition manipulate.h:97
Attributes used in squeeze operators.
Definition manipulate.h:110
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.SqueezeAttrs", SqueezeAttrs, AttrsNode)
static void RegisterReflection()
Definition manipulate.h:113
ffi::Optional< ffi::Array< int64_t > > axis
Definition manipulate.h:111
Attributes used in stack operators.
Definition manipulate.h:125
ffi::Optional< int64_t > axis
Definition manipulate.h:126
static void RegisterReflection()
Definition manipulate.h:128
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.StackAttrs", StackAttrs, AttrsNode)
Attributes used in tile operators.
Definition manipulate.h:158
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.TileAttrs", TileAttrs, AttrsNode)
static void RegisterReflection()
Definition manipulate.h:161
ffi::Array< int64_t > repeats
Definition manipulate.h:159