Air
air
¶
Port of the AMD Xilinx AIR dialect for programming the AIEs on the AMD Xilinx Versal FPGA architecture. This is a higher-level dialect than the AIE dialect. It is used to program Versal cards over PCIe. AIE is a hardened systolic array present in the Versal devices. The dialect describes netlists of AIE components and it can be lowered to the processor's assembly using the vendor's compiler. A description of the original dialect can be found here https://xilinx.github.io/mlir-air/AIRDialect.html
AIR = Dialect('air', [AllocOp, ChannelOp, ChannelGetOp, ChannelPutOp, CustomOp, DeallocOp, DmaMemcpyNdOp, ExecuteOp, ExecuteTerminatorOp, HerdOp, HerdTerminatorOp, LaunchOp, LaunchTerminatorOp, HerdPipelineOp, PipelineGetOp, PipelinePutOp, PipelineStageOp, PipelineTerminatorOp, PipelineYieldOp, SegmentOp, SegmentTerminatorOp, WaitAllOp], [AsyncTokenAttr])
module-attribute
¶
AsyncTokenAttr
dataclass
¶
Bases: ParametrizedAttribute, TypeAttribute
Source code in xdsl/dialects/experimental/air.py
name = 'air.async.token'
class-attribute
instance-attribute
¶
AllocOp
¶
Bases: IRDLOperation
Source code in xdsl/dialects/experimental/air.py
name = 'air.alloc'
class-attribute
instance-attribute
¶
async_dependencies = var_operand_def(AsyncTokenAttr)
class-attribute
instance-attribute
¶
async_token = result_def(AsyncTokenAttr)
class-attribute
instance-attribute
¶
result = result_def(MemRefType)
class-attribute
instance-attribute
¶
__init__(async_dependencies: Operation, element_type: Attribute, shape: ArrayAttr[IntAttr])
¶
Source code in xdsl/dialects/experimental/air.py
ChannelOp
¶
Bases: IRDLOperation
Source code in xdsl/dialects/experimental/air.py
name = 'air.channel'
class-attribute
instance-attribute
¶
sym_name = prop_def(SymbolRefAttr)
class-attribute
instance-attribute
¶
size = prop_def(ArrayAttr)
class-attribute
instance-attribute
¶
assembly_format = '$sym_name $size attr-dict'
class-attribute
instance-attribute
¶
__init__(sym_name: SymbolRefAttr, size: ArrayAttr[IntegerAttr])
¶
ChannelGetOp
¶
Bases: IRDLOperation
Source code in xdsl/dialects/experimental/air.py
name = 'air.channel.get'
class-attribute
instance-attribute
¶
chan_name = attr_def(SymbolRefAttr)
class-attribute
instance-attribute
¶
async_dependencies = var_operand_def(AsyncTokenAttr())
class-attribute
instance-attribute
¶
indices = var_operand_def(AsyncTokenAttr())
class-attribute
instance-attribute
¶
dst = operand_def(MemRefType)
class-attribute
instance-attribute
¶
dst_offsets = var_operand_def(IndexType())
class-attribute
instance-attribute
¶
dst_sizes = var_operand_def(IndexType())
class-attribute
instance-attribute
¶
dst_strides = var_operand_def(IndexType())
class-attribute
instance-attribute
¶
async_token = result_def(AsyncTokenAttr())
class-attribute
instance-attribute
¶
irdl_options = (AttrSizedOperandSegments(),)
class-attribute
instance-attribute
¶
assembly_format = '(`async` `[` $async_dependencies^ `]`)? $chan_name `[` $indices `]` `(` $dst `[` $dst_offsets `]``[` $dst_sizes `]``[` $dst_strides `]` `)` attr-dict `:` `(` type($dst) `)`'
class-attribute
instance-attribute
¶
__init__(chan_name: SymbolRefAttr, async_dependencies: list[Operation | SSAValue], indices: list[Operation | SSAValue], dst: Operation | SSAValue, dst_offsets: list[Operation | SSAValue], dst_sizes: list[Operation | SSAValue], dst_strides: list[Operation | SSAValue])
¶
Source code in xdsl/dialects/experimental/air.py
ChannelPutOp
¶
Bases: IRDLOperation
Source code in xdsl/dialects/experimental/air.py
name = 'air.channel.put'
class-attribute
instance-attribute
¶
chan_name = attr_def(SymbolRefAttr)
class-attribute
instance-attribute
¶
async_dependencies = var_operand_def(AsyncTokenAttr())
class-attribute
instance-attribute
¶
indices = var_operand_def(IndexType())
class-attribute
instance-attribute
¶
src = operand_def(MemRefType)
class-attribute
instance-attribute
¶
src_offsets = var_operand_def(IndexType())
class-attribute
instance-attribute
¶
src_sizes = var_operand_def(IndexType())
class-attribute
instance-attribute
¶
src_strides = var_operand_def(IndexType())
class-attribute
instance-attribute
¶
async_token = result_def(AsyncTokenAttr())
class-attribute
instance-attribute
¶
irdl_options = (AttrSizedOperandSegments(),)
class-attribute
instance-attribute
¶
assembly_format = '(`async` `[` $async_dependencies^ `]`)? $chan_name `[` $indices `]` `(` $src `[` $src_offsets `]``[` $src_sizes `]``[` $src_strides `]` `)` attr-dict `:` `(` type($src) `)`'
class-attribute
instance-attribute
¶
__init__(chan_name: SymbolRefAttr, async_dependencies: list[Operation | SSAValue], indices: list[Operation | SSAValue], src: Operation | SSAValue, src_offsets: list[Operation | SSAValue], src_sizes: list[Operation | SSAValue], src_strides: list[Operation | SSAValue])
¶
Source code in xdsl/dialects/experimental/air.py
CustomOp
¶
Bases: IRDLOperation
Source code in xdsl/dialects/experimental/air.py
name = 'air.custom'
class-attribute
instance-attribute
¶
symbol = attr_def(SymbolRefAttr)
class-attribute
instance-attribute
¶
async_dependencies = var_operand_def(AsyncTokenAttr)
class-attribute
instance-attribute
¶
custom_operands = var_operand_def(Attribute)
class-attribute
instance-attribute
¶
async_token = result_def(AsyncTokenAttr)
class-attribute
instance-attribute
¶
irdl_options = (AttrSizedOperandSegments(as_property=True),)
class-attribute
instance-attribute
¶
__init__(symbol: SymbolRefAttr, async_dependencies: list[Operation | SSAValue], custom_operands: list[Operation | SSAValue])
¶
Source code in xdsl/dialects/experimental/air.py
DeallocOp
¶
Bases: IRDLOperation
Source code in xdsl/dialects/experimental/air.py
name = 'air.dealloc'
class-attribute
instance-attribute
¶
async_dependencies = var_operand_def(AsyncTokenAttr)
class-attribute
instance-attribute
¶
memref = operand_def(MemRefType)
class-attribute
instance-attribute
¶
async_token = result_def(AsyncTokenAttr)
class-attribute
instance-attribute
¶
__init__(async_dependencies: list[Operation | SSAValue], memref: Operation | SSAValue)
¶
DmaMemcpyNdOp
¶
Bases: IRDLOperation
Source code in xdsl/dialects/experimental/air.py
name = 'air.dma_memcpy_nd'
class-attribute
instance-attribute
¶
async_dependencies = var_operand_def(AsyncTokenAttr())
class-attribute
instance-attribute
¶
dst = operand_def(MemRefType)
class-attribute
instance-attribute
¶
dst_offsets = var_operand_def(IndexType())
class-attribute
instance-attribute
¶
dst_sizes = var_operand_def(IndexType())
class-attribute
instance-attribute
¶
dst_strides = var_operand_def(IndexType())
class-attribute
instance-attribute
¶
src = operand_def(MemRefType)
class-attribute
instance-attribute
¶
src_offsets = var_operand_def(IndexType())
class-attribute
instance-attribute
¶
src_sizes = var_operand_def(IndexType())
class-attribute
instance-attribute
¶
src_strides = var_operand_def(IndexType())
class-attribute
instance-attribute
¶
async_token = result_def(AsyncTokenAttr())
class-attribute
instance-attribute
¶
irdl_options = (AttrSizedOperandSegments(as_property=True), ParsePropInAttrDict())
class-attribute
instance-attribute
¶
assembly_format = '(`async` $async_dependencies^)? `(` $dst `[` $dst_offsets `]``[` $dst_sizes `]``[` $dst_strides `]` `,` $src `[` $src_offsets `]``[` $src_sizes `]``[` $src_strides `]` `)` attr-dict `:` `(` type($dst) `,` type($src) `)`'
class-attribute
instance-attribute
¶
__init__(async_dependencies: list[Operation | SSAValue] | None, dst: Operation | SSAValue, dst_offsets: list[Operation | SSAValue], dst_sizes: list[Operation | SSAValue], dst_strides: list[Operation | SSAValue], src: Operation | SSAValue, src_offsets: list[Operation | SSAValue], src_sizes: list[Operation | SSAValue], src_strides: list[Operation | SSAValue])
¶
Source code in xdsl/dialects/experimental/air.py
ExecuteOp
¶
Bases: IRDLOperation
Source code in xdsl/dialects/experimental/air.py
name = 'air.execute'
class-attribute
instance-attribute
¶
async_dependencies = var_operand_def(AsyncTokenAttr)
class-attribute
instance-attribute
¶
async_token = result_def(AsyncTokenAttr)
class-attribute
instance-attribute
¶
results_ = var_result_def(Attribute)
class-attribute
instance-attribute
¶
body = region_def()
class-attribute
instance-attribute
¶
traits = lazy_traits_def(lambda: (SingleBlockImplicitTerminator(ExecuteTerminatorOp),))
class-attribute
instance-attribute
¶
__init__(async_dependencies: list[SSAValue] | None, result_types: list[Attribute] | None, body: Region)
¶
Source code in xdsl/dialects/experimental/air.py
parse(parser: Parser) -> ExecuteOp
classmethod
¶
Source code in xdsl/dialects/experimental/air.py
ExecuteTerminatorOp
¶
Bases: IRDLOperation
Source code in xdsl/dialects/experimental/air.py
name = 'air.execute_terminator'
class-attribute
instance-attribute
¶
results_op = var_operand_def()
class-attribute
instance-attribute
¶
traits = traits_def(HasParent(ExecuteOp), IsTerminator())
class-attribute
instance-attribute
¶
__init__(results_op: list[Operation | SSAValue])
¶
parse(parser: Parser) -> ExecuteTerminatorOp
classmethod
¶
Source code in xdsl/dialects/experimental/air.py
HerdTerminatorOp
dataclass
¶
Bases: IRDLOperation
Source code in xdsl/dialects/experimental/air.py
HerdOp
¶
Bases: IRDLOperation
Source code in xdsl/dialects/experimental/air.py
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 | |
name = 'air.herd'
class-attribute
instance-attribute
¶
sym_name = opt_prop_def(StringAttr)
class-attribute
instance-attribute
¶
async_dependencies = var_operand_def(AsyncTokenAttr())
class-attribute
instance-attribute
¶
sizes = var_operand_def(IndexType())
class-attribute
instance-attribute
¶
herd_operands = var_operand_def()
class-attribute
instance-attribute
¶
async_token = opt_result_def(AsyncTokenAttr)
class-attribute
instance-attribute
¶
region = opt_region_def()
class-attribute
instance-attribute
¶
traits = traits_def(IsolatedFromAbove(), SingleBlockImplicitTerminator(HerdTerminatorOp))
class-attribute
instance-attribute
¶
irdl_options = (AttrSizedOperandSegments(as_property=True),)
class-attribute
instance-attribute
¶
__init__(sym_name: StringAttr | None, async_dependencies: list[SSAValue] | None, sizes: list[Operation | SSAValue], herd_operands: list[Operation | SSAValue] | None, region: Region | None)
¶
Source code in xdsl/dialects/experimental/air.py
print(printer: Printer)
¶
Source code in xdsl/dialects/experimental/air.py
parse(parser: Parser) -> HerdOp
classmethod
¶
Source code in xdsl/dialects/experimental/air.py
LaunchTerminatorOp
dataclass
¶
Bases: IRDLOperation
Source code in xdsl/dialects/experimental/air.py
LaunchOp
¶
Bases: IRDLOperation
Source code in xdsl/dialects/experimental/air.py
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 | |
name = 'air.launch'
class-attribute
instance-attribute
¶
sym_name = opt_prop_def(StringAttr)
class-attribute
instance-attribute
¶
async_dependencies = var_operand_def(AsyncTokenAttr())
class-attribute
instance-attribute
¶
sizes = var_operand_def(IndexType())
class-attribute
instance-attribute
¶
launch_operands = var_operand_def()
class-attribute
instance-attribute
¶
async_token = result_def(AsyncTokenAttr)
class-attribute
instance-attribute
¶
body = opt_region_def()
class-attribute
instance-attribute
¶
traits = traits_def(IsolatedFromAbove(), SingleBlockImplicitTerminator(LaunchTerminatorOp))
class-attribute
instance-attribute
¶
irdl_options = (AttrSizedOperandSegments(as_property=True),)
class-attribute
instance-attribute
¶
__init__(sym_name: StringAttr | None, async_dependencies: list[SSAValue] | None, sizes: list[Operation | SSAValue], launch_operands: list[Operation | SSAValue], body: Region | None)
¶
Source code in xdsl/dialects/experimental/air.py
parse(parser: Parser) -> LaunchOp
classmethod
¶
Source code in xdsl/dialects/experimental/air.py
HerdPipelineOp
¶
Bases: IRDLOperation
Source code in xdsl/dialects/experimental/air.py
name = 'air.pipeline'
class-attribute
instance-attribute
¶
body = opt_region_def()
class-attribute
instance-attribute
¶
traits = traits_def(HasParent(HerdOp))
class-attribute
instance-attribute
¶
__init__(body: Region | None)
¶
parse(parser: Parser) -> HerdPipelineOp
classmethod
¶
Source code in xdsl/dialects/experimental/air.py
PipelineGetOp
¶
Bases: IRDLOperation
Source code in xdsl/dialects/experimental/air.py
name = 'air.pipeline.get'
class-attribute
instance-attribute
¶
src0 = operand_def(Attribute)
class-attribute
instance-attribute
¶
src1 = operand_def(Attribute)
class-attribute
instance-attribute
¶
results = var_result_def(Attribute)
class-attribute
instance-attribute
¶
__init__(src0: Operation | SSAValue, src1: Operation | SSAValue, result_types: list[Attribute])
¶
PipelinePutOp
¶
Bases: IRDLOperation
Source code in xdsl/dialects/experimental/air.py
name = 'air.pipeline.put'
class-attribute
instance-attribute
¶
dst0 = operand_def(Attribute)
class-attribute
instance-attribute
¶
dst1 = operand_def(Attribute)
class-attribute
instance-attribute
¶
opers = var_operand_def(Attribute)
class-attribute
instance-attribute
¶
__init__(dst0: Operation | SSAValue, dst1: Operation | SSAValue, opers: list[Operation | SSAValue])
¶
PipelineStageOp
¶
Bases: IRDLOperation
Source code in xdsl/dialects/experimental/air.py
name = 'air.pipeline.stage'
class-attribute
instance-attribute
¶
opers = var_operand_def(Attribute)
class-attribute
instance-attribute
¶
result = var_result_def()
class-attribute
instance-attribute
¶
body = opt_region_def()
class-attribute
instance-attribute
¶
traits = traits_def(HasParent(HerdPipelineOp))
class-attribute
instance-attribute
¶
__init__(opers: list[Operation | SSAValue], result_types: Sequence[Attribute], body: Region | None)
¶
Source code in xdsl/dialects/experimental/air.py
parse(parser: Parser) -> PipelineStageOp
classmethod
¶
Source code in xdsl/dialects/experimental/air.py
PipelineTerminatorOp
dataclass
¶
Bases: AbstractYieldOperation[Attribute]
Source code in xdsl/dialects/experimental/air.py
PipelineYieldOp
dataclass
¶
Bases: AbstractYieldOperation[Attribute]
Source code in xdsl/dialects/experimental/air.py
SegmentTerminatorOp
dataclass
¶
Bases: IRDLOperation
Source code in xdsl/dialects/experimental/air.py
SegmentOp
¶
Bases: IRDLOperation
Source code in xdsl/dialects/experimental/air.py
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 | |
name = 'air.segment'
class-attribute
instance-attribute
¶
sym_name = opt_prop_def(StringAttr)
class-attribute
instance-attribute
¶
async_dependencies = var_operand_def(AsyncTokenAttr())
class-attribute
instance-attribute
¶
sizes = var_operand_def(IndexType())
class-attribute
instance-attribute
¶
segment_operands = var_operand_def()
class-attribute
instance-attribute
¶
async_token = result_def(AsyncTokenAttr)
class-attribute
instance-attribute
¶
body = opt_region_def()
class-attribute
instance-attribute
¶
traits = traits_def(IsolatedFromAbove(), SingleBlockImplicitTerminator(SegmentTerminatorOp))
class-attribute
instance-attribute
¶
irdl_options = (AttrSizedOperandSegments(as_property=True),)
class-attribute
instance-attribute
¶
__init__(sym_name: StringAttr | None, async_dependencies: list[Operation | SSAValue], sizes: list[Operation | SSAValue], segment_operands: list[Operation | SSAValue], body: Region | None)
¶
Source code in xdsl/dialects/experimental/air.py
parse(parser: Parser) -> SegmentOp
classmethod
¶
Source code in xdsl/dialects/experimental/air.py
WaitAllOp
¶
Bases: IRDLOperation