Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete LogicalObjectFifoLink #786

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 0 additions & 36 deletions compiler/plugins/target/AMD-AIE/iree-amd-aie/IR/AMDAIEOps.td
Original file line number Diff line number Diff line change
Expand Up @@ -1003,42 +1003,6 @@ def AMDAIE_LogicalObjectFifoFromMemrefOp
let cppNamespace = "mlir::iree_compiler::AMDAIE";
}

def AMDAIE_LogicalObjectFifoLink
: AMDAIE_Op<"logicalobjectfifo.link", [AttrSizedOperandSegments]> {
let summary = "Link DMA operations operating on a logical objectFifo.";
let description = [{
The `amdaie.logicalobjectfifo.link` operation explicitly links the DMA
operations operating on a logical objectFifo. This operation mimics the
`aie.objectFifo.link` operation and is useful as an intermediary before
conversion to the AIE dialect.

Example:
```mlir
%1 = amdaie.logicalobjectfifo.from_memref %alloc, {%tile}
: memref<64x32xi32, 1> -> !amdaie.logicalobjectfifo<memref<64x32xi32, 1>>
%3 = amdaie.circular_dma_cpy_nd(%1[] [] [], %0[] [] [])
: (!amdaie.logicalobjectfifo<memref<32x64xi32, 1>>,
!amdaie.logicalobjectfifo<memref<32x1024xi32>>)
%4 = amdaie.circular_dma_cpy_nd(%2[] [] [],
%1[%c0, %c0, %c0] [%c8, %c32, %c8] [%c8, %c64, %c1])
: (!amdaie.logicalobjectfifo<memref<8x8x4x8xi32, 2>>,
!amdaie.logicalobjectfifo<memref<32x64xi32, 1>>)
amdaie.logicalobjectfifo.link[%3] -> [%4] ()
```
Here, two circular DMA operations operating on logical objectFifo `%1` are
linked explicitly through the `amdaie.logicalobjectfifo.link` operation.
}];

let arguments = (
ins Variadic<Index>:$ins,
Variadic<Index>:$outs
);

let assemblyFormat = [{
`[` ($ins^)? `]` `->` `[` ($outs^)? `]` `(` `)` attr-dict
}];
}

def AMDAIE_LogicalObjectFifoPlaceholderOp:
AMDAIE_Op<"logicalobjectfifo.placeholder", [
LogicalObjFifoOpInterface, Pure]> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,21 +207,6 @@ func.func @logicalobjectfifo_from_buffers() {

// -----

// CHECK-LABEL: func.func @logicalobjectfifo_link
// CHECK: %[[DMA0:.+]] = amdaie.circular_dma_cpy_nd
// CHECK: %[[DMA1:.+]] = amdaie.circular_dma_cpy_nd
// CHECK: amdaie.logicalobjectfifo.link
// CHECK-SAME: %[[DMA0]]
// CHECK-SAME: %[[DMA1]]
func.func @logicalobjectfifo_link(%arg0: !amdaie.logicalobjectfifo<memref<32x1024xi32>>, %arg1: !amdaie.logicalobjectfifo<memref<32x64xi32, 1>>, %arg2: !amdaie.logicalobjectfifo<memref<8x8x4x8xi32, 2>>) {
%0 = amdaie.circular_dma_cpy_nd(%arg1[] [] [], %arg0[] [] []) : (!amdaie.logicalobjectfifo<memref<32x64xi32, 1>>, !amdaie.logicalobjectfifo<memref<32x1024xi32>>)
%1 = amdaie.circular_dma_cpy_nd(%arg2[] [] [], %arg1[] [] []) : (!amdaie.logicalobjectfifo<memref<8x8x4x8xi32, 2>>, !amdaie.logicalobjectfifo<memref<32x64xi32, 1>>)
amdaie.logicalobjectfifo.link[%0] -> [%1] ()
return
}

// -----

// CHECK-LABEL: func.func @logicalobjectfifo_placeholder
// CHECK: %[[C0:.+]] = arith.constant 0 : index
// CHECK: %[[tile_0_0:.+]] = amdaie.tile(%[[C0]], %[[C0]])
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ iree_cc_library(
"AMDAIEControlCodeLoopUnroll.cpp"
"AMDAIEConvertCoreForallToFor.cpp"
"AMDAIECreateAIEWorkgroup.cpp"
"AMDAIECreateLogicalObjectFifoLink.cpp"
"AMDAIECreateReferenceToAllocation.cpp"
"AMDAIEDistributeCoresAndObjectFifos.cpp"
"AMDAIEDmaCSE.cpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,6 @@ void addAMDAIEObjectFifoLoweringPasses(OpPassManager &passManager) {
passManager.addPass(createCanonicalizerPass());
passManager.addPass(createAMDAIEDmaCSEPass());

// passManager.addPass(createAMDAIECreateLogicalObjectFifoLinkPass());
passManager.addPass(createAMDAIECanonicalizeDoublyStridedOpPass());
passManager.addPass(createCanonicalizerPass());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@ std::unique_ptr<Pass> createAMDAIEConvertCoreForallToForPass();
/// Pass to create a single AIE workgroup.
std::unique_ptr<Pass> createAMDAIECreateAIEWorkgroupPass();

/// Pass to create logical objectFifo link operations, explicitly linking inputs
/// and outputs.
std::unique_ptr<Pass> createAMDAIECreateLogicalObjectFifoLinkPass();

/// Pass to create references to allocations in L1 memory space.
std::unique_ptr<Pass> createAMDAIECreateReferenceToAllocationPass();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,6 @@ def AMDAIECreateAIEWorkgroup :
let constructor = "mlir::iree_compiler::AMDAIE::createAMDAIECreateAIEWorkgroupPass()";
}

def AMDAIECreateLogicalObjectFifoLink :
Pass<"iree-amdaie-create-logical-objectfifo-link", ""> {
let summary = "Create logical objectFifo link operations, explicitly linking inputs and outputs.";
let constructor = "mlir::iree_compiler::AMDAIE::createAMDAIECreateLogicalObjectFifoLinkPass()";
}

def AMDAIECreateReferenceToAllocation :
InterfacePass<"iree-amdaie-create-reference-to-allocation", "mlir::FunctionOpInterface"> {
let summary = "Create references to allocations in L1 memory space.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ iree_lit_test_suite(
"controlcode_loop_unrolling.mlir"
"convert_core_forall_to_for.mlir"
"create_aie_workgroup.mlir"
"create_logical_objectfifo_link.mlir"
"create_reference_to_allocation.mlir"
"disable_vectorization.mlir"
"distribute_cores_and_objectfifos.mlir"
Expand Down
Loading
Loading