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.");
82 namespace refl = tvm::ffi::reflection;
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<int64_t>>
axes;
104 namespace refl = tvm::ffi::reflection;
105 refl::ObjectDef<PermuteDimsAttrs>().def_ro(
117 namespace refl = tvm::ffi::reflection;
118 refl::ObjectDef<SplitAttrs>()
120 "The input array of indices or the number of split sections.")
128 ffi::Optional<ffi::Array<int64_t>>
axis;
131 namespace refl = tvm::ffi::reflection;
133 "The axis to squeeze in the input tensor."
134 "If `axis = None`, all axis of dimension 1 get squeezed;"
135 "Else, the dimension in axes get squeezed."
136 "It is an error if an axis does not has dimension 1.");
146 namespace refl = tvm::ffi::reflection;
147 refl::ObjectDef<StackAttrs>().def_ro(
149 "The axis along which to stack the input tensors. "
150 "The axis will be inserted at this position in the output, "
151 "so it must be in range [-ndim-1, ndim] where ndim is the "
152 "number of dimensions of the input tensors.");
163 namespace refl = tvm::ffi::reflection;
164 refl::ObjectDef<RepeatAttrs>()
167 "The axis along which to repeat values. The negative numbers are interpreted "
168 "counting from the backward. By default, use the flattened input array, and "
169 "return a flat output array.");
179 namespace refl = tvm::ffi::reflection;
181 "The number of repetitions of data along each axis.");
191 namespace refl = tvm::ffi::reflection;
193 "The axis along which to flip over.");
204 namespace refl = tvm::ffi::reflection;
205 refl::ObjectDef<ReverseSequenceAttrs>()
207 "The axis along which to reverse variable length slices.")
209 "The axis that indexes the batch.");
220 namespace refl = tvm::ffi::reflection;
222 "The axis along which to index.",
223 refl::DefaultValue(0));
234 namespace refl = tvm::ffi::reflection;
236 "The number of batch dims.", refl::DefaultValue(0));
246 namespace refl = tvm::ffi::reflection;
247 refl::ObjectDef<IndexPutAttrs>().def_ro(
249 "Whether to accumulate (add) values rather than replace. "
250 "If true, performs tensor[indices] += values, "
251 "otherwise performs tensor[indices] = values.",
252 refl::DefaultValue(
false));
262 namespace refl = tvm::ffi::reflection;
264 "Specifies how the grid dimensions are ordered.");
275 namespace refl = tvm::ffi::reflection;
276 refl::ObjectDef<ScatterElementsAttrs>()
278 refl::DefaultValue(0))
280 "Reduction mode of the scatter elements, "
281 "either \"update\", \"add\", \"mul\", \"mean\", \"min\" or \"max\".",
282 refl::DefaultValue(
"update"));
293 namespace refl = tvm::ffi::reflection;
294 refl::ObjectDef<ScatterNDAttrs>().def_ro(
296 "Accumulation mode of the ScatterND, "
297 "either \"update\", \"add\", \"mul\", \"min\" or \"max\".",
298 refl::DefaultValue(
"update"));
308 namespace refl = tvm::ffi::reflection;
310 "the dimension to insert the slice into ",
311 refl::DefaultValue(0));
322 namespace refl = tvm::ffi::reflection;
323 refl::ObjectDef<OneHotAttrs>()
Base class of all attribute class.
Definition: attrs.h:49
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:187
static void RegisterReflection()
Definition: manipulate.h:190
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.FlipAttrs", FlipAttrs, AttrsNode)
int64_t axis
Definition: manipulate.h:188
Attributes used in gather_elements operators.
Definition: manipulate.h:216
int64_t axis
Definition: manipulate.h:217
static void RegisterReflection()
Definition: manipulate.h:219
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.GatherElementsAttrs", GatherElementsAttrs, AttrsNode)
Attributes used in gather_nd operators.
Definition: manipulate.h:230
int64_t batch_dims
Definition: manipulate.h:231
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.GatherNDAttrs", GatherNDAttrs, AttrsNode)
static void RegisterReflection()
Definition: manipulate.h:233
Attributes used in index_put operator.
Definition: manipulate.h:242
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.IndexPutAttrs", IndexPutAttrs, AttrsNode)
bool accumulate
Definition: manipulate.h:243
static void RegisterReflection()
Definition: manipulate.h:245
Attribute used in meshgrid operator.
Definition: manipulate.h:258
ffi::Optional< ffi::String > indexing
Definition: manipulate.h:259
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.MeshgridAttrs", MeshgridAttrs, AttrsNode)
static void RegisterReflection()
Definition: manipulate.h:261
Attributes used in one_hot operator.
Definition: manipulate.h:317
static void RegisterReflection()
Definition: manipulate.h:321
int axis
Definition: manipulate.h:319
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.OneHotAttrs", OneHotAttrs, AttrsNode)
int depth
Definition: manipulate.h:318
Attributes used in permute_dims operator.
Definition: manipulate.h:100
static void RegisterReflection()
Definition: manipulate.h:103
ffi::Optional< ffi::Array< int64_t > > axes
Definition: manipulate.h:101
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.PermuteDimsAttrs", PermuteDimsAttrs, AttrsNode)
Attributes used in repeat operators.
Definition: manipulate.h:158
ffi::Optional< int64_t > axis
Definition: manipulate.h:160
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.RepeatAttrs", RepeatAttrs, AttrsNode)
int repeats
Definition: manipulate.h:159
static void RegisterReflection()
Definition: manipulate.h:162
Attributes used in reverse_sequence operators.
Definition: manipulate.h:199
int64_t batch_axis
Definition: manipulate.h:201
static void RegisterReflection()
Definition: manipulate.h:203
int64_t seq_axis
Definition: manipulate.h:200
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.ReverseSequenceAttrs", ReverseSequenceAttrs, AttrsNode)
Attributes used in scatter_elements operators.
Definition: manipulate.h:270
ffi::String reduction
Definition: manipulate.h:272
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.ScatterElementsAttrs", ScatterElementsAttrs, AttrsNode)
static void RegisterReflection()
Definition: manipulate.h:274
int64_t axis
Definition: manipulate.h:271
Attributes used in scatter_nd operators.
Definition: manipulate.h:289
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.ScatterNDAttrs", ScatterNDAttrs, AttrsNode)
static void RegisterReflection()
Definition: manipulate.h:292
ffi::String reduction
Definition: manipulate.h:290
Attributes used in slice_scatter operator.
Definition: manipulate.h:304
static void RegisterReflection()
Definition: manipulate.h:307
int axis
Definition: manipulate.h:305
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.SliceScatterAttrs", SliceScatterAttrs, AttrsNode)
Attributes used in split operator.
Definition: manipulate.h:112
static void RegisterReflection()
Definition: manipulate.h:116
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.SplitAttrs", SplitAttrs, AttrsNode)
ffi::ObjectRef indices_or_sections
Definition: manipulate.h:113
int axis
Definition: manipulate.h:114
Attributes used in squeeze operators.
Definition: manipulate.h:127
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.SqueezeAttrs", SqueezeAttrs, AttrsNode)
static void RegisterReflection()
Definition: manipulate.h:130
ffi::Optional< ffi::Array< int64_t > > axis
Definition: manipulate.h:128
Attributes used in stack operators.
Definition: manipulate.h:142
ffi::Optional< int64_t > axis
Definition: manipulate.h:143
static void RegisterReflection()
Definition: manipulate.h:145
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.StackAttrs", StackAttrs, AttrsNode)
Attributes used in tile operators.
Definition: manipulate.h:175
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.TileAttrs", TileAttrs, AttrsNode)
static void RegisterReflection()
Definition: manipulate.h:178
ffi::Array< int64_t > repeats
Definition: manipulate.h:176