From 642e3a0106673d75d7f3b0fce196211954a20b97 Mon Sep 17 00:00:00 2001 From: RedContritio Date: Mon, 5 Jun 2023 04:29:47 +0000 Subject: [PATCH] add submodule xbyak --- .gitmodules | 4 ++++ cmake/external/xbyak.cmake | 4 ++-- cmake/third_party.cmake | 2 +- third_party/xbyak | 1 + 4 files changed, 8 insertions(+), 3 deletions(-) create mode 160000 third_party/xbyak diff --git a/.gitmodules b/.gitmodules index 47d5504cb37ed..9128f9233f0b8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -66,6 +66,10 @@ path = third_party/cutlass url = https://github.com/NVIDIA/cutlass.git ignore = dirty +[submodule "third_party/xbyak"] + path = third_party/xbyak + url = https://github.com/herumi/xbyak.git + ignore = dirty [submodule "third_party/mkldnn"] path = third_party/mkldnn url = https://github.com/oneapi-src/oneDNN.git diff --git a/cmake/external/xbyak.cmake b/cmake/external/xbyak.cmake index 589056458c1f0..a146d53d606e9 100644 --- a/cmake/external/xbyak.cmake +++ b/cmake/external/xbyak.cmake @@ -20,6 +20,7 @@ set(XBYAK_INSTALL_ROOT ${THIRD_PARTY_PATH}/install/xbyak) set(XBYAK_INC_DIR ${XBYAK_INSTALL_ROOT}/include) set(XBYAK_REPOSITORY ${GIT_URL}/herumi/xbyak.git) set(XBYAK_TAG v5.81) # Dec 19, 2019 +set(SOURCE_DIR ${PADDLE_SOURCE_DIR}/third_party/xbyak) include_directories(${XBYAK_INC_DIR}) include_directories(${XBYAK_INC_DIR}/xbyak) @@ -33,8 +34,7 @@ add_definitions(-DXBYAK_NO_OP_NAMES) ExternalProject_Add( ${XBYAK_PROJECT} ${EXTERNAL_PROJECT_LOG_ARGS} ${SHALLOW_CLONE} - GIT_REPOSITORY ${XBYAK_REPOSITORY} - GIT_TAG ${XBYAK_TAG} + SOURCE_DIR ${SOURCE_DIR} DEPENDS "" PREFIX ${XBYAK_PREFIX_DIR} UPDATE_COMMAND "" diff --git a/cmake/third_party.cmake b/cmake/third_party.cmake index 8587d025dbb42..2187721269502 100755 --- a/cmake/third_party.cmake +++ b/cmake/third_party.cmake @@ -441,7 +441,7 @@ if(WITH_DISTRIBUTE endif() if(WITH_XBYAK) - include(external/xbyak) # download, build, install xbyak + include(external/xbyak) # prepare submodule xbyak list(APPEND third_party_deps extern_xbyak) endif() diff --git a/third_party/xbyak b/third_party/xbyak new file mode 160000 index 0000000000000..4ca0434b4e78c --- /dev/null +++ b/third_party/xbyak @@ -0,0 +1 @@ +Subproject commit 4ca0434b4e78c05e3f3e68bda70e8713668e87d3