24 #ifndef TVM_RELAY_ATTRS_TRANSFORM_H_ 25 #define TVM_RELAY_ATTRS_TRANSFORM_H_ 52 "The axis at which the input array is expanded." 53 "Should lie in range `[-data.ndim - 1, data.ndim]`." 54 "If `axis < 0`, it is the first axis inserted;" 55 "If `axis >= 0`, it is the last axis inserted in Python's negative indexing.");
57 .describe(
"Number of axes to be inserted. Should be >= 0.")
69 .describe(
"Number of axes to be inserted. Should be >= 0.")
81 "The axis at which the input arrays are concatenated." 82 "Should lie in range `[-ndim, ndim)`.")
91 TVM_ATTR_FIELD(axes).describe(
"The target axes order, reverse order if not specified.");
100 "The new shape. Should be compatible with the original shape.");
112 "The axis of the input where reshaping should begin.");
114 .set_default(NullValue<Integer>())
115 .describe(
"The axis of the input where reshaping should end, exclusive.");
117 "The axis of the shape_like tensor to begin taking dimensions from.");
119 .set_default(NullValue<Integer>())
120 .describe(
"The axis of the shape_like tensor to end taking dimensions from, exclusive.");
128 TVM_ATTR_FIELD(axis).set_default(0).describe(
"The axis over which to select values.");
136 TVM_ATTR_FIELD(axis).set_default(0).describe(
"The axis over which to select values.");
145 "Accumulation mode of the scatter, either \"update\" or \"add\".");
154 .set_default(NullValue<Integer>())
155 .describe(
"The axis over which to select values.");
166 .set_default(NullValue<Integer>())
168 "The size of an indexing tuple, which is a fixed value. Only needed when the number of " 169 "indexting tuples is dynamic.");
181 .describe(
"The batch_dims over which to select values.");
183 .set_default(NullValue<Integer>())
184 .describe(
"The axis over which to select values.");
186 "Specify how out-of-bound indices will behave." 187 "clip - clip to the range (default)" 188 "wrap - wrap around the indices" 189 "fast - no clip or wrap around (user must make sure indices are in-bound)");
212 TVM_ATTR_FIELD(start).describe(
"Start of interval. The interval includes this value.");
213 TVM_ATTR_FIELD(stop).describe(
"Stop of interval. The interval does not include this value.");
226 "Indexing mode, either \"ij\" for matrix or \"xy\" for cartesian in which first two" 227 "dimensions are swapped.")
237 "The axis in the result array along which the input arrays are stacked.");
246 TVM_ATTR_FIELD(repeats).describe(
"The number of repetitions for each element.");
248 .set_default(NullValue<Integer>())
249 .describe(
" The axis along which to repeat values.");
258 "The number of times for repeating the tensor a." 259 "Each dim sizeof reps must be a positive integer.");
268 .set_default(NullValue<Integer>())
269 .describe(
"The axis along which to reverse elements.");
280 "The seq axis along which to reverse elements.");
283 .describe(
"The batch axis along which to slice the tensor.");
295 "The axis to squeeze in the input tensor." 296 "If `axis = None`, all axis of dimension 1 get squeezed;" 297 "Else, the dimension in axes get squeezed." 298 "It is an error if an axis does not has dimension 1.")
310 "Indices or sections to split into. Accepts an int or a tuple" 311 "If indices_or_sections is an integer, the input will be divided equally" 312 "along given axis. If such a split is not possible, an error is raised." 313 "If indices_or_sections is a tuple of sorted integers," 314 "the entries indicate where along axis the array is split.");
315 TVM_ATTR_FIELD(axis).set_default(0).describe(
"the axis to be splitted.");
328 TVM_ATTR_FIELD(begin).describe(
"Indices for begin of slice, begin index is also inclusive");
329 TVM_ATTR_FIELD(end).describe(
"Indices for end of slice, end index is exclusive");
331 "Stride values of the slice, a stride can be negative, which causes a reverse slice.");
335 "The slice mode [end, size]." 336 "end - The default slice mode, ending indices for the slice." 337 "size - The input strides will be ignored, input end in this mode indicates the size" 338 "of a slice starting at the location specified by begin. If end[i] is -1," 339 "all remaining elements in that dimension are included in the slice");
341 "Axes along which slicing is applied. When it is specified, the length of begin, end, " 342 "strides, and axes must be equal.");
351 "List of axes on which input data will be sliced according to the " 352 "corresponding size of the second input. By default will slice " 353 "on all axes. Negative axes mean counting in reverse.");
375 .describe(
"Multiplier of a fixed floating point number described as multiplier*2^(shift)");
377 "Shift of a fixed floating point number described as multiplier*2^(shift)");
387 TVM_ATTR_FIELD(src_layout).describe(
"The source layout of the tensor. (e.g. NCHW)");
388 TVM_ATTR_FIELD(dst_layout).describe(
"The destination layout of the tensor. (e.g. NCHW16c)");
399 "relay.attrs.AutoSchedulerLayoutTransformAttrs") {
400 TVM_ATTR_FIELD(src_layout).describe(
"The source layout of the tensor. (e.g. 1N32C112H112W)");
402 .describe(
"The destination layout of the tensor. (e.g. 1N2C112H112W16c)");
420 TVM_ATTR_FIELD(mask_value).set_default(0).describe(
"The masking value.");
422 "The axis of the length dimension. Can only be 0 or 1.");
431 TVM_ATTR_FIELD(output_shape).describe(
"Shape of the dense output tensor");
451 TVM_ATTR_FIELD(depth).set_default(1).describe(
"Depth of the one hot dimension.");
465 TVM_ATTR_FIELD(k1).set_default(0).describe(
"Lower limit (included) of the range of diagonals.");
466 TVM_ATTR_FIELD(k2).set_default(0).describe(
"Upper limit (included) of the range of diagonals.");
469 .describe(
"Bool, true iff super-diagonal is right aligned (left-padded).");
472 .describe(
"Bool, true iff sub-diagonal is right aligned (left-padded).");
482 TVM_ATTR_FIELD(axis).describe(
"The axis to operate over").set_default(NullValue<Integer>());
487 .describe(
"The first element is not included")
488 .set_default(
Bool(
false));
497 TVM_ATTR_FIELD(sorted).describe(
"Whether the unique elements are sorted").set_default(
true);
499 .describe(
"Whether to return an additional tensor with counts of each unique elements")
509 TVM_ATTR_FIELD(equation).describe(
"The einsum expression string");
515 #endif // TVM_RELAY_ATTRS_TRANSFORM_H_ DataType dtype
Definition: transform.h:196
int rhs_begin
Definition: transform.h:108
double a_max
Definition: transform.h:360
TVM_DECLARE_ATTRS(ReshapeLikeAttrs, "relay.attrs.ReshapeLikeAttrs")
Definition: transform.h:110
Integer axis
Definition: transform.h:265
TVM_DECLARE_ATTRS(StridedSliceAttrs, "relay.attrs.StridedSliceAttrs")
Definition: transform.h:327
Array< Integer > axes
Definition: transform.h:347
int lhs_begin
Definition: transform.h:106
TVM_DECLARE_ATTRS(MatrixSetDiagAttrs, "relay.attrs.MatrixSetDiagAttrs")
Definition: transform.h:464
data type cast
Definition: transform.h:37
Boolean constant.
Definition: expr.h:327
Attributes for FixedPointMultiply operator.
Definition: transform.h:369
int axis
Definition: transform.h:47
TVM_DECLARE_ATTRS(NdarraySizeAttrs, "relay.attrs.NdarraySizeAttrs")
Definition: transform.h:439
TVM_DECLARE_ATTRS(ReshapeAttrs, "relay.attrs.ReshapeAttrs")
Definition: transform.h:98
TVM_DECLARE_ATTRS(ExpandDimsAttrs, "relay.attrs.ExpandDimsAttrs")
Definition: transform.h:50
std::string mode
Definition: transform.h:176
int axis
Definition: transform.h:447
Attributes used in expand_dims operators.
Definition: transform.h:46
Relay expression language.
Attributes used in matrix_set_diag operator.
Definition: transform.h:458
Performance counters for profiling via the PAPI library.
Definition: analyzer.h:36
Array< Integer > axes
Definition: transform.h:89
TVM_DECLARE_ATTRS(DynExpandDimsAttrs, "relay.attrs.DynExpandDimsAttrs")
Definition: transform.h:67
Attributes used in unique operator.
Definition: transform.h:493
DataType dtype
Definition: transform.h:448
int axis
Definition: transform.h:305
DataType dtype
Definition: transform.h:38
TVM_DECLARE_ATTRS(ShapeOfAttrs, "relay.attrs.ShapeOfAttrs")
Definition: transform.h:410
Attributes that specify a tensor.
Definition: transform.h:194
int axis
Definition: transform.h:417
Integer repeats
Definition: transform.h:243
Definition: transform.h:124
TVM_DECLARE_ATTRS(StackAttrs, "relay.attrs.StackAttrs")
Definition: transform.h:235
Array< Integer > newshape
Definition: transform.h:97
Definition: transform.h:159
Attributes used in transpose operators.
Definition: transform.h:88
Attributes used in one-hot operator.
Definition: transform.h:445
int32_t multiplier
Definition: transform.h:370
TVM_DECLARE_ATTRS(ConcatenateAttrs, "relay.attrs.ConcatenateAttrs")
Definition: transform.h:78
Definition: transform.h:149
Attributes for Clip operator.
Definition: transform.h:358
Definition: transform.h:132
int num_newaxis
Definition: transform.h:48
TVM_DECLARE_ATTRS(TileAttrs, "relay.attrs.TileAttrs")
Definition: transform.h:256
Attributes for StridedSlice operator.
Definition: transform.h:320
Optional< Array< Integer > > begin
Definition: transform.h:321
TVM_DECLARE_ATTRS(ClipAttrs, "relay.attrs.ClipAttrs")
Definition: transform.h:362
TVM_DECLARE_ATTRS(UniqueAttrs, "relay.attrs.UniqueAttrs")
Definition: transform.h:496
Helpers for attribute objects.
ObjectRef indices_or_sections
Definition: transform.h:304
Integer batch_dims
Definition: transform.h:160
Definition: transform.h:346
Optional< Array< Integer > > shape
Definition: transform.h:195
Attributes used in MXNet-style reshape_like operators.
Definition: transform.h:105
Attributes used in dynamic expand_dims operators.
Definition: transform.h:64
TVM_DECLARE_ATTRS(SequenceMaskAttrs, "relay.attrs.SequenceMaskAttrs")
Definition: transform.h:419
Expr start
Definition: transform.h:206
TVM_DECLARE_ATTRS(EinsumAttrs, "relay.attrs.EinsumAttrs")
Definition: transform.h:508
Attributes used in einsum operator.
Definition: transform.h:505
String equation
Definition: transform.h:506
Attributes used in cumsum and cumprod operator.
Definition: transform.h:477
TVM_DECLARE_ATTRS(SparseToDenseAttrs, "relay.attrs.SparseToDenseAttrs")
Definition: transform.h:430
Integer batch_dims
Definition: transform.h:174
Runtime primitive data type.
Definition: data_type.h:41
Attributes used in arange operators.
Definition: transform.h:205
TVM_DECLARE_ATTRS(GatherNDAttrs, "relay.attrs.GatherNDAttrs")
Definition: transform.h:163
Array, container representing a contiguous sequence of ObjectRefs.
Definition: array.h:270
Attributes used in reverse operators.
Definition: transform.h:264
TVM_DECLARE_ATTRS(ScatterAttrs, "relay.attrs.ScatterAttrs")
Definition: transform.h:127
Definition: transform.h:303
TVM_DECLARE_ATTRS(ReverseAttrs, "relay.attrs.ReverseAttrs")
Definition: transform.h:266
double a_min
Definition: transform.h:359
int depth
Definition: transform.h:446
Attributes used in meshgrid operators.
Definition: transform.h:220
DataType dtype
Definition: transform.h:479
TVM_DECLARE_ATTRS(GatherAttrs, "relay.attrs.GatherAttrs")
Definition: transform.h:152
#define TVM_ATTR_FIELD(FieldName)
Declare an attribute field.
Definition: attrs.h:76
TVM_DECLARE_ATTRS(ArangeAttrs, "relay.attrs.ArangeAttrs")
Definition: transform.h:211
Attributes used in tile operators.
Definition: transform.h:254
DataType dtype
Definition: transform.h:209
bool sorted
Definition: transform.h:494
Reference to string objects.
Definition: string.h:129
String mode
Definition: transform.h:141
TVM_DECLARE_ATTRS(InitOpAttrs, "relay.attrs.InitOpAttrs")
Definition: transform.h:198
TVM_DECLARE_ATTRS(ScatterAddAttrs, "relay.attrs.ScatterAddAttrs")
Definition: transform.h:135
Managed reference to RelayExprNode.
Definition: expr.h:177
Expr stop
Definition: transform.h:207
Integer lhs_end
Definition: transform.h:107
TVM_DECLARE_ATTRS(SqueezeAttrs, "relay.attrs.SqueezeAttrs")
Definition: transform.h:292
TVM_DECLARE_ATTRS(SliceLikeAttrs, "relay.attrs.SliceLikeAttrs")
Definition: transform.h:349
Integer axis
Definition: transform.h:478
std::string slice_mode
Definition: transform.h:324
Array< Integer > reps
Definition: transform.h:255
Integer seq_axis
Definition: transform.h:275
TVM_DECLARE_ATTRS(ScatterNDAttrs, "relay.attrs.ScatterNDAttrs")
Definition: transform.h:143
bool super_diag_right_align
Definition: transform.h:461
bool return_counts
Definition: transform.h:495
Base class of all object reference.
Definition: object.h:504
DataType NullValue< DataType >()
Definition: attrs.h:90
Integer axis
Definition: transform.h:125
TVM_DECLARE_ATTRS(CastAttrs, "relay.attrs.CastAttrs")
Definition: transform.h:40
Attributes used in sparse_to_dense operator.
Definition: transform.h:427
std::string indexing
Definition: transform.h:221
int num_newaxis
Definition: transform.h:65
TVM_DECLARE_ATTRS(TransposeAttrs, "relay.attrs.TransposeAttrs")
Definition: transform.h:90
TVM_DECLARE_ATTRS(SplitAttrs, "relay.attrs.SplitAttrs")
Definition: transform.h:307
Attributes for ndarray_size operator.
Definition: transform.h:436
Optional< Array< Integer > > axes
Definition: transform.h:325
Definition: transform.h:140
TVM_DECLARE_ATTRS(MeshgridAttrs, "relay.attrs.MeshgridAttrs")
Definition: transform.h:223
Attributes used in stack operators.
Definition: transform.h:233
int32_t shift
Definition: transform.h:371
Definition: transform.h:173
double mask_value
Definition: transform.h:416
DataType dtype
Definition: transform.h:437
The base class of the all the Use "curiously recurring template pattern".
Definition: attrs.h:793
DataType dtype
Definition: transform.h:408
bool sub_diag_right_align
Definition: transform.h:462
TVM_DECLARE_ATTRS(ReverseSequenceAttrs, "relay.attrs.ReverseSequenceAttrs")
Definition: transform.h:278
int k1
Definition: transform.h:459
Expr step
Definition: transform.h:208
Attributes used in repeat operators.
Definition: transform.h:242
Optional< Array< Integer > > strides
Definition: transform.h:323
Attributes used in squeeze operators.
Definition: transform.h:288
Base classes for the Relay IR.
Optional container that to represent to a Nullable variant of T.
Definition: optional.h:51
Array< Integer > axis
Definition: transform.h:290
TVM_DECLARE_ATTRS(RepeatAttrs, "relay.attrs.RepeatAttrs")
Definition: transform.h:245
int axis
Definition: transform.h:77
TObjectRef NullValue()
Create a NodeRef type that represents null.
Definition: attrs.h:84
TVM_DECLARE_ATTRS(TakeAttrs, "relay.attrs.TakeAttrs")
Definition: transform.h:178
Definition: transform.h:415
Integer rhs_end
Definition: transform.h:109
Attributes used in reverse_sequence operators.
Definition: transform.h:274
Attributes used in reshape operators.
Definition: transform.h:96
Optional< Integer > index_rank
Definition: transform.h:161
TVM_DECLARE_ATTRS(OneHotAttrs, "relay.attrs.OneHotAttrs")
Definition: transform.h:450
Integer axis
Definition: transform.h:133
Attributes for ShapeOf operator.
Definition: transform.h:407
Integer axis
Definition: transform.h:150
TVM_DECLARE_ATTRS(ScanopAttrs, "relay.attrs.ScanopAttrs")
Definition: transform.h:481
Array< Integer > output_shape
Definition: transform.h:428
Optional< Array< Integer > > end
Definition: transform.h:322
Integer axis
Definition: transform.h:244
Integer axis
Definition: transform.h:234
TVM_DECLARE_ATTRS(FixedPointMultiplyAttrs, "relay.attrs.FixedPointMultiplyAttrs")
Definition: transform.h:373
int k2
Definition: transform.h:460
Attributes used in concatenate operators.
Definition: transform.h:76
Integer batch_axis
Definition: transform.h:276
Container of constant int that adds more constructors.
Definition: expr.h:356
Integer axis
Definition: transform.h:175