diff --git a/include/aie-c/Translation.h b/include/aie-c/Translation.h index e8cf280ee5..37f075729a 100644 --- a/include/aie-c/Translation.h +++ b/include/aie-c/Translation.h @@ -44,18 +44,17 @@ MLIR_CAPI_EXPORTED MlirLogicalResult aieTranslateToCtrlpkt( MLIR_CAPI_EXPORTED MlirOperation aieTranslateBinaryToTxn(MlirContext ctx, MlirStringRef binary); -struct AieRtxControl { +struct AieRtControl { void *ptr; }; -using AieRtxControl = struct AieRtxControl; - -MLIR_CAPI_EXPORTED AieRtxControl getAieRtxControl(AieTargetModel tm); -MLIR_CAPI_EXPORTED void freeAieRtxControl(AieRtxControl aieCtl); -MLIR_CAPI_EXPORTED void aieRtxStartTransaction(AieRtxControl aieCtl); -MLIR_CAPI_EXPORTED void aieRtxDmaUpdateBdAddr(AieRtxControl aieCtl, int col, - int row, size_t addr, - size_t bdId); -MLIR_CAPI_EXPORTED void aieRtxExportSerializedTransaction(AieRtxControl aieCtl); +using AieRtControl = struct AieRtControl; + +MLIR_CAPI_EXPORTED AieRtControl getAieRtControl(AieTargetModel tm); +MLIR_CAPI_EXPORTED void freeAieRtControl(AieRtControl aieCtl); +MLIR_CAPI_EXPORTED void aieRtStartTransaction(AieRtControl aieCtl); +MLIR_CAPI_EXPORTED void aieRtDmaUpdateBdAddr(AieRtControl aieCtl, int col, + int row, size_t addr, size_t bdId); +MLIR_CAPI_EXPORTED void aieRtExportSerializedTransaction(AieRtControl aieCtl); #ifdef __cplusplus } diff --git a/include/aie/Targets/AIERTX.h b/include/aie/Targets/AIERT.h similarity index 95% rename from include/aie/Targets/AIERTX.h rename to include/aie/Targets/AIERT.h index 98dd07ffb5..48950401ba 100644 --- a/include/aie/Targets/AIERTX.h +++ b/include/aie/Targets/AIERT.h @@ -1,4 +1,4 @@ -//===- AIERTX.h -------------------------------------------------*- C++ -*-===// +//===- AIERT.h --------------------------------------------------*- C++ -*-===// // // This file is licensed under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -8,8 +8,8 @@ // //===----------------------------------------------------------------------===// -#ifndef AIE_AIERTX_H -#define AIE_AIERTX_H +#ifndef AIE_AIERT_H +#define AIE_AIERT_H #include "aie/Dialect/AIE/IR/AIEDialect.h" #include "aie/Dialect/AIE/IR/AIEEnums.h" @@ -112,7 +112,7 @@ llvm::raw_ostream &operator<<(llvm::raw_ostream &os, const XAie_Lock &lock); llvm::raw_ostream &operator<<(llvm::raw_ostream &os, const XAie_Packet &packet); -#define SHOW_AIERTX_ARGS(os, ...) showAIEXRTArgs(os, #__VA_ARGS__, __VA_ARGS__) +#define SHOW_AIERT_ARGS(os, ...) showAIEXRTArgs(os, #__VA_ARGS__, __VA_ARGS__) // So that we can use the pattern if(auto r = TRY_XAIE_API...) { // r is nonzero // } @@ -121,7 +121,7 @@ static_assert(XAIE_OK == 0); #define TRY_XAIE_API_FATAL_ERROR(API, ...) \ do { \ LLVM_DEBUG(llvm::dbgs() << "trying XAIE API: " << #API << " with args: "); \ - LLVM_DEBUG(SHOW_AIERTX_ARGS(llvm::dbgs(), __VA_ARGS__)); \ + LLVM_DEBUG(SHOW_AIERT_ARGS(llvm::dbgs(), __VA_ARGS__)); \ LLVM_DEBUG(llvm::dbgs() << "\n"); \ if (auto r = API(__VA_ARGS__)) \ llvm::report_fatal_error(llvm::Twine(#API " failed with ") + \ @@ -131,7 +131,7 @@ static_assert(XAIE_OK == 0); #define TRY_XAIE_API_EMIT_ERROR(OP, API, ...) \ do { \ LLVM_DEBUG(llvm::dbgs() << "trying XAIE API: " << #API << " with args: "); \ - LLVM_DEBUG(SHOW_AIERTX_ARGS(llvm::dbgs(), __VA_ARGS__)); \ + LLVM_DEBUG(SHOW_AIERT_ARGS(llvm::dbgs(), __VA_ARGS__)); \ LLVM_DEBUG(llvm::dbgs() << "\n"); \ if (auto r = API(__VA_ARGS__)) \ return OP.emitOpError() << #API " failed with " << AIERCTOSTR.at(r); \ @@ -140,7 +140,7 @@ static_assert(XAIE_OK == 0); #define TRY_XAIE_API_LOGICAL_RESULT(API, ...) \ do { \ LLVM_DEBUG(llvm::dbgs() << "trying XAIE API: " << #API << " with args: "); \ - LLVM_DEBUG(SHOW_AIERTX_ARGS(llvm::dbgs(), __VA_ARGS__)); \ + LLVM_DEBUG(SHOW_AIERT_ARGS(llvm::dbgs(), __VA_ARGS__)); \ LLVM_DEBUG(llvm::dbgs() << "\n"); \ if (auto r = API(__VA_ARGS__)) { \ llvm::errs() << #API " failed with " << AIERCTOSTR.at(r); \ @@ -186,12 +186,12 @@ static_assert(XAIE_OK == 0); #define BASE_ADDR_A_INCR 0x80000 namespace xilinx::AIE { -struct AIERTXControl { +struct AIERTControl { XAie_Config configPtr; XAie_DevInst devInst; const BaseNPUTargetModel &targetModel; - AIERTXControl(const xilinx::AIE::BaseNPUTargetModel &tm); + AIERTControl(const xilinx::AIE::BaseNPUTargetModel &tm); mlir::LogicalResult setIOBackend(bool aieSim, bool xaieDebug); mlir::LogicalResult configureBdInBlock(XAie_DmaDesc &dmaTileBd, @@ -223,4 +223,4 @@ struct AIERTXControl { } // namespace xilinx::AIE -#endif // AIE_AIERTX_H +#endif // AIE_AIERT_H diff --git a/lib/CAPI/Translation.cpp b/lib/CAPI/Translation.cpp index 8de5759088..264bebf478 100644 --- a/lib/CAPI/Translation.cpp +++ b/lib/CAPI/Translation.cpp @@ -11,7 +11,7 @@ #include "aie-c/Translation.h" #include "aie/Dialect/AIE/IR/AIETargetModel.h" -#include "aie/Targets/AIERTX.h" +#include "aie/Targets/AIERT.h" #include "aie/Targets/AIETargets.h" #include "mlir-c/IR.h" @@ -226,33 +226,33 @@ MlirStringRef aieLLVMLink(MlirStringRef *modules, int nModules) { return mlirStringRefCreate(cStr, ll.size()); } -DEFINE_C_API_PTR_METHODS(AieRtxControl, xilinx::AIE::AIERTXControl) +DEFINE_C_API_PTR_METHODS(AieRtControl, xilinx::AIE::AIERTControl) -AieRtxControl getAieRtxControl(AieTargetModel tm) { +AieRtControl getAieRtControl(AieTargetModel tm) { // unwrap the target model const BaseNPUTargetModel &targetModel = *reinterpret_cast(tm.d); - AIERTXControl *ctl = new AIERTXControl(targetModel); + AIERTControl *ctl = new AIERTControl(targetModel); return wrap(ctl); } -void freeAieRtxControl(AieRtxControl aieCtl) { - AIERTXControl *ctl = unwrap(aieCtl); +void freeAieRtControl(AieRtControl aieCtl) { + AIERTControl *ctl = unwrap(aieCtl); delete ctl; } -void aieRtxDmaUpdateBdAddr(AieRtxControl aieCtl, int col, int row, size_t addr, - size_t bdId) { - AIERTXControl *ctl = unwrap(aieCtl); +void aieRtDmaUpdateBdAddr(AieRtControl aieCtl, int col, int row, size_t addr, + size_t bdId) { + AIERTControl *ctl = unwrap(aieCtl); ctl->dmaUpdateBdAddr(col, row, addr, bdId); } -void aieRtxStartTransaction(AieRtxControl aieCtl) { - AIERTXControl *ctl = unwrap(aieCtl); +void aieRtStartTransaction(AieRtControl aieCtl) { + AIERTControl *ctl = unwrap(aieCtl); ctl->startTransaction(); } -void aieRtxExportSerializedTransaction(AieRtxControl aieCtl) { - AIERTXControl *ctl = unwrap(aieCtl); +void aieRtExportSerializedTransaction(AieRtControl aieCtl) { + AIERTControl *ctl = unwrap(aieCtl); ctl->exportSerializedTransaction(); } \ No newline at end of file diff --git a/lib/Targets/AIERTX.cpp b/lib/Targets/AIERT.cpp similarity index 92% rename from lib/Targets/AIERTX.cpp rename to lib/Targets/AIERT.cpp index e737131dd8..c0ec5290ad 100644 --- a/lib/Targets/AIERTX.cpp +++ b/lib/Targets/AIERT.cpp @@ -1,4 +1,4 @@ -//===- AIERTX.cpp -----------------------------------------------*- C++ -*-===// +//===- AIERT.cpp ------------------------------------------------*- C++ -*-===// // // This file is licensed under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -8,7 +8,7 @@ // //===----------------------------------------------------------------------===// -#include "aie/Targets/AIERTX.h" +#include "aie/Targets/AIERT.h" #include "mlir/Support/LogicalResult.h" @@ -29,7 +29,7 @@ extern "C" { using namespace mlir; -#define DEBUG_TYPE "aie-aiertx" +#define DEBUG_TYPE "aie-aiert" llvm::raw_ostream &operator<<(llvm::raw_ostream &os, const XAie_LocType &loc) { os << "XAie_LocType(col: " << std::to_string(loc.Col) @@ -52,7 +52,7 @@ llvm::raw_ostream &operator<<(llvm::raw_ostream &os, namespace xilinx::AIE { -AIERTXControl::AIERTXControl(const AIE::BaseNPUTargetModel &tm) +AIERTControl::AIERTControl(const AIE::BaseNPUTargetModel &tm) : targetModel(tm) { // The first column in the NPU lacks a shim tile. AIE-RT exposes some of // the internals about how this is modeled in a somewhat awkward way. @@ -98,7 +98,7 @@ AIERTXControl::AIERTXControl(const AIE::BaseNPUTargetModel &tm) TRY_XAIE_API_FATAL_ERROR(XAie_UpdateNpiAddr, &devInst, NPI_ADDR); } -LogicalResult AIERTXControl::setIOBackend(bool aieSim, bool xaieDebug) { +LogicalResult AIERTControl::setIOBackend(bool aieSim, bool xaieDebug) { // Quoting: The instance of a device must be always declared using this // macro. In the future, the same macro will be expanded to // allocate more memory from the user application for resource @@ -113,9 +113,9 @@ LogicalResult AIERTXControl::setIOBackend(bool aieSim, bool xaieDebug) { return success(); } -LogicalResult AIERTXControl::configureLocksInBdBlock(XAie_DmaDesc &dmaTileBd, - Block &block, - XAie_LocType &tileLoc) { +LogicalResult AIERTControl::configureLocksInBdBlock(XAie_DmaDesc &dmaTileBd, + Block &block, + XAie_LocType &tileLoc) { LLVM_DEBUG(llvm::dbgs() << "\nstart configuring bds\n"); std::optional acqValue, relValue, acqLockId, relLockId; bool acqEn = false; @@ -163,10 +163,10 @@ LogicalResult AIERTXControl::configureLocksInBdBlock(XAie_DmaDesc &dmaTileBd, return success(); } -LogicalResult AIERTXControl::configureBdInBlock(XAie_DmaDesc &dmaTileBd, - Block &block, - XAie_LocType &tileLoc, int bdId, - std::optional nextBdId) { +LogicalResult AIERTControl::configureBdInBlock(XAie_DmaDesc &dmaTileBd, + Block &block, + XAie_LocType &tileLoc, int bdId, + std::optional nextBdId) { std::optional packetType; std::optional packetID; @@ -309,9 +309,10 @@ LogicalResult AIERTXControl::configureBdInBlock(XAie_DmaDesc &dmaTileBd, return success(); }; -LogicalResult AIERTXControl::pushToBdQueueAndEnable( - Operation &op, XAie_LocType &tileLoc, int chNum, - const DMAChannelDir &channelDir, int bdId, int repeatCount) { +LogicalResult +AIERTControl::pushToBdQueueAndEnable(Operation &op, XAie_LocType &tileLoc, + int chNum, const DMAChannelDir &channelDir, + int bdId, int repeatCount) { XAie_DmaDirection direction = channelDir == DMAChannelDir::S2MM ? DMA_S2MM : DMA_MM2S; auto enTokenIssue = tileLoc.Row == 0 && direction == DMA_S2MM; @@ -325,8 +326,8 @@ LogicalResult AIERTXControl::pushToBdQueueAndEnable( return success(); }; -LogicalResult AIERTXControl::configureLocksAndBd(Block &block, - XAie_LocType tileLoc) { +LogicalResult AIERTControl::configureLocksAndBd(Block &block, + XAie_LocType tileLoc) { DMABDOp bd = *block.getOps().begin(); assert(bd.getBdId().has_value() && "DMABDOp must have assigned bd_id; did you forget to run " @@ -343,7 +344,7 @@ LogicalResult AIERTXControl::configureLocksAndBd(Block &block, return success(); } -LogicalResult AIERTXControl::initLocks(DeviceOp &targetOp) { +LogicalResult AIERTControl::initLocks(DeviceOp &targetOp) { for (auto tileOp : targetOp.getOps()) { auto tileLoc = XAie_TileLoc(tileOp.colIndex(), tileOp.rowIndex()); if (!tileOp.isShimTile() && tileOp.getCoreOp()) { @@ -372,7 +373,7 @@ LogicalResult AIERTXControl::initLocks(DeviceOp &targetOp) { return success(); } -LogicalResult AIERTXControl::configureSwitches(DeviceOp &targetOp) { +LogicalResult AIERTControl::configureSwitches(DeviceOp &targetOp) { // StreamSwitch (switchbox) configuration for (auto switchboxOp : targetOp.getOps()) { @@ -496,7 +497,7 @@ LogicalResult AIERTXControl::configureSwitches(DeviceOp &targetOp) { return success(); } -LogicalResult AIERTXControl::addInitConfig(DeviceOp &targetOp) { +LogicalResult AIERTControl::addInitConfig(DeviceOp &targetOp) { if (failed(initLocks(targetOp))) { return failure(); @@ -560,7 +561,7 @@ LogicalResult AIERTXControl::addInitConfig(DeviceOp &targetOp) { return success(); } -LogicalResult AIERTXControl::addCoreEnable(DeviceOp &targetOp) { +LogicalResult AIERTControl::addCoreEnable(DeviceOp &targetOp) { // Start execution of all the cores. for (auto tileOp : targetOp.getOps()) { auto tileLoc = XAie_TileLoc(tileOp.colIndex(), tileOp.rowIndex()); @@ -570,8 +571,8 @@ LogicalResult AIERTXControl::addCoreEnable(DeviceOp &targetOp) { return success(); } -LogicalResult AIERTXControl::addAieElf(uint8_t col, uint8_t row, - const StringRef elfPath, bool aieSim) { +LogicalResult AIERTControl::addAieElf(uint8_t col, uint8_t row, + const StringRef elfPath, bool aieSim) { TRY_XAIE_API_LOGICAL_RESULT(XAie_CoreDisable, &devInst, XAie_TileLoc(col, row)); TRY_XAIE_API_LOGICAL_RESULT(XAie_DmaChannelResetAll, &devInst, @@ -590,9 +591,9 @@ LogicalResult AIERTXControl::addAieElf(uint8_t col, uint8_t row, return success(); } -LogicalResult AIERTXControl::addAieElfs(DeviceOp &targetOp, - const StringRef workDirPath, - bool aieSim) { +LogicalResult AIERTControl::addAieElfs(DeviceOp &targetOp, + const StringRef workDirPath, + bool aieSim) { for (auto tileOp : targetOp.getOps()) if (tileOp.isShimNOCorPLTile()) { // Resets no needed with V2 kernel driver @@ -619,18 +620,17 @@ LogicalResult AIERTXControl::addAieElfs(DeviceOp &targetOp, return success(); } -void AIERTXControl::dmaUpdateBdAddr(int col, int row, size_t addr, - size_t bdId) { +void AIERTControl::dmaUpdateBdAddr(int col, int row, size_t addr, size_t bdId) { auto tileLoc = XAie_TileLoc(col, row); TRY_XAIE_API_FATAL_ERROR(XAie_DmaUpdateBdAddr, &devInst, tileLoc, addr, bdId); } -void AIERTXControl::startTransaction() { +void AIERTControl::startTransaction() { TRY_XAIE_API_FATAL_ERROR(XAie_StartTransaction, &devInst, XAIE_TRANSACTION_DISABLE_AUTO_FLUSH); } -void AIERTXControl::exportSerializedTransaction() { +void AIERTControl::exportSerializedTransaction() { XAie_TxnInst *txnInst = XAie_ExportTransactionInstance(&devInst); std::ios_base::fmtflags f(std::cout.flags()); for (size_t i = 0; i < txnInst->NumCmds; ++i) { diff --git a/lib/Targets/AIETargetCDODirect.cpp b/lib/Targets/AIETargetCDODirect.cpp index ec2d51a107..17e3bacd36 100644 --- a/lib/Targets/AIETargetCDODirect.cpp +++ b/lib/Targets/AIETargetCDODirect.cpp @@ -5,7 +5,7 @@ // //===----------------------------------------------------------------------===// -#include "aie/Targets/AIERTX.h" +#include "aie/Targets/AIERT.h" #include "aie/Targets/AIETargets.h" extern "C" { #include "cdo-driver/cdo_driver.h" @@ -73,7 +73,7 @@ generateCDOBinary(const StringRef outputPath, return success(); } -static LogicalResult generateCDOBinariesSeparately(AIERTXControl &ctl, +static LogicalResult generateCDOBinariesSeparately(AIERTControl &ctl, const StringRef workDirPath, DeviceOp &targetOp, bool aieSim, @@ -104,7 +104,7 @@ static LogicalResult generateCDOBinariesSeparately(AIERTXControl &ctl, return success(); } -static LogicalResult generateCDOUnified(AIERTXControl &ctl, +static LogicalResult generateCDOUnified(AIERTControl &ctl, const StringRef workDirPath, DeviceOp &targetOp, bool aieSim, bool enableCores) { @@ -141,7 +141,7 @@ translateToCDODirect(ModuleOp m, llvm::StringRef workDirPath, // shim dma on tile (0,0) are hard-coded assumptions about NPU... assert(targetModel.isNPU() && "Only NPU currently supported"); - AIERTXControl ctl(targetModel); + AIERTControl ctl(targetModel); if (failed(ctl.setIOBackend(aieSim, xaieDebug))) return failure(); initializeCDOGenerator(endianness, cdoDebug); @@ -319,9 +319,10 @@ parseTransactionBinary(const std::vector &data, return num_cols; } -static LogicalResult -generateTxn(AIERTXControl &ctl, const StringRef workDirPath, DeviceOp &targetOp, - bool aieSim, bool enableElfs, bool enableInit, bool enableCores) { +static LogicalResult generateTxn(AIERTControl &ctl, const StringRef workDirPath, + DeviceOp &targetOp, bool aieSim, + bool enableElfs, bool enableInit, + bool enableCores) { if (enableElfs && !targetOp.getOps().empty() && failed(ctl.addAieElfs(targetOp, workDirPath, aieSim))) return failure(); @@ -348,7 +349,7 @@ static LogicalResult translateToTxn(ModuleOp m, std::vector &output, if (!targetModel.isNPU()) return failure(); - AIERTXControl ctl(targetModel); + AIERTControl ctl(targetModel); if (failed(ctl.setIOBackend(aieSim, xaieDebug))) return failure(); diff --git a/lib/Targets/CMakeLists.txt b/lib/Targets/CMakeLists.txt index 29acfde613..3a1da83fc2 100644 --- a/lib/Targets/CMakeLists.txt +++ b/lib/Targets/CMakeLists.txt @@ -10,8 +10,8 @@ add_subdirectory(AIEVecToCpp) # for #include set(BOOTGEN_SOURCE_DIR ${PROJECT_SOURCE_DIR}/third_party/bootgen) -add_mlir_library(AIERTX - AIERTX.cpp +add_mlir_library(AIERT + AIERT.cpp PARTIAL_SOURCES_INTENDED ENABLE_AGGREGATION @@ -20,10 +20,10 @@ add_mlir_library(AIERTX ${CMAKE_CURRENT_SRC_DIR}/../../../include/aie/Targets ) -target_link_libraries(AIERTX PRIVATE xaienginecdo_static) -target_include_directories(AIERTX SYSTEM PRIVATE ${BOOTGEN_SOURCE_DIR}) -target_include_directories(obj.AIERTX SYSTEM PRIVATE ${BOOTGEN_SOURCE_DIR}) -add_dependencies(obj.AIERTX xaienginecdo_static xaienginecdo_static-headers) +target_link_libraries(AIERT PRIVATE xaienginecdo_static) +target_include_directories(AIERT SYSTEM PRIVATE ${BOOTGEN_SOURCE_DIR}) +target_include_directories(obj.AIERT SYSTEM PRIVATE ${BOOTGEN_SOURCE_DIR}) +add_dependencies(obj.AIERT xaienginecdo_static xaienginecdo_static-headers) add_mlir_library(AIETargets AIETargets.cpp @@ -59,7 +59,7 @@ add_mlir_library(AIETargets IPO LINK_LIBS PUBLIC - AIERTX + AIERT AIE AIEX AIEXUtils diff --git a/python/AIERTXModule.cpp b/python/AIERTModule.cpp similarity index 55% rename from python/AIERTXModule.cpp rename to python/AIERTModule.cpp index a1564dbebe..0f627a6ad4 100644 --- a/python/AIERTXModule.cpp +++ b/python/AIERTModule.cpp @@ -1,4 +1,4 @@ -//===- AIERTXModule.cpp -----------------------------------------*- C++ -*-===// +//===- AIERTModule.cpp -----------------------------------------*- C++ -*-===// // // This file is licensed under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -21,31 +21,30 @@ namespace py = pybind11; using namespace py::literals; -class PyAIERTXControl { +class PyAIERTControl { public: - PyAIERTXControl(AieTargetModel targetModel) - : ctl(getAieRtxControl(targetModel)) {} + PyAIERTControl(AieTargetModel targetModel) + : ctl(getAieRtControl(targetModel)) {} - ~PyAIERTXControl() { freeAieRtxControl(ctl); } + ~PyAIERTControl() { freeAieRtControl(ctl); } - AieRtxControl ctl; + AieRtControl ctl; }; -PYBIND11_MODULE(_aiertx, m) { +PYBIND11_MODULE(_aiert, m) { - py::class_(m, "AIERTXControl", py::module_local()) + py::class_(m, "AIERTControl", py::module_local()) .def(py::init(), "target_model"_a) .def("start_transaction", - [](PyAIERTXControl &self) { aieRtxStartTransaction(self.ctl); }) + [](PyAIERTControl &self) { aieRtStartTransaction(self.ctl); }) .def("export_serialized_transaction", - [](PyAIERTXControl &self) { - aieRtxExportSerializedTransaction(self.ctl); + [](PyAIERTControl &self) { + aieRtExportSerializedTransaction(self.ctl); }) .def( "dma_update_bd_addr", - [](PyAIERTXControl &self, int col, int row, size_t addr, - size_t bdId) { - aieRtxDmaUpdateBdAddr(self.ctl, col, row, addr, bdId); + [](PyAIERTControl &self, int col, int row, size_t addr, size_t bdId) { + aieRtDmaUpdateBdAddr(self.ctl, col, row, addr, bdId); }, "col"_a, "row"_a, "addr"_a, "bd_id"_a); } diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 6d7280071d..0be594a828 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -103,10 +103,10 @@ if (AIE_ENABLE_XRT_PYTHON_BINDINGS) ) endif() -declare_mlir_python_sources(AIEPythonSources.AIERTX +declare_mlir_python_sources(AIEPythonSources.AIERT ADD_TO_PARENT AIEPythonSources SOURCES - aiertx.py + aiert.py ) ################################################################################ @@ -173,7 +173,7 @@ if (AIE_ENABLE_PYTHON_PASSES) list(APPEND _py_srcs ${CMAKE_CURRENT_SOURCE_DIR}/XRTModule.cpp) list(APPEND _py_libs xrt_coreutil uuid) endif() - list(APPEND _py_srcs ${CMAKE_CURRENT_SOURCE_DIR}/AIERTXModule.cpp) + list(APPEND _py_srcs ${CMAKE_CURRENT_SOURCE_DIR}/AIERTModule.cpp) declare_mlir_python_extension(AIEPythonExtensions.MLIR MODULE_NAME _aie @@ -297,14 +297,14 @@ else () target_link_directories(AIEPythonExtensions.XRT INTERFACE ${XRT_LIB_DIR}) endif() - declare_mlir_python_extension(AIEPythonExtensions.AIERTX - MODULE_NAME _aiertx + declare_mlir_python_extension(AIEPythonExtensions.AIERT + MODULE_NAME _aiert ADD_TO_PARENT AIEPythonExtensions ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR} PARTIAL_SOURCES_INTENDED SOURCES - AIERTXModule.cpp + AIERTModule.cpp PRIVATE_LINK_LIBS LLVMSupport diff --git a/python/aiertx.py b/python/aiert.py similarity index 81% rename from python/aiertx.py rename to python/aiert.py index b7004ab941..8c5613ee98 100644 --- a/python/aiertx.py +++ b/python/aiert.py @@ -2,4 +2,4 @@ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # noinspection PyUnresolvedReferences -from ._mlir_libs._aiertx import * +from ._mlir_libs._aiert import * diff --git a/test/python/aiertx_bindings.py b/test/python/aiert_bindings.py similarity index 91% rename from test/python/aiertx_bindings.py rename to test/python/aiert_bindings.py index d38dc7ab20..1c4652ff20 100644 --- a/test/python/aiertx_bindings.py +++ b/test/python/aiert_bindings.py @@ -6,7 +6,7 @@ # RUN: %python %s | FileCheck %s -from aie.aiertx import AIERTXControl +from aie.aiert import AIERTControl from util import construct_and_print_module from aie.dialects.aiex import DDR_AIE_ADDR_OFFSET from aie.dialects.aie import AIEDevice, get_target_model @@ -16,7 +16,7 @@ @construct_and_print_module def simple(module): tm = get_target_model(AIEDevice.npu1_4col) - ctl = AIERTXControl(tm) + ctl = AIERTControl(tm) ctl.start_transaction() ctl.dma_update_bd_addr(0, 0, DDR_AIE_ADDR_OFFSET, 0) ctl.export_serialized_transaction()