Commit 38b7e10
[multi-gpu] Phase 1: namespace channel_type, add cross-rank attrs, doc plan
Step toward multi-GPU messaging support per docs/MultiGPUPlan.md. Pure IR/dialect
changes — no lowering yet.
## channel_type namespace rename (Option 1)
Existing channel_type values gain a `npu_` prefix to make backend scope explicit:
- `dma_stream` → `npu_dma_stream` (default)
- `dma_packet` → `npu_dma_packet`
- `cascade` → `npu_cascade`
- `mmio` → `npu_mmio`
Mechanical rename across 33 files (verifier, transform/conversion passes, all
.mlir tests, Python programming examples).
## New channel_type for GPU multi-rank messaging
- `gpu_symmetric_heap`: cross-rank channel through the symmetric heap runtime
(runtime_lib/airgpu/symmetric_heap.{h,cpp}). Verifier requires put/get sites
to be inside an `air.rank` scope.
## air.dma_memcpy_nd cross-rank addressing
- New optional integer attributes `src_rank` / `dst_rank` name a peer rank in
the enclosing `air.rank` scope.
- Verifier requires:
- an enclosing `air.rank` scope
- the peer-side memref's `memref.alloc` (when directly available) to carry
the `air.symmetric` attribute
- Backward-compatible builder so existing call sites compile unchanged.
## air.symmetric memref attribute
A unit attribute on `memref.alloc` indicating the allocation is backed by the
symmetric heap. Documented in docs/AIRComputeModel.md §2.7.
## Documentation
- New docs/MultiGPUPlan.md: full design and 7-phase implementation plan
- docs/AIRComputeModel.md: §2.4 cross-rank addressing, §2.7 air.symmetric,
§2.5 channel_type table updated, §5 summary table updated
## Tests
- mlir/test/Dialect/AIR/air_cross_rank_dma.mlir (new): positive round-trip
for src_rank/dst_rank, air.symmetric memref, gpu_symmetric_heap channel
put/get inside air.rank
- mlir/test/Dialect/AIR/air_channel_invalid.mlir: gpu_symmetric_heap
put/get outside air.rank rejected; updated unsupported channel_type
error message
- mlir/test/Dialect/AIR/air_memcpy_invalid.mlir: src_rank/dst_rank
outside air.rank rejected; missing air.symmetric on alloc rejected
All 21 mlir/test/Dialect/AIR/ tests pass; GPU dma_copy and 4k_4k_mul e2e
tests pass on MI300A.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent f9e8a6e commit 38b7e10
45 files changed
Lines changed: 536 additions & 231 deletions
File tree
- docs
- mlir
- include/air/Dialect/AIR
- lib
- Conversion
- Dialect/AIR/IR
- Transform
- Util
- test
- Conversion
- AIRToAIE
- ConvertToAIR
- Dialect/AIR
- Transform
- AIRDependencyScheduleOpt
- AIRDmaToChannel
- AIRHerdPlacement
- AIRMiscPasses
- programming_examples
- cascade_reduction
- channel_examples
- channel_3d_segment_unroll
- dual_herd_packet_switch
- mmio
- flash_attention
- dataflow_based
- kernel_fusion_based
- herd_dataflow
- matrix_vector_multiplication/bf16_cascade
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
621 | 621 | | |
622 | 622 | | |
623 | 623 | | |
624 | | - | |
| 624 | + | |
625 | 625 | | |
626 | 626 | | |
627 | 627 | | |
| |||
670 | 670 | | |
671 | 671 | | |
672 | 672 | | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
673 | 689 | | |
674 | 690 | | |
675 | 691 | | |
676 | 692 | | |
677 | 693 | | |
678 | 694 | | |
679 | | - | |
| 695 | + | |
680 | 696 | | |
681 | 697 | | |
682 | 698 | | |
| |||
696 | 712 | | |
697 | 713 | | |
698 | 714 | | |
699 | | - | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
700 | 718 | | |
701 | 719 | | |
702 | 720 | | |
703 | | - | |
704 | | - | |
705 | | - | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
706 | 726 | | |
707 | 727 | | |
708 | 728 | | |
| |||
796 | 816 | | |
797 | 817 | | |
798 | 818 | | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
799 | 840 | | |
800 | 841 | | |
801 | 842 | | |
| |||
999 | 1040 | | |
1000 | 1041 | | |
1001 | 1042 | | |
1002 | | - | |
1003 | | - | |
1004 | | - | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
1005 | 1052 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
480 | | - | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
481 | 483 | | |
482 | 484 | | |
483 | 485 | | |
| |||
487 | 489 | | |
488 | 490 | | |
489 | 491 | | |
490 | | - | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
491 | 500 | | |
492 | 501 | | |
493 | 502 | | |
| |||
501 | 510 | | |
502 | 511 | | |
503 | 512 | | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
504 | 516 | | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
505 | 538 | | |
506 | 539 | | |
507 | 540 | | |
| |||
535 | 568 | | |
536 | 569 | | |
537 | 570 | | |
538 | | - | |
| 571 | + | |
539 | 572 | | |
540 | 573 | | |
541 | 574 | | |
542 | 575 | | |
543 | 576 | | |
544 | 577 | | |
545 | 578 | | |
546 | | - | |
| 579 | + | |
547 | 580 | | |
548 | 581 | | |
549 | 582 | | |
550 | | - | |
551 | | - | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
552 | 589 | | |
553 | | - | |
| 590 | + | |
554 | 591 | | |
555 | | - | |
| 592 | + | |
556 | 593 | | |
557 | | - | |
| 594 | + | |
558 | 595 | | |
559 | 596 | | |
560 | 597 | | |
| |||
565 | 602 | | |
566 | 603 | | |
567 | 604 | | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
568 | 613 | | |
569 | | - | |
| 614 | + | |
570 | 615 | | |
571 | 616 | | |
572 | 617 | | |
573 | 618 | | |
574 | 619 | | |
575 | | - | |
576 | | - | |
| 620 | + | |
| 621 | + | |
577 | 622 | | |
578 | | - | |
579 | | - | |
| 623 | + | |
| 624 | + | |
580 | 625 | | |
581 | | - | |
| 626 | + | |
582 | 627 | | |
583 | | - | |
| 628 | + | |
584 | 629 | | |
585 | | - | |
586 | | - | |
| 630 | + | |
| 631 | + | |
587 | 632 | | |
588 | | - | |
589 | | - | |
| 633 | + | |
| 634 | + | |
590 | 635 | | |
591 | 636 | | |
592 | | - | |
593 | | - | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
594 | 643 | | |
595 | 644 | | |
596 | 645 | | |
| |||
0 commit comments