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
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 | |
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
74 75 76 77 78 79 | |
verify_() -> None
Source code in xdsl/dialects/affine.py
81 82 83 84 85 86 87 88 89 90 | |
parse(parser: Parser) -> ApplyOp
classmethod
Source code in xdsl/dialects/affine.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | |
print(printer: Printer)
Source code in xdsl/dialects/affine.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | |
ForOp
dataclass
Bases: IRDLOperation
Source code in xdsl/dialects/affine.py
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 | |
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
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 | |
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
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 | |
IfOp
dataclass
Bases: IRDLOperation
See external documentation.
Source code in xdsl/dialects/affine.py
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | |
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
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 | |
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
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 | |
StoreOp
Bases: IRDLOperation
Source code in xdsl/dialects/affine.py
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 | |
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
399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 | |
parse(parser: Parser) -> StoreOp
classmethod
Source code in xdsl/dialects/affine.py
419 420 421 422 423 424 425 | |
print(printer: Printer)
Source code in xdsl/dialects/affine.py
427 428 429 430 431 432 433 434 | |
LoadOp
Bases: IRDLOperation
Source code in xdsl/dialects/affine.py
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 | |
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
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 | |
parse(parser: Parser) -> LoadOp
classmethod
Source code in xdsl/dialects/affine.py
481 482 483 484 485 486 | |
print(printer: Printer)
Source code in xdsl/dialects/affine.py
488 489 490 491 492 | |
MinOp
dataclass
Bases: IRDLOperation
Source code in xdsl/dialects/affine.py
495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 | |
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
verify_() -> None
Source code in xdsl/dialects/affine.py
503 504 505 506 507 508 509 510 | |
YieldOp
dataclass
Bases: IRDLOperation
Source code in xdsl/dialects/affine.py
513 514 515 516 517 518 519 520 521 522 | |
name = 'affine.yield'
class-attribute
instance-attribute
arguments = var_operand_def()
class-attribute
instance-attribute
traits = traits_def(IsTerminator(), Pure())
class-attribute
instance-attribute
get(*operands: SSAValue | Operation) -> YieldOp
staticmethod
Source code in xdsl/dialects/affine.py
520 521 522 | |
VectorLoadOp
Bases: IRDLOperation
Reads a slice from a MemRef into a vector.
Source code in xdsl/dialects/affine.py
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 | |
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
544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 | |
parse(parser: Parser) -> VectorLoadOp
classmethod
Source code in xdsl/dialects/affine.py
560 561 562 563 564 565 566 567 568 569 570 571 572 | |
print(printer: Printer)
Source code in xdsl/dialects/affine.py
574 575 576 577 578 579 580 | |
VectorStoreOp
Bases: IRDLOperation
Writes a vector into a slice within a MemRef.
Source code in xdsl/dialects/affine.py
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 | |
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
601 602 603 604 605 606 607 608 609 610 611 612 613 | |
parse(parser: Parser) -> VectorStoreOp
classmethod
Source code in xdsl/dialects/affine.py
615 616 617 618 619 620 621 622 623 624 625 | |
print(printer: Printer)
Source code in xdsl/dialects/affine.py
627 628 629 630 631 632 633 634 635 636 637 | |