Skip to content

Commit

Permalink
Fully open-source AIE flow (#1900)
Browse files Browse the repository at this point in the history
Co-authored-by: Ronan Keryell <[email protected]>
  • Loading branch information
jgmelber and keryell authored Nov 1, 2024
1 parent 8bc3712 commit d0d2277
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@
[submodule "third_party/bootgen"]
path = third_party/bootgen
url = https://github.com/Xilinx/bootgen.git
[submodule "third_party/aie_api"]
path = third_party/aie_api
url = https://github.com/jgmelber/aie_api
4 changes: 3 additions & 1 deletion programming_examples/makefile-common
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ AIETOOLS_DIR ?= $(shell realpath $(dir $(shell which xchesscc))/../)
AIE_INCLUDE_DIR ?= ${AIETOOLS_DIR}/data/versal_prod/lib
AIE2_INCLUDE_DIR ?= ${AIETOOLS_DIR}/data/aie_ml/lib

AIEOPT_DIR ?= $(shell realpath $(dir $(shell which aie-opt))/..)

WARNING_FLAGS = -Wno-parentheses -Wno-attributes -Wno-macro-redefined

CHESSCC1_FLAGS = -f -p me -P ${AIE_INCLUDE_DIR} -I ${AIETOOLS_DIR}/include
Expand All @@ -11,7 +13,7 @@ CHESS_FLAGS = -P ${AIE_INCLUDE_DIR}

CHESSCCWRAP1_FLAGS = aie -I ${AIETOOLS_DIR}/include
CHESSCCWRAP2_FLAGS = aie2 -I ${AIETOOLS_DIR}/include
PEANOWRAP2_FLAGS = -O2 -v -std=c++20 --target=aie2-none-unknown-elf ${WARNING_FLAGS} -DNDEBUG -I ${AIETOOLS_DIR}/include
PEANOWRAP2_FLAGS = -O2 -v -std=c++20 --target=aie2-none-unknown-elf ${WARNING_FLAGS} -DNDEBUG -I ${AIEOPT_DIR}/include

TEST_POWERSHELL := $(shell command -v powershell.exe >/dev/null 2>&1 && echo yes || echo no)
ifeq ($(TEST_POWERSHELL),yes)
Expand Down
7 changes: 7 additions & 0 deletions runtime_lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,10 @@ target_compile_definitions(xaienginecdo_static PRIVATE -D__AIECDO__ -D__AIEDEBUG
install(TARGETS xaienginecdo_static DESTINATION lib EXPORT xaienginecdo_static)
install(EXPORT xaienginecdo_static DESTINATION lib/cmake/aie)

include("aie_api/aieapi.cmake")
set(AIEAPI_SOURCE_DIR "../third_party/aie_api/include/aie_api")
add_aie_api_headers(${AIEAPI_SOURCE_DIR}
${AIE_BINARY_DIR}/include
${CMAKE_INSTALL_PREFIX}/include
)

13 changes: 13 additions & 0 deletions runtime_lib/aie_api/aieapi.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

function(add_aie_api_headers SRCPATH BUILDPATH INSTALLPATH)
message("Installing aie_api includes from ${SRCPATH} in ${BUILDPATH}")

# copy header files into build area
install(DIRECTORY ${SRCPATH}/ DESTINATION ${BUILDPATH}/aie_api)

message("Installing aie_api includes from ${SRCPATH} in ${INSTALLPATH}")

# install area too
install(DIRECTORY ${SRCPATH}/ DESTINATION ${INSTALLPATH}/aie_api)

endfunction()
1 change: 1 addition & 0 deletions third_party/aie_api
Submodule aie_api added at ced5f0

0 comments on commit d0d2277

Please sign in to comment.