add PIM accelerator

This commit is contained in:
NiccoloN
2026-02-24 15:09:18 +01:00
parent b24a0df8d7
commit a6e928bdd7
67 changed files with 9109 additions and 1 deletions

46
src/PIM/CMakeLists.txt Normal file
View File

@@ -0,0 +1,46 @@
set(PIM_ENABLED 1 BOOL PARENT_SCOPE)
set(PIM_SRC_ROOT "${CMAKE_CURRENT_SOURCE_DIR}")
set(PIM_BIN_ROOT "${CMAKE_CURRENT_BINARY_DIR}")
set(PIM_LIBRARY_PATH ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
set(PIM_RUNTIME_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
set(PIM_INCLUDE_PATH ${CMAKE_INCLUDE_OUTPUT_DIRECTORY})
set(PIM_ONNX_MLIR_SRC_ROOT ${ONNX_MLIR_SRC_ROOT})
set(PIM_ONNX_MLIR_BIN_ROOT ${ONNX_MLIR_BIN_ROOT})
add_subdirectory(Dialect)
add_subdirectory(Compiler)
add_subdirectory(Conversion)
add_subdirectory(Common)
add_onnx_mlir_library(OMPIMAccel
PimAccelerator.cpp
Transforms/PimBufferizationPass.cpp
Pass/MessagePass.cpp
Pass/CountInstructionPass.cpp
EXCLUDE_FROM_OM_LIBS
INCLUDE_DIRS PUBLIC
${ONNX_MLIR_SRC_ROOT}/include
${ONNX_MLIR_SRC_ROOT}
${PIM_ONNX_MLIR_SRC_ROOT}
${PIM_SRC_ROOT}
${PIM_BIN_ROOT}
${PIM_INCLUDE_PATH}
LINK_LIBS PUBLIC
onnx
OMAccelerator
OMPimCompilerUtils
OMCompilerUtils
OMONNXOps
SpatialOps
PimOps
OMONNXToSpatial
OMSpatialToGraphviz
OMSpatialToPIM
OMPIMCommon
)