Vector
vector
¶
Vector = Dialect('vector', [BitcastOp, BroadcastOp, CreateMaskOp, ExtractOp, FMAOp, InsertOp, LoadOp, MaskedLoadOp, MaskedStoreOp, PrintOp, ReductionOp, ShuffleOp, StoreOp, TransferReadOp, TransferWriteOp], [CombiningKindAttr])
module-attribute
¶
LoadOp
¶
Bases: IRDLOperation
Source code in xdsl/dialects/vector.py
name = 'vector.load'
class-attribute
instance-attribute
¶
base = operand_def(MemRefType)
class-attribute
instance-attribute
¶
indices = var_operand_def(IndexType)
class-attribute
instance-attribute
¶
result = result_def(VectorType)
class-attribute
instance-attribute
¶
nontemporal = opt_prop_def(BoolAttr, default_value=BoolAttr.from_bool(False))
class-attribute
instance-attribute
¶
irdl_options = (ParsePropInAttrDict(),)
class-attribute
instance-attribute
¶
assembly_format = '$base `[` $indices `]` attr-dict `:` type($base) `,` type($result)'
class-attribute
instance-attribute
¶
__init__(ref: OperandArg, indices: Sequence[OperandArg], result_type: VectorType)
¶
verify_()
¶
Source code in xdsl/dialects/vector.py
StoreOp
¶
Bases: IRDLOperation
Source code in xdsl/dialects/vector.py
name = 'vector.store'
class-attribute
instance-attribute
¶
vector = operand_def(VectorType)
class-attribute
instance-attribute
¶
base = operand_def(MemRefType)
class-attribute
instance-attribute
¶
indices = var_operand_def(IndexType)
class-attribute
instance-attribute
¶
nontemporal = opt_prop_def(BoolAttr, default_value=BoolAttr.from_bool(False))
class-attribute
instance-attribute
¶
irdl_options = (ParsePropInAttrDict(),)
class-attribute
instance-attribute
¶
assembly_format = '$vector `,` $base `[` $indices `]` attr-dict `:` type($base) `,` type($vector)'
class-attribute
instance-attribute
¶
__init__(vector: OperandArg, base: OperandArg, indices: Sequence[OperandArg], nontemporal: BoolAttr | None = None)
¶
Source code in xdsl/dialects/vector.py
verify_()
¶
Source code in xdsl/dialects/vector.py
ShuffleResultConstraint
dataclass
¶
Bases: AttrConstraint[VectorType]
Source code in xdsl/dialects/vector.py
element_constr: AttrConstraint
instance-attribute
¶
v1_shape_constr: VarConstraint
instance-attribute
¶
v2_shape_constr: VarConstraint
instance-attribute
¶
mask_constraint: VarConstraint
instance-attribute
¶
__init__(element_constr: AttrConstraint, v1_shape_constr: VarConstraint, v2_shape_constr: VarConstraint, mask_constraint: VarConstraint) -> None
¶
verify(attr: Attribute, constraint_context: VerificationContext) -> None
¶
Source code in xdsl/dialects/vector.py
can_infer(var_constraint_names: AbstractSet[str]) -> bool
¶
Source code in xdsl/dialects/vector.py
infer(context: InferenceContext) -> VectorType
¶
Source code in xdsl/dialects/vector.py
mapping_type_vars(type_var_mapping: Mapping[TypeVar, AttrConstraint | IntConstraint]) -> AttrConstraint[VectorType]
¶
Source code in xdsl/dialects/vector.py
ShuffleOp
¶
Bases: IRDLOperation
The shuffle operation constructs a permutation (or duplication) of elements
from two input vectors, returning a vector with the same element type as
the input and a length that is the same as the shuffle mask. The two input
vectors must have the same element type, same rank , and trailing dimension
sizes and shuffles their values in the
leading dimension (which may differ in size) according to the given mask.
The legality rules are:
* the two operands must have the same element type as the result
- Either, the two operands and the result must have the same
rank and trailing dimension sizes, viz. given two k-D operands
v1 :
Note, scalable vectors are not supported.
Example:
%0 = vector.shuffle %a, %a [0, 3]
: vector<2xf32>, vector<2xf32> ; yields vector<2xf32>
%1 = vector.shuffle %c, %b [0, 1, 2]
: vector<2x16xf32>, vector<1x16xf32> ; yields vector<3x16xf32>
%2 = vector.shuffle %a, %a [3, 2, 1, 0]
: vector<2xf32>, vector<2xf32> ; yields vector<4xf32>
%3 = vector.shuffle %d, %d [0, 1]
: vector<f32>, vector<f32> ; yields vector<2xf32>
See external documentation.
Source code in xdsl/dialects/vector.py
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 | |
name = 'vector.shuffle'
class-attribute
instance-attribute
¶
T: ClassVar = VarConstraint('T', AnyAttr())
class-attribute
instance-attribute
¶
V1_SHAPE: ClassVar = VarConstraint('V1_SHAPE', _IntArrayConstr)
class-attribute
instance-attribute
¶
V2_SHAPE: ClassVar = VarConstraint('V2_SHAPE', _IntArrayConstr)
class-attribute
instance-attribute
¶
MASK: ClassVar = VarConstraint('MASK', _MaskConstr)
class-attribute
instance-attribute
¶
RES: ClassVar = ShuffleResultConstraint(T, V1_SHAPE, V2_SHAPE, MASK)
class-attribute
instance-attribute
¶
v1 = operand_def(VectorType.constr(T, shape=V1_SHAPE))
class-attribute
instance-attribute
¶
v2 = operand_def(VectorType.constr(T, shape=V2_SHAPE))
class-attribute
instance-attribute
¶
mask = prop_def(MASK)
class-attribute
instance-attribute
¶
result = result_def(RES)
class-attribute
instance-attribute
¶
irdl_options = (ParsePropInAttrDict(),)
class-attribute
instance-attribute
¶
traits = traits_def(NoMemoryEffect())
class-attribute
instance-attribute
¶
assembly_format = 'operands $mask attr-dict `:` type(operands)'
class-attribute
instance-attribute
¶
__init__(v1: SSAValue, v2: SSAValue, mask: DenseArrayBase[I64], *, result_type: VectorType)
¶
verify_()
¶
Source code in xdsl/dialects/vector.py
BroadcastOp
¶
Bases: IRDLOperation
See external documentation.
Source code in xdsl/dialects/vector.py
name = 'vector.broadcast'
class-attribute
instance-attribute
¶
source = operand_def()
class-attribute
instance-attribute
¶
vector = result_def(VectorType)
class-attribute
instance-attribute
¶
traits = traits_def(Pure())
class-attribute
instance-attribute
¶
assembly_format = '$source attr-dict `:` type($source) `to` type($vector)'
class-attribute
instance-attribute
¶
__init__(source: OperandArg, result_type: VectorType)
¶
verify_()
¶
Source code in xdsl/dialects/vector.py
FMAOp
¶
Bases: IRDLOperation
Source code in xdsl/dialects/vector.py
name = 'vector.fma'
class-attribute
instance-attribute
¶
T: ClassVar = VarConstraint.get('T', VectorType[AnyFloat])
class-attribute
instance-attribute
¶
lhs = operand_def(T)
class-attribute
instance-attribute
¶
rhs = operand_def(T)
class-attribute
instance-attribute
¶
acc = operand_def(T)
class-attribute
instance-attribute
¶
res = result_def(T)
class-attribute
instance-attribute
¶
traits = traits_def(Pure())
class-attribute
instance-attribute
¶
assembly_format = '$lhs `,` $rhs `,` $acc attr-dict `:` type($lhs)'
class-attribute
instance-attribute
¶
MaskedLoadOp
¶
Bases: IRDLOperation
Source code in xdsl/dialects/vector.py
name = 'vector.maskedload'
class-attribute
instance-attribute
¶
base = operand_def(MemRefType)
class-attribute
instance-attribute
¶
indices = var_operand_def(IndexType)
class-attribute
instance-attribute
¶
mask = operand_def(VectorBaseTypeAndRankConstraint(i1, 1))
class-attribute
instance-attribute
¶
pass_thru = operand_def(VectorType)
class-attribute
instance-attribute
¶
result = result_def(VectorRankConstraint(1))
class-attribute
instance-attribute
¶
assembly_format = '$base `[` $indices `]` `,` $mask `,` $pass_thru attr-dict `:` type($base) `,` type($mask) `,` type($pass_thru) `into` type($result)'
class-attribute
instance-attribute
¶
__init__(base: OperandArg, indices: Sequence[OperandArg], mask: OperandArg, pass_thru: OperandArg, result_type: VectorType | None = None)
¶
Source code in xdsl/dialects/vector.py
verify_()
¶
Source code in xdsl/dialects/vector.py
MaskedStoreOp
¶
Bases: IRDLOperation
Source code in xdsl/dialects/vector.py
name = 'vector.maskedstore'
class-attribute
instance-attribute
¶
base = operand_def(MemRefType)
class-attribute
instance-attribute
¶
indices = var_operand_def(IndexType)
class-attribute
instance-attribute
¶
mask = operand_def(VectorBaseTypeAndRankConstraint(i1, 1))
class-attribute
instance-attribute
¶
value_to_store = operand_def(VectorRankConstraint(1))
class-attribute
instance-attribute
¶
assembly_format = '$base `[` $indices `]` `,` $mask `,` $value_to_store attr-dict `:` type($base) `,` type($mask) `,` type($value_to_store)'
class-attribute
instance-attribute
¶
verify_()
¶
Source code in xdsl/dialects/vector.py
__init__(memref: OperandArg, indices: Sequence[OperandArg], mask: OperandArg, value_to_store: OperandArg)
¶
PrintOp
¶
Bases: IRDLOperation
Source code in xdsl/dialects/vector.py
CreateMaskOp
¶
Bases: IRDLOperation
Source code in xdsl/dialects/vector.py
name = 'vector.create_mask'
class-attribute
instance-attribute
¶
mask_dim_sizes = var_operand_def(IndexType)
class-attribute
instance-attribute
¶
mask_vector = result_def(VectorBaseTypeConstraint(i1))
class-attribute
instance-attribute
¶
assembly_format = '$mask_dim_sizes attr-dict `:` type(results)'
class-attribute
instance-attribute
¶
__init__(mask_operands: list[OperandArg], result_type: VectorType)
¶
verify_()
¶
ExtractOp
¶
Bases: IRDLOperation
Source code in xdsl/dialects/vector.py
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 | |
name = 'vector.extract'
class-attribute
instance-attribute
¶
static_position = prop_def(DenseArrayBase.constr(i64))
class-attribute
instance-attribute
¶
vector = operand_def(_V)
class-attribute
instance-attribute
¶
dynamic_position = var_operand_def(IndexType)
class-attribute
instance-attribute
¶
result = result_def(VectorType.constr(_T, shape=MessageConstraint(ArrayAttr.constr(RangeOf.get(IntAttr).of_length(AtLeast(1))), 'Cannot extract 0d vector.')) | _T)
class-attribute
instance-attribute
¶
traits = traits_def(Pure())
class-attribute
instance-attribute
¶
assembly_format = '$vector `` custom<DynamicIndexList>($dynamic_position, $static_position) attr-dict `:` type($result) `from` type($vector)'
class-attribute
instance-attribute
¶
custom_directives = (DynamicIndexList,)
class-attribute
instance-attribute
¶
get_mixed_position() -> list[SSAValue | int]
¶
Returns the list of positions, represented as either an SSAValue or an int
Source code in xdsl/dialects/vector.py
verify_()
¶
Source code in xdsl/dialects/vector.py
__init__(vector: SSAValue, positions: Sequence[SSAValue | int], result_type: Attribute)
¶
Source code in xdsl/dialects/vector.py
InsertOp
¶
Bases: IRDLOperation
Source code in xdsl/dialects/vector.py
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 | |
name = 'vector.insert'
class-attribute
instance-attribute
¶
static_position = prop_def(DenseArrayBase.constr(i64))
class-attribute
instance-attribute
¶
source = operand_def(VectorType.constr(_T, shape=MessageConstraint(ArrayAttr.constr(RangeOf.get(IntAttr).of_length(AtLeast(1))), 'Cannot insert 0d vector.')) | _T)
class-attribute
instance-attribute
¶
dest = operand_def(_V)
class-attribute
instance-attribute
¶
dynamic_position = var_operand_def(IndexType)
class-attribute
instance-attribute
¶
result = result_def(_V)
class-attribute
instance-attribute
¶
traits = traits_def(Pure())
class-attribute
instance-attribute
¶
assembly_format = '$source `,` $dest custom<DynamicIndexList>($dynamic_position, $static_position)attr-dict `:` type($source) `into` type($dest)'
class-attribute
instance-attribute
¶
custom_directives = (DynamicIndexList,)
class-attribute
instance-attribute
¶
get_mixed_position() -> list[SSAValue | int]
¶
Returns the list of positions, represented as either an SSAValue or an int.
Source code in xdsl/dialects/vector.py
verify_()
¶
Source code in xdsl/dialects/vector.py
__init__(source: SSAValue, dest: SSAValue, positions: Sequence[SSAValue | int], result_type: Attribute | None = None)
¶
Source code in xdsl/dialects/vector.py
VectorTransferOperation
dataclass
¶
Bases: IRDLOperation, ABC
Encodes properties of a vector.transfer_read or vector.transfer_write
operation. Vector transfer ops have:
- A shaped value that the op reads from/writes to: a memref or a tensor.
- A vector, either as a result or as an operand.
- Indices that describe where the transfer from/to the shaped value starts.
- An optional mask.
- An optional in_bounds array to indicate transfer dimensions that are guaranteed to be in-bounds.
- A permutation map to indicate transposes and broadcasts.
The "vector rank" is the rank of the vector type. E.g.:
// Transfer with shaped value rank 2 and vector (transfer) rank 1.
%0 = vector.transfer_read %arg0[%c3, %c3], %f0
{permutation_map = affine_map<(d0, d1) -> (d0)>}
: memref<?x?xf32>, vector<128xf32>
The "vector transfer rank" is the number of dimensions that participate in
the transfer and broadcasts, and matches the number of results in the
permutation map. In most cases, the vector rank matches the vector transfer
rank; the only exception is when a vector is flattened as part of the
transfer (see permutation_map).
Mirrors VectorTransferOpInterface from MLIR
Source code in xdsl/dialects/vector.py
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 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 | |
permutation_map = prop_def(AffineMapAttr)
class-attribute
instance-attribute
¶
The permutation map that describes the mapping of vector dimensions to source dimensions, as well as broadcast dimensions.
The permutation result has one result per vector transfer dimension. Each result is either a dim expression, indicating the corresponding dimension in the source operand, or a constant "0" expression, indicating a broadcast dimension.
Note: Nested vector dimensions that are flattened by this op are not accounted for in the permutation map. E.g.:
in_bounds = prop_def(ArrayAttr[BoolAttr])
class-attribute
instance-attribute
¶
For every vector dimension, the boolean array attribute in_bounds specifies if the
transfer is guaranteed to be within the source bounds. If set to “false”, accesses
(including the starting point) may run out-of-bounds along the respective vector
dimension as the index increases. Non-vector dimensions must always be in-bounds.
The in_bounds array length has to be equal to the vector rank. This attribute has
a default value: false (i.e. “out-of-bounds”). When skipped in the textual IR, the
default value is assumed. Similarly, the OP printer will omit this attribute when
all dimensions are out-of-bounds (i.e. the default value is used).
infer_transfer_op_mask_type(vec_type: VectorType, perm_map: AffineMap) -> VectorType[I1]
staticmethod
¶
Given a resulting vector type and a permutation map from the dimensions of the shaped type to the vector type dimensions, return the vector type of the mask.
Source code in xdsl/dialects/vector.py
get_transfer_minor_identity_map(shaped_type: TensorType | MemRefType, vector_type: VectorType) -> AffineMap
staticmethod
¶
Get the minor identity map for a transfer operation.
This is a helper function to compute the default permutation map for transfer operations when none is specified.
Source code in xdsl/dialects/vector.py
resolve_attrs(parser: Parser, attributes_dict: dict[str, Attribute], shaped_type: TensorType | MemRefType, vector_type: VectorType, mask_start_pos: Position | None, mask_end_pos: Position | None, mask: UnresolvedOperand | None, types_pos: Position)
staticmethod
¶
Source code in xdsl/dialects/vector.py
has_broadcast_dim()
¶
Return "true" if at least one of the vector dimensions is a broadcasted dimension.
Source code in xdsl/dialects/vector.py
verify_op(op: TransferReadOp | TransferWriteOp, shaped_type: MemRefType | TensorType, vector_type: VectorType, mask_type: VectorType[I1] | None, inferred_mask_type: VectorType[I1] | None, permutation_map: AffineMap, in_bounds: ArrayAttr[BoolAttr])
staticmethod
¶
This mirrors VectorOps.cpp -> verifyTransferOp from MLIR
Source code in xdsl/dialects/vector.py
verify_permutation_map(op: TransferReadOp | TransferWriteOp, permutation_map: AffineMap)
staticmethod
¶
This mirrors VectorOps.cpp -> verifyPermutationMap
Source code in xdsl/dialects/vector.py
TransferReadOp
¶
Bases: VectorTransferOperation
Reads a supervector from memory into an SSA vector value.
Source code in xdsl/dialects/vector.py
999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 | |
name = 'vector.transfer_read'
class-attribute
instance-attribute
¶
source = operand_def(TensorType | MemRefType)
class-attribute
instance-attribute
¶
indices = var_operand_def(IndexType)
class-attribute
instance-attribute
¶
padding = operand_def()
class-attribute
instance-attribute
¶
mask = opt_operand_def(VectorType[I1])
class-attribute
instance-attribute
¶
permutation_map = prop_def(AffineMapAttr)
class-attribute
instance-attribute
¶
result = result_def(VectorType)
class-attribute
instance-attribute
¶
irdl_options = (AttrSizedOperandSegments(as_property=True), ParsePropInAttrDict())
class-attribute
instance-attribute
¶
__init__(source: OperandArg, indices: Sequence[OperandArg], padding: OperandArg, result_type: Attribute, in_bounds: ArrayAttr[BoolAttr], permutation_map: AffineMapAttr, mask: OperandArg | None = None)
¶
Source code in xdsl/dialects/vector.py
print(printer: Printer)
¶
Source code in xdsl/dialects/vector.py
parse(parser: Parser) -> TransferReadOp
classmethod
¶
Source code in xdsl/dialects/vector.py
verify_()
¶
Source code in xdsl/dialects/vector.py
TransferWriteOp
¶
Bases: VectorTransferOperation
Source code in xdsl/dialects/vector.py
1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 | |
name = 'vector.transfer_write'
class-attribute
instance-attribute
¶
vector = operand_def(VectorType)
class-attribute
instance-attribute
¶
source = operand_def(TensorType | MemRefType)
class-attribute
instance-attribute
¶
indices = var_operand_def(IndexType)
class-attribute
instance-attribute
¶
mask = opt_operand_def(VectorType[I1])
class-attribute
instance-attribute
¶
permutation_map = prop_def(AffineMapAttr)
class-attribute
instance-attribute
¶
result = opt_result_def(TensorType)
class-attribute
instance-attribute
¶
irdl_options = (AttrSizedOperandSegments(as_property=True), ParsePropInAttrDict())
class-attribute
instance-attribute
¶
__init__(vector: OperandArg, source: OperandArg, indices: Sequence[OperandArg], in_bounds: ArrayAttr[BoolAttr], mask: OperandArg | None = None, permutation_map: AffineMapAttr | None = None, result_type: TensorType | None = None)
¶
Source code in xdsl/dialects/vector.py
print(printer: Printer)
¶
Source code in xdsl/dialects/vector.py
parse(parser: Parser) -> TransferWriteOp
classmethod
¶
Source code in xdsl/dialects/vector.py
verify_()
¶
Source code in xdsl/dialects/vector.py
CombiningKindFlag
¶
Bases: StrEnum
Values specifying the kind of combining operation.
Source code in xdsl/dialects/vector.py
ADD = 'add'
class-attribute
instance-attribute
¶
MUL = 'mul'
class-attribute
instance-attribute
¶
MINUI = 'minui'
class-attribute
instance-attribute
¶
MINSI = 'minsi'
class-attribute
instance-attribute
¶
MINNUMF = 'minnumf'
class-attribute
instance-attribute
¶
MAXUI = 'maxui'
class-attribute
instance-attribute
¶
MAXSI = 'maxsi'
class-attribute
instance-attribute
¶
MAXNUMF = 'maxnumf'
class-attribute
instance-attribute
¶
AND = 'and'
class-attribute
instance-attribute
¶
OR = 'or'
class-attribute
instance-attribute
¶
XOR = 'xor'
class-attribute
instance-attribute
¶
MAXIMUMF = 'maximumf'
class-attribute
instance-attribute
¶
MINIMUMF = 'minimumf'
class-attribute
instance-attribute
¶
CombiningKindAttr
dataclass
¶
Bases: EnumAttribute[CombiningKindFlag]
A mirror of LLVM's vector.kind attribute.
Source code in xdsl/dialects/vector.py
ReductionOp
¶
Bases: IRDLOperation
Source code in xdsl/dialects/vector.py
name = 'vector.reduction'
class-attribute
instance-attribute
¶
vector = operand_def(VectorType.constr(_T))
class-attribute
instance-attribute
¶
acc = opt_operand_def(_T)
class-attribute
instance-attribute
¶
dest = result_def(_T)
class-attribute
instance-attribute
¶
kind = prop_def(CombiningKindAttr)
class-attribute
instance-attribute
¶
fastmath = prop_def(FastMathFlagsAttr, default_value=FastMathFlagsAttr('none'))
class-attribute
instance-attribute
¶
assembly_format = '$kind `,` $vector (`,` $acc^)? (`fastmath` `` $fastmath^)? attr-dict `:` type($vector) `into` type($dest)'
class-attribute
instance-attribute
¶
__init__(vector: OperandArg, kind: CombiningKindAttr, acc: OperandArg | None = None, fastmath: FastMathFlagsAttr | None = None)
¶
Source code in xdsl/dialects/vector.py
BitcastOp
¶
Bases: IRDLOperation
Bitcast between vectors.