-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add logical objFifo placeholder op for connection reuse (#709)
Adds the `amdaie.logicalobjectfifo.placeholder` operation that represents a logical objectFifo to be filled in later. This enables reuse of connections/circular DMAs/physical AIE channels for different data packets, which helps with (fused) operations with more than 2 inputs. This is especially useful for reading from/writing to DDR.
- Loading branch information
Showing
15 changed files
with
782 additions
and
327 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
compiler/plugins/target/AMD-AIE/iree-amd-aie/IR/AMDAIELogicalObjFifoOpInterface.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright 2024 The IREE Authors | ||
// | ||
// Licensed under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
#include "iree-amd-aie/IR/AMDAIELogicalObjFifoOpInterface.h" | ||
|
||
/// Include the definitions of the logical-objFifo-like interfaces. | ||
#include "iree-amd-aie/IR/AMDAIELogicalObjFifoOpInterface.cpp.inc" |
16 changes: 16 additions & 0 deletions
16
compiler/plugins/target/AMD-AIE/iree-amd-aie/IR/AMDAIELogicalObjFifoOpInterface.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright 2024 The IREE Authors | ||
// | ||
// Licensed under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
#ifndef IREE_COMPILER_AMDAIE_LOGICALOBJFIFOOPINTERFACE_H_ | ||
#define IREE_COMPILER_AMDAIE_LOGICALOBJFIFOOPINTERFACE_H_ | ||
|
||
#include "mlir/IR/OpImplementation.h" | ||
|
||
// clang-format off | ||
#include "iree-amd-aie/IR/AMDAIELogicalObjFifoOpInterface.h.inc" | ||
// clang-format on | ||
|
||
#endif // IREE_COMPILER_AMDAIE_LOGICALOBJFIFOOPINTERFACE_H_ |
37 changes: 37 additions & 0 deletions
37
compiler/plugins/target/AMD-AIE/iree-amd-aie/IR/AMDAIELogicalObjFifoOpInterface.td
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Copyright 2024 The IREE Authors | ||
// | ||
// Licensed under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
#ifndef IREE_AMDAIE_DIALECT_LOGICALOBJFIFOOPINTERFACE | ||
#define IREE_AMDAIE_DIALECT_LOGICALOBJFIFOOPINTERFACE | ||
|
||
include "mlir/IR/OpBase.td" | ||
include "mlir/Interfaces/CopyOpInterface.td" | ||
|
||
//===----------------------------------------------------------------------===// | ||
// Defines the interface for logical objectFifo operations. | ||
//===----------------------------------------------------------------------===// | ||
|
||
def LogicalObjFifoOpInterface : OpInterface<"LogicalObjFifoOpInterface"> { | ||
let description = [{ | ||
Interface for operations creating a logical objectFifo. | ||
}]; | ||
let cppNamespace = "mlir::iree_compiler::AMDAIE"; | ||
|
||
let methods = [ | ||
InterfaceMethod< | ||
/*desc=*/"Return the assigned tiles.", | ||
/*retTy=*/"::mlir::OperandRange", | ||
/*methodName=*/"getTiles", | ||
/*args=*/(ins), | ||
/*methodBody=*/"", | ||
/*defaultImplementation=*/[{ | ||
return $_op.getTiles(); | ||
}] | ||
> | ||
]; | ||
} | ||
|
||
#endif // IREE_AMDAIE_DIALECT_LOGICALOBJFIFOOPINTERFACE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.