Affine
affine
Affine = Dialect('affine', [ApplyOp, ForOp, ParallelOp, IfOp, StoreOp, LoadOp, MinOp, YieldOp, VectorLoadOp, VectorStoreOp], [])
module-attribute
ApplyOp
Bases: IRDLOperation
Source code in xdsl/dialects/affine.py
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 | |
name = 'affine.apply'
class-attribute
instance-attribute
mapOperands = var_operand_def(IndexType)
class-attribute
instance-attribute
map = prop_def(AffineMapAttr)
class-attribute
instance-attribute
result = result_def(IndexType)
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
__init__(map_operands: Sequence[SSAValue], affine_map: AffineMapAttr)
Source code in xdsl/dialects/affine.py
77 78 79 80 81 82 | |
verify_() -> None
Source code in xdsl/dialects/affine.py
84 85 86 87 88 89 90 91 92 93 | |
parse(parser: Parser) -> ApplyOp
classmethod
Source code in xdsl/dialects/affine.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | |
print(printer: Printer)
Source code in xdsl/dialects/affine.py
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | |
ForOp
dataclass
Bases: IRDLOperation
Source code in xdsl/dialects/affine.py
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 | |
name = 'affine.for'
class-attribute
instance-attribute
lowerBoundOperands = var_operand_def(IndexType)
class-attribute
instance-attribute
upperBoundOperands = var_operand_def(IndexType)
class-attribute
instance-attribute
inits = var_operand_def()
class-attribute
instance-attribute
res = var_result_def()
class-attribute
instance-attribute
lowerBoundMap = prop_def(AffineMapAttr)
class-attribute
instance-attribute
upperBoundMap = prop_def(AffineMapAttr)
class-attribute
instance-attribute
step = prop_def(IntegerAttr)
class-attribute
instance-attribute
body = region_def()
class-attribute
instance-attribute
irdl_options = (AttrSizedOperandSegments(as_property=True),)
class-attribute
instance-attribute
verify_() -> None
Source code in xdsl/dialects/affine.py
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 | |
from_region(lowerBoundOperands: Sequence[Operation | SSAValue], upperBoundOperands: Sequence[Operation | SSAValue], inits: Sequence[Operation | SSAValue], result_types: Sequence[Attribute], lower_bound: int | AffineMapAttr, upper_bound: int | AffineMapAttr, region: Region, step: int | IntegerAttr = 1) -> ForOp
staticmethod
Source code in xdsl/dialects/affine.py
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 | |
parse(parser: Parser) -> Self
classmethod
Source code in xdsl/dialects/affine.py
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 | |
print(printer: Printer)
Source code in xdsl/dialects/affine.py
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 | |
IfOp
dataclass
Bases: IRDLOperation
See external documentation.
Source code in xdsl/dialects/affine.py
443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 | |
name = 'affine.if'
class-attribute
instance-attribute
args = var_operand_def(IndexType)
class-attribute
instance-attribute
res = var_result_def()
class-attribute
instance-attribute
condition = prop_def(AffineSetAttr)
class-attribute
instance-attribute
then_region = region_def('single_block')
class-attribute
instance-attribute
else_region = region_def()
class-attribute
instance-attribute
traits = traits_def(RecursiveMemoryEffect(), RecursivelySpeculatable())
class-attribute
instance-attribute
ParallelOp
dataclass
Bases: IRDLOperation
See external documentation.
Source code in xdsl/dialects/affine.py
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 | |
name = 'affine.parallel'
class-attribute
instance-attribute
map_operands = var_operand_def(IndexType)
class-attribute
instance-attribute
reductions = prop_def(ArrayAttr[StringAttr])
class-attribute
instance-attribute
lowerBoundsMap = prop_def(AffineMapAttr)
class-attribute
instance-attribute
lowerBoundsGroups = prop_def(DenseIntElementsAttr)
class-attribute
instance-attribute
upperBoundsMap = prop_def(AffineMapAttr)
class-attribute
instance-attribute
upperBoundsGroups = prop_def(DenseIntElementsAttr)
class-attribute
instance-attribute
steps = prop_def(ArrayAttr[IntegerAttr[IntegerType]])
class-attribute
instance-attribute
res = var_result_def()
class-attribute
instance-attribute
body = region_def('single_block')
class-attribute
instance-attribute
verify_() -> None
Source code in xdsl/dialects/affine.py
483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 | |
StoreOp
Bases: IRDLOperation
Source code in xdsl/dialects/affine.py
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 | |
name = 'affine.store'
class-attribute
instance-attribute
T: ClassVar = VarConstraint('T', AnyAttr())
class-attribute
instance-attribute
value = operand_def(T)
class-attribute
instance-attribute
memref = operand_def(MemRefType.constr(T))
class-attribute
instance-attribute
indices = var_operand_def(IndexType)
class-attribute
instance-attribute
map = prop_def(AffineMapAttr)
class-attribute
instance-attribute
__init__(value: SSAValue, memref: SSAValue, indices: Sequence[SSAValue], map: AffineMapAttr | None = None)
Source code in xdsl/dialects/affine.py
628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 | |
parse(parser: Parser) -> StoreOp
classmethod
Source code in xdsl/dialects/affine.py
648 649 650 651 652 653 654 | |
print(printer: Printer)
Source code in xdsl/dialects/affine.py
656 657 658 659 660 661 662 663 | |
LoadOp
Bases: IRDLOperation
Source code in xdsl/dialects/affine.py
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 | |
name = 'affine.load'
class-attribute
instance-attribute
T: ClassVar = VarConstraint('T', AnyAttr())
class-attribute
instance-attribute
memref = operand_def(MemRefType.constr(T))
class-attribute
instance-attribute
indices = var_operand_def(IndexType)
class-attribute
instance-attribute
result = result_def(T)
class-attribute
instance-attribute
map = prop_def(AffineMapAttr)
class-attribute
instance-attribute
__init__(memref: SSAValue, indices: Sequence[SSAValue], map: AffineMapAttr | None = None, result_type: Attribute | None = None)
Source code in xdsl/dialects/affine.py
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 | |
parse(parser: Parser) -> LoadOp
classmethod
Source code in xdsl/dialects/affine.py
710 711 712 713 714 715 | |
print(printer: Printer)
Source code in xdsl/dialects/affine.py
717 718 719 720 721 | |
MinOp
Bases: IRDLOperation
Source code in xdsl/dialects/affine.py
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 | |
name = 'affine.min'
class-attribute
instance-attribute
arguments = var_operand_def(IndexType())
class-attribute
instance-attribute
result = result_def(IndexType())
class-attribute
instance-attribute
map = prop_def(AffineMapAttr)
class-attribute
instance-attribute
__init__(map_operands: Sequence[SSAValue | Operation], affine_map: AffineMapAttr)
Source code in xdsl/dialects/affine.py
732 733 734 735 736 737 738 739 740 741 | |
verify_() -> None
Source code in xdsl/dialects/affine.py
743 744 745 746 747 748 749 750 | |
parse(parser: Parser) -> MinOp
classmethod
Source code in xdsl/dialects/affine.py
752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 | |
print(printer: Printer)
Source code in xdsl/dialects/affine.py
770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 | |
YieldOp
dataclass
Bases: IRDLOperation
Source code in xdsl/dialects/affine.py
791 792 793 794 795 796 797 798 799 800 801 802 | |
name = 'affine.yield'
class-attribute
instance-attribute
arguments = var_operand_def()
class-attribute
instance-attribute
traits = traits_def(IsTerminator(), Pure())
class-attribute
instance-attribute
assembly_format = 'attr-dict ($arguments^ `:` type($arguments))?'
class-attribute
instance-attribute
get(*operands: SSAValue | Operation) -> YieldOp
staticmethod
Source code in xdsl/dialects/affine.py
800 801 802 | |
VectorLoadOp
Bases: IRDLOperation
Reads a slice from a MemRef into a vector.
Source code in xdsl/dialects/affine.py
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 | |
name = 'affine.vector_load'
class-attribute
instance-attribute
T: ClassVar = VarConstraint('T', AnyAttr())
class-attribute
instance-attribute
memref = operand_def(MemRefType.constr(T))
class-attribute
instance-attribute
indices = var_operand_def(IndexType)
class-attribute
instance-attribute
result = result_def(VectorType.constr(T))
class-attribute
instance-attribute
map = prop_def(AffineMapAttr)
class-attribute
instance-attribute
__init__(memref: SSAValue[MemRefType], indices: Sequence[SSAValue[IndexType]], map: AffineMap | AffineMapAttr | None = None, result_type: VectorType | None = None)
Source code in xdsl/dialects/affine.py
824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 | |
parse(parser: Parser) -> VectorLoadOp
classmethod
Source code in xdsl/dialects/affine.py
840 841 842 843 844 845 846 847 848 849 850 851 852 | |
print(printer: Printer)
Source code in xdsl/dialects/affine.py
854 855 856 857 858 859 860 | |
VectorStoreOp
Bases: IRDLOperation
Writes a vector into a slice within a MemRef.
Source code in xdsl/dialects/affine.py
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 | |
name = 'affine.vector_store'
class-attribute
instance-attribute
T: ClassVar = VarConstraint('T', AnyAttr())
class-attribute
instance-attribute
value = operand_def(VectorType.constr(T))
class-attribute
instance-attribute
memref = operand_def(MemRefType.constr(T))
class-attribute
instance-attribute
indices = var_operand_def(IndexType)
class-attribute
instance-attribute
map = prop_def(AffineMapAttr)
class-attribute
instance-attribute
__init__(value: SSAValue, memref: SSAValue[MemRefType], indices: Sequence[SSAValue[IndexType]], map: AffineMap | AffineMapAttr | None = None)
Source code in xdsl/dialects/affine.py
881 882 883 884 885 886 887 888 889 890 891 892 893 | |
parse(parser: Parser) -> VectorStoreOp
classmethod
Source code in xdsl/dialects/affine.py
895 896 897 898 899 900 901 902 903 904 905 | |
print(printer: Printer)
Source code in xdsl/dialects/affine.py
907 908 909 910 911 912 913 914 915 916 917 | |