-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathattributes.td
800 lines (675 loc) · 21.4 KB
/
attributes.td
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
//
// Copyright (C) 2022-2025 Intel Corporation.
// SPDX-License-Identifier: Apache 2.0
//
#ifndef VPUX_COMPILER_DIALECT_IE_ATTRIBUTES
#define VPUX_COMPILER_DIALECT_IE_ATTRIBUTES
include "mlir/IR/OpBase.td"
include "vpux/compiler/dialect/core/attributes.td"
include "vpux/compiler/dialect/IE/dialect.td"
include "vpux/compiler/dialect/core/type_interfaces.td"
//
// Base classes
//
class IE_I64EnumAttr <string name, string summary, list<I64EnumAttrCase> cases> :
I64EnumAttr<name, summary, cases> {
let cppNamespace = "vpux::IE";
let genSpecializedAttr = 0;
}
class IE_EnumAttr <EnumAttrInfo enumInfo, string name = "", list <Trait> traits = []> :
EnumAttr<IE_Dialect, enumInfo, name, traits> {
let assemblyFormat = "`<`$value`>`";
}
class IE_Attr<string name, list<Trait> traits = []> :
AttrDef<IE_Dialect, name, traits> {
let mnemonic = name;
let assemblyFormat = "`<` struct(params) `>`";
}
//
// TypeComparisonMode
//
defvar IE_STRICT_EQUAL = "STRICT_EQUAL";
defvar IE_ALLOW_MIXED_PRECISION = "ALLOW_MIXED_PRECISION";
defvar IE_ALLOW_DIFFERENT_QUANT = "ALLOW_DIFFERENT_QUANT";
defvar IE_ALLOW_GROUPED_OUTPUT = "ALLOW_GROUPED_OUTPUT";
defvar IE_ALLOW_DISTRIBUTED_OUTPUT = "ALLOW_DISTRIBUTED_OUTPUT";
defvar IE_TypeComparisonMode_STRICT_EQUAL = !strconcat("vpux::IE::TypeComparisonMode::", IE_STRICT_EQUAL);
defvar IE_TypeComparisonMode_ALLOW_MIXED_PRECISION = !strconcat("vpux::IE::TypeComparisonMode::", IE_ALLOW_MIXED_PRECISION);
defvar IE_TypeComparisonMode_ALLOW_DIFFERENT_QUANT = !strconcat("vpux::IE::TypeComparisonMode::", IE_ALLOW_DIFFERENT_QUANT);
defvar IE_TypeComparisonMode_ALLOW_GROUPED_OUTPUT = !strconcat("vpux::IE::TypeComparisonMode::", IE_ALLOW_GROUPED_OUTPUT);
defvar IE_TypeComparisonMode_ALLOW_DISTRIBUTED_OUTPUT = !strconcat("vpux::IE::TypeComparisonMode::", IE_ALLOW_DISTRIBUTED_OUTPUT);
def IE_TypeComparisonMode :
I64BitEnumAttr<
"TypeComparisonMode",
"Tensor element type comparison modes",
[
I64BitEnumAttrCase<IE_STRICT_EQUAL, 0x1>,
I64BitEnumAttrCase<IE_ALLOW_MIXED_PRECISION, 0x2>,
I64BitEnumAttrCase<IE_ALLOW_DIFFERENT_QUANT, 0x4>,
I64BitEnumAttrCase<IE_ALLOW_GROUPED_OUTPUT, 0x8>,
I64BitEnumAttrCase<IE_ALLOW_DISTRIBUTED_OUTPUT, 0x10>
]
> {
let cppNamespace = "vpux::IE";
let genSpecializedAttr = 1;
}
//
// EpsMode
//
def IE_EpsMode :
IE_I64EnumAttr<
"EpsMode",
"EpsMode that the InferenceEngine supports",
[
I64EnumAttrCase<"ADD", 0>,
I64EnumAttrCase<"MAX", 1>,
]
> {
}
def IE_EpsModeAttr : IE_EnumAttr<IE_EpsMode, "eps_mode">;
//
// MvnEpsMode
//
def IE_MvnEpsMode :
IE_I64EnumAttr<
"MvnEpsMode",
"MvnEpsMode that the InferenceEngine supports",
[
I64EnumAttrCase<"INSIDE_SQRT", 0>,
I64EnumAttrCase<"OUTSIDE_SQRT", 1>,
]
> {
}
def IE_MvnEpsModeAttr : IE_EnumAttr<IE_MvnEpsMode, "mvn_eps_mode">;
//
// TopKMode
//
def IE_TopKMode :
IE_I64EnumAttr<
"TopKMode",
"TopKMode that the InferenceEngine supports",
[
I64EnumAttrCase<"MAX", 0>,
I64EnumAttrCase<"MIN", 1>,
]
> {
}
def IE_TopKModeAttr : IE_EnumAttr<IE_TopKMode, "topk_mode">;
//
// TopKSortType
//
def IE_TopKSortType :
IE_I64EnumAttr<
"TopKSortType",
"TopKSortType that the InferenceEngine supports",
[
I64EnumAttrCase<"NONE", 0>,
I64EnumAttrCase<"SORT_VALUES", 1>,
I64EnumAttrCase<"SORT_INDICES", 2>,
]
> {
}
def IE_TopKSortTypeAttr : IE_EnumAttr<IE_TopKSortType, "topk_sort_type">;
//
// GridSampleMode
//
def IE_GridSampleMode :
IE_I64EnumAttr<
"GridSampleMode",
"GridSampleMode that the InferenceEngine supports",
[
I64EnumAttrCase<"BILINEAR", 0>,
I64EnumAttrCase<"BICUBIC", 1>,
I64EnumAttrCase<"NEAREST", 2>,
]
> {
}
def IE_GridSampleModeAttr : IE_EnumAttr<IE_GridSampleMode, "grid_sample_mode">;
//
// GridSamplePaddingMode
//
def IE_GridSamplePaddingMode :
IE_I64EnumAttr<
"GridSamplePaddingMode",
"GridSamplePaddingMode that the InferenceEngine supports",
[
I64EnumAttrCase<"ZEROS", 0>,
I64EnumAttrCase<"BORDER", 1>,
I64EnumAttrCase<"REFLECTION", 2>,
]
> {
}
def IE_GridSamplePaddingModeAttr : IE_EnumAttr<IE_GridSamplePaddingMode, "grid_sample_padding_mode">;
//
// ROIPoolingMethod
//
def IE_ROIPoolingMethod :
IE_I64EnumAttr<
"ROIPoolingMethod",
"ROIPoolingMethod that the InferenceEngine supports",
[
I64EnumAttrCase<"MAX", 0>,
I64EnumAttrCase<"BILINEAR", 1>,
]
> {
}
def IE_ROIPoolingMethodAttr : IE_EnumAttr<IE_ROIPoolingMethod, "roi_pooling_method">;
//
// ROIAlignMethod
//
def IE_ROIAlignMethod :
IE_I64EnumAttr<
"ROIAlignMethod",
"ROIAlignMethod that the InferenceEngine supports",
[
I64EnumAttrCase<"AVG", 0>,
I64EnumAttrCase<"MAX", 1>,
]
> {
}
def IE_ROIAlignMethodAttr : IE_EnumAttr<IE_ROIAlignMethod, "roi_align_method">;
//
// ROIAlignAlignedMethod
//
def IE_ROIAlignAlignedMethod :
IE_I64EnumAttr<
"ROIAlignAlignedMethod",
"ROIAlignAlignedMethod that the InferenceEngine supports",
[
I64EnumAttrCase<"ASYMMETRIC", 0>,
I64EnumAttrCase<"HALF_PIXEL_FOR_NN", 1>,
I64EnumAttrCase<"HALF_PIXEL", 2>,
]
> {
}
def IE_ROIAlignAlignedMethodAttr : IE_EnumAttr<IE_ROIAlignAlignedMethod, "roi_align_aligned_method">;
//
// AutoBroadcastType
//
def IE_AutoBroadcastType :
IE_I64EnumAttr<
"AutoBroadcastType",
"Specifies rules used for auto-broadcasting of input tensors",
[
I64EnumAttrCase<"NONE_OR_EXPLICIT", 0>,
I64EnumAttrCase<"NUMPY", 1>,
I64EnumAttrCase<"PDPD", 2>,
]
> {
}
def IE_AutoBroadcastTypeAttr : IE_EnumAttr<IE_AutoBroadcastType, "auto_broadcast_type">;
//
// BroadcastType
//
def IE_BroadcastType :
IE_I64EnumAttr<
"BroadcastType",
"Broadcast type that operations support",
[
I64EnumAttrCase<"NUMPY", 0>,
I64EnumAttrCase<"EXPLICIT", 1>,
I64EnumAttrCase<"BIDIRECTIONAL", 2>,
]
> {
}
def IE_BroadcastTypeAttr : IE_EnumAttr<IE_BroadcastType, "broadcast_type">;
//
// RoundingType
//
def IE_RoundingType :
IE_I64EnumAttr<
"RoundingType",
"Rounding type that operations support",
[
I64EnumAttrCase<"FLOOR", 0>,
I64EnumAttrCase<"CEIL", 1>,
]
> {
}
def IE_RoundingTypeAttr : IE_EnumAttr<IE_RoundingType, "rounding_type">;
//
// LRN_IERegion
//
def IE_LRN_IERegion :
IE_I64EnumAttr<
"LRN_IERegion",
"LRN_IE region that operations support",
[
I64EnumAttrCase<"SAME", 0>,
I64EnumAttrCase<"ACROSS", 1>
]
> {
}
def IE_LRN_IERegionAttr : IE_EnumAttr<IE_LRN_IERegion, "lrn_ieregion">;
//
// Proposal
//
def IE_ProposalAttr : IE_Attr<"Proposal"> {
let parameters = (ins
"mlir::IntegerAttr":$baseSize,
"mlir::IntegerAttr":$preNmsTopN,
"mlir::IntegerAttr":$postNmsTopN,
"mlir::FloatAttr":$nmsThresh,
"mlir::IntegerAttr":$featStride,
"mlir::IntegerAttr":$minSize,
"mlir::ArrayAttr":$ratio,
"mlir::ArrayAttr":$scale,
"mlir::BoolAttr":$clipBeforeNms,
"mlir::BoolAttr":$clipAfterNms,
"mlir::BoolAttr":$normalize,
"mlir::FloatAttr":$boxSizeScale,
"mlir::FloatAttr":$boxCoordinateScale,
"mlir::StringAttr":$framework,
"mlir::BoolAttr":$inferProbs
);
}
//
// ReverseMode
//
def IE_ReverseMode :
IE_I64EnumAttr<
"ReverseMode",
"ReverseMode specifies how the second input tensor should be interpreted",
[
I64EnumAttrCase<"INDEX", 0>,
I64EnumAttrCase<"MASK", 1>,
]
> {
}
def IE_ReverseModeAttr : IE_EnumAttr<IE_ReverseMode, "reverse_mode">;
//
// Interpolate
//
def IE_InterpolateMode :
IE_I64EnumAttr<
"InterpolateMode",
"Specifies type of interpolation",
[
I64EnumAttrCase<"NEAREST", 0>,
I64EnumAttrCase<"LINEAR", 1>,
I64EnumAttrCase<"LINEAR_ONNX", 2>,
I64EnumAttrCase<"CUBIC", 3>,
]
> {
}
def IE_InterpolateModeAttr : IE_EnumAttr<IE_InterpolateMode, "interpolate_mode">;
def IE_InterpolateCalcMode :
IE_I64EnumAttr<
"InterpolateCalcMode",
"Specifies which input, sizes or scales, is used to calculate an output shape.",
[
I64EnumAttrCase<"SIZES", 0>,
I64EnumAttrCase<"SCALES", 1>,
]
> {
}
def IE_InterpolateCalcModeAttr : IE_EnumAttr<IE_InterpolateCalcMode, "interpolate_calc_mode">;
def IE_InterpolateCoordMode :
IE_I64EnumAttr<
"InterpolateCoordMode",
"coordinate_transformation_mode specifies how to transform the coordinate.",
[
I64EnumAttrCase<"HALF_PIXEL", 0>,
I64EnumAttrCase<"PYTORCH_HALF_PIXEL", 1>,
I64EnumAttrCase<"ASYMMETRIC", 2>,
I64EnumAttrCase<"TF_HALF_PIXEL_FOR_NN", 3>,
I64EnumAttrCase<"ALIGN_CORNERS", 4>,
]
> {
}
def IE_InterpolateCoordModeAttr : IE_EnumAttr<IE_InterpolateCoordMode, "interpolate_coord_mode">;
def IE_InterpolateNearestMode :
IE_I64EnumAttr<
"InterpolateNearestMode",
"specifies round mode when mode == nearest",
[
I64EnumAttrCase<"ROUND_PREFER_FLOOR", 0>,
I64EnumAttrCase<"ROUND_PREFER_CEIL", 1>,
I64EnumAttrCase<"FLOOR", 2>,
I64EnumAttrCase<"CEIL", 3>,
I64EnumAttrCase<"SIMPLE", 4>,
]
> {
}
def IE_InterpolateNearestModeAttr : IE_EnumAttr<IE_InterpolateNearestMode, "interpolate_nearest_mode">;
def IE_InterpolateAttr : IE_Attr<"Interpolate"> {
let parameters = (ins
"vpux::IE::InterpolateModeAttr":$mode,
"vpux::IE::InterpolateCalcModeAttr":$shape_calc_mode,
"vpux::IE::InterpolateCoordModeAttr":$coord_mode,
"vpux::IE::InterpolateNearestModeAttr":$nearest_mode,
"mlir::BoolAttr":$antialias,
"mlir::ArrayAttr":$pads_begin,
"mlir::ArrayAttr":$pads_end,
"mlir::FloatAttr":$cube_coeff
);
}
//
// DetectionOutputCodeType
//
def IE_DetectionOutputCodeType :
IE_I64EnumAttr<
"DetectionOutputCodeType",
"DetectionOutput parameter that specifies bounding box decoding algorithm",
[
I64EnumAttrCase<"CENTER_SIZE", 0>,
I64EnumAttrCase<"CORNER", 1>,
I64EnumAttrCase<"CORNER_SIZE", 2>,
]
> {
}
def IE_DetectionOutputCodeTypeAttr : IE_EnumAttr<IE_DetectionOutputCodeType, "detection_output_code_type">;
//
// DetectionOutputAttr
//
def IE_DetectionOutputAttr : IE_Attr<"DetectionOutput"> {
let parameters = (ins
"mlir::IntegerAttr":$num_classes,
"mlir::IntegerAttr":$background_label_id,
"mlir::IntegerAttr":$top_k,
"mlir::BoolAttr":$variance_encoded_in_target,
"mlir::ArrayAttr":$keep_top_k,
"vpux::IE::DetectionOutputCodeTypeAttr":$code_type,
"mlir::BoolAttr":$share_location,
"mlir::FloatAttr":$nms_threshold,
"mlir::FloatAttr":$confidence_threshold,
"mlir::BoolAttr":$clip_after_nms,
"mlir::BoolAttr":$clip_before_nms,
"mlir::BoolAttr":$decrease_label_id,
"mlir::BoolAttr":$normalized,
"mlir::IntegerAttr":$input_height,
"mlir::IntegerAttr":$input_width,
"mlir::FloatAttr":$objectness_score
);
}
//
// ExperimentalDetectronROIFeatureExtractorAttr
//
def IE_ExperimentalDetectronROIFeatureExtractorAttr : IE_Attr<"ExperimentalDetectronROIFeatureExtractor"> {
let parameters = (ins
"mlir::IntegerAttr":$output_size,
"mlir::IntegerAttr":$sampling_ratio,
"mlir::BoolAttr":$aligned,
"mlir::ArrayAttr":$pyramid_scales
);
}
//
// PadMode
//
def IE_PadMode :
IE_I64EnumAttr<
"PadMode",
"TPadMode that the InferenceEngine supports",
[
I64EnumAttrCase<"CONSTANT", 0>,
I64EnumAttrCase<"EDGE", 1>,
I64EnumAttrCase<"REFLECT", 2>,
I64EnumAttrCase<"SYMMETRIC", 3>,
]
> {
}
def IE_PadModeAttr : IE_EnumAttr<IE_PadMode, "pad_mode">;
//
// RoundMode
//
def IE_RoundMode :
IE_I64EnumAttr<
"RoundMode",
"RoundMode that the InferenceEngine supports",
[
I64EnumAttrCase<"HALF_TO_EVEN", 0>,
I64EnumAttrCase<"HALF_AWAY_FROM_ZERO", 1>,
]
> {
}
def IE_RoundModeAttr : IE_EnumAttr<IE_RoundMode, "round_mode">;
//
// RNNSequenceDirection
//
def IE_RNNSequenceDirection :
IE_I64EnumAttr<
"RNNSequenceDirection",
"RNNSequenceDirection that the InferenceEngine supports",
[
I64EnumAttrCase<"FORWARD", 0>,
I64EnumAttrCase<"REVERSE", 1>,
I64EnumAttrCase<"BIDIRECTIONAL", 2>,
]
> {
}
def IE_RNNSequenceDirectionAttr : IE_EnumAttr<IE_RNNSequenceDirection, "rnn_seq_direction">;
//
// PostOp
//
def IE_PostOpAttr : IE_Attr<"PostOp"> {
let parameters = (ins
"mlir::StringAttr":$name,
"mlir::DictionaryAttr":$attrs
);
let extraClassDeclaration = [{
bool isChannelAgnostic() const;
}];
}
//
// ConcatAttr
//
def IE_ConcatAttr : IE_Attr<"Concat"> {
let parameters = (ins
"mlir::IntegerAttr":$axis,
OptionalParameter<"mlir::IntegerAttr">:$offset,
OptionalParameter<"mlir::IntegerAttr">:$stride
);
}
//
// IE_DepthToSpaceMode
//
def IE_DepthToSpaceMode :
IE_I64EnumAttr<
"DepthToSpaceMode",
"DepthToSpaceMode that the InferenceEngine supports",
[
I64EnumAttrCase<"BLOCKS_FIRST", 0>,
I64EnumAttrCase<"DEPTH_FIRST", 1>,
]
> {
}
def IE_DepthToSpaceModeAttr : IE_EnumAttr<IE_DepthToSpaceMode, "depth_to_space_mode">;
//
// IE_SpaceToDepthMode
//
def IE_SpaceToDepthMode :
IE_I64EnumAttr<
"SpaceToDepthMode",
"SpaceToDepthMode that the InferenceEngine supports",
[
I64EnumAttrCase<"BLOCKS_FIRST", 0>,
I64EnumAttrCase<"DEPTH_FIRST", 1>,
]
> {
}
def IE_SpaceToDepthModeAttr : IE_EnumAttr<IE_SpaceToDepthMode, "space_to_depth_mode">;
//
// ChannelPaddingAttr
//
def IE_ChannelPaddingAttr : IE_Attr<"ChannelPadding"> {
let parameters = (ins
"mlir::IntegerAttr":$input,
"mlir::IntegerAttr":$output
);
}
//
// Color Formats
//
def IE_ColorFmt :
IE_I64EnumAttr<
"ColorFmt",
"YUV, RGB color formats",
[
I64EnumAttrCase<"NV12", 0>,
I64EnumAttrCase<"I420", 1>,
I64EnumAttrCase<"RGB", 2>,
I64EnumAttrCase<"BGR", 3>
]
> {
}
def IE_ColorFmtAttr : IE_EnumAttr<IE_ColorFmt, "color_fmt">;
//
// BoxEncodingType
//
def IE_BoxEncodingType :
IE_I64EnumAttr<
"BoxEncodingType",
"BoxEncodingType that the InferenceEngine supports",
[
I64EnumAttrCase<"CORNER", 0>,
I64EnumAttrCase<"CENTER", 1>,
]
> {
}
def IE_BoxEncodingTypeAttr : IE_EnumAttr<IE_BoxEncodingType, "box_encoding_type">;
//
// PSROIPoolingMode
//
def IE_PSROIPoolingMode :
IE_I64EnumAttr<
"PSROIPoolingMode",
"PSROIPoolingMode that the InferenceEngine supports",
[
I64EnumAttrCase<"AVERAGE", 0>,
I64EnumAttrCase<"BILINEAR", 1>,
]
> {
}
def IE_PSROIPoolingModeAttr : IE_EnumAttr<IE_PSROIPoolingMode, "psroi_pooling_mode">;
//
// PadType
//
def IE_PadType :
IE_I64EnumAttr<
"PadType",
"PadType that the InferenceEngine supports",
[
I64EnumAttrCase<"SAME_LOWER", 0>,
I64EnumAttrCase<"SAME_UPPER", 1>,
I64EnumAttrCase<"VALID", 2>,
]
> {
}
def IE_PadTypeAttr : IE_EnumAttr<IE_PadType, "pad_type">;
//
// DeformablePSROIPoolingMode
//
def IE_DeformablePSROIPoolingMode :
IE_I64EnumAttr<
"DeformablePSROIPoolingMode",
"DeformablePSROIPoolingMode that the InferenceEngine supports",
[
I64EnumAttrCase<"AVERAGE", 0>,
I64EnumAttrCase<"BILINEAR_DEFORMABLE", 1>,
]
> {
}
def IE_DeformablePSROIPoolingModeAttr : IE_EnumAttr<IE_DeformablePSROIPoolingMode, "deformable_psroi_pooling_mode">;
//
// UpsamplingPadAttr
//
def IE_UpsamplingPadAttr : IE_Attr<"UpsamplingPad"> {
let parameters = (ins
"mlir::ArrayAttr":$pads_channel,
"mlir::ArrayAttr":$pads_height,
"mlir::ArrayAttr":$pads_width
);
}
//
// ScatterElementsUpdateReductionType
//
def IE_ScatterElementsUpdateReductionType :
IE_I64EnumAttr<
"ScatterElementsUpdateReductionType",
"ScatterElementsUpdateReductionType that the InferenceEngine supports",
[
I64EnumAttrCase<"NONE", 0>,
I64EnumAttrCase<"SUM", 1>,
I64EnumAttrCase<"PROD", 2>,
I64EnumAttrCase<"MIN", 3>,
I64EnumAttrCase<"MAX", 4>,
I64EnumAttrCase<"MEAN", 5>
]
> {
}
def IE_ScatterElementsUpdateReductionTypeAttr : IE_EnumAttr<IE_ScatterElementsUpdateReductionType, "scatter_elements_update_reduction_type">;
//
// PortMapAttr
//
def IE_SliceInputPortMapAttr : IE_Attr<"SliceInputPortMap"> {
let description = [{
This is the port map attribute for tensor iterator op.
external_port_id represents I/O layers'id ousides of tensor iterator op.
internal_layer_id represents I/O layers'id insides of tensor iterator body.
axis, start, stride, end, part_size are valid only for cases where input needs slicing.
}];
let parameters = (ins
"mlir::IntegerAttr":$external_port_id,
"mlir::IntegerAttr":$internal_layer_id,
"mlir::IntegerAttr":$axis,
"mlir::IntegerAttr":$start,
"mlir::IntegerAttr":$stride,
"mlir::IntegerAttr":$part_size,
"mlir::IntegerAttr":$end
);
}
def IE_InvariantInputPortMapAttr : IE_Attr<"InvariantInputPortMap"> {
let description = [{
This is the port map attribute for tensor iterator op.
external_port_id represents I/O layers'id ousides of tensor iterator op.
internal_layer_id represents I/O layers'id insides of tensor iterator body.
}];
let parameters = (ins
"mlir::IntegerAttr":$external_port_id,
"mlir::IntegerAttr":$internal_layer_id
);
}
def IE_MergedInputPortMapAttr : IE_Attr<"MergedInputPortMap"> {
let description = [{
This is the port map attribute for tensor iterator op.
external_port_id represents I/O layers'id ousides of tensor iterator op.
internal_layer_id represents I/O layers'id insides of tensor iterator body.
body_input_index is valid only for cases where body output is the body param in the next iteration.
}];
let parameters = (ins
"mlir::IntegerAttr":$external_port_id,
"mlir::IntegerAttr":$internal_layer_id,
"mlir::IntegerAttr":$body_input_index
);
}
def IE_ConcatOutputPortMapAttr : IE_Attr<"ConcatOutputPortMap"> {
let description = [{
This is the port map attribute for tensor iterator op.
external_port_id represents I/O layers'id ousides of tensor iterator op.
internal_layer_id represents I/O layers'id insides of tensor iterator body.
axis, start, stride, end, part_size are valid only for cases where output need concating.
}];
let parameters = (ins
"mlir::IntegerAttr":$external_port_id,
"mlir::IntegerAttr":$internal_layer_id,
"mlir::IntegerAttr":$axis,
"mlir::IntegerAttr":$start,
"mlir::IntegerAttr":$stride,
"mlir::IntegerAttr":$part_size,
"mlir::IntegerAttr":$end
);
}
def IE_InvariantOutputPortMapAttr : IE_Attr<"InvariantOutputPortMap"> {
let description = [{
This is the port map attribute for tensor iterator op.
external_port_id represents I/O layers'id ousides of tensor iterator op.
internal_layer_id represents I/O layers'id insides of tensor iterator body.
iterations has default value -1 means pick the last iteration result, or iterations = i it will pick the i-th result.
}];
let parameters = (ins
"mlir::IntegerAttr":$external_port_id,
"mlir::IntegerAttr":$internal_layer_id,
"mlir::IntegerAttr":$iterations
);
}
#endif