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, 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 = prop_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 = prop_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 = prop_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: Sequence[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
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 | |
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: Sequence[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
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 | |
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: Sequence[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
SegmentTerminatorOp
dataclass
¶
Bases: IRDLOperation
Source code in xdsl/dialects/experimental/air.py
SegmentOp
¶
Bases: IRDLOperation
Source code in xdsl/dialects/experimental/air.py
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 | |
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