set(LLVM_TARGET_DEFINITIONS SpatialToPim.td)
mlir_tablegen(SpatialToPim.hpp.inc -gen-rewriters "-I${ONNX_MLIR_SRC_ROOT}")
add_public_tablegen_target(SpatialToPimIncGen)

add_pim_library(OMSpatialToPim
  SpatialToPimPass.cpp
  Common.cpp

  EXCLUDE_FROM_OM_LIBS

  DEPENDS
  SpatialToPimIncGen

  LINK_LIBS PUBLIC
  MLIRTosaDialect
  OMCompilerOptions
  OMPimCommon
  SpatialOps
  PimOps

  ACCEL_INCLUDE_DIRS PRIVATE
  ${PIM_GENERATED_INCLUDE_DIRS}
)
