Skip to content

Commit

Permalink
Merge pull request #2 from jiweibo/310_subgraph
Browse files Browse the repository at this point in the history
fix WITH_PYTHON=ON compile error
  • Loading branch information
JZZ-NOTE authored Sep 15, 2021
2 parents 8dad451 + b84070b commit d54f18a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 2 additions & 3 deletions cmake/external/lite.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,11 @@ external_lite_libs(lite_full_static ${LITE_BINARY_DIR}/${LITE_OUTPUT_BIN_DIR}/cx
set(LITE_SHARED_LIB ${LITE_BINARY_DIR}/${LITE_OUTPUT_BIN_DIR}/cxx/lib/libpaddle_full_api_shared.so)

if (LITE_WITH_NNADAPTER)
set(LITE_NNADAPTER_LIB ${LITE_BINARY_DIR}/${LITE_OUTPUT_BIN_DIR}/cxx/lib/libnnadapter.so)
if (NNADAPTER_WITH_NPU)
external_lite_libs(lite_nnadapter ${LITE_BINARY_DIR}/${LITE_OUTPUT_BIN_DIR}/cxx/lib/libnnadapter.so ${LITE_BINARY_DIR}/${LITE_OUTPUT_BIN_DIR}/cxx/lib/libnnadapter_driver_huawei_ascend_npu.so)
set(LITE_DEPS lite_full_static lite_nnadapter)
set(LITE_SHARED_LIB ${LITE_BINARY_DIR}/${LITE_OUTPUT_BIN_DIR}/cxx/lib/libpaddle_full_api_shared.so
${LITE_BINARY_DIR}/${LITE_OUTPUT_BIN_DIR}/cxx/lib/libnnadapter.so
${LITE_BINARY_DIR}/${LITE_OUTPUT_BIN_DIR}/cxx/lib/libnnadapter_driver_huawei_ascend_npu.so)
set(LITE_NNADAPTER_NPU_LIB ${LITE_BINARY_DIR}/${LITE_OUTPUT_BIN_DIR}/cxx/lib/libnnadapter_driver_huawei_ascend_npu.so)
endif()
else()
set(LITE_DEPS lite_full_static)
Expand Down
2 changes: 1 addition & 1 deletion paddle/scripts/paddle_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ function cmake_base() {
-DWITH_GLOO=${gloo_flag}
-DWITH_LITE=${WITH_LITE:-OFF}
-DWITH_XPU=${WITH_XPU:-OFF}
-DLITE_GIT_TAG=release/v2.8
-DLITE_GIT_TAG=_release/v2.10
-DWITH_UNITY_BUILD=${WITH_UNITY_BUILD:-OFF}
-DWITH_XPU_BKCL=${WITH_XPU_BKCL:-OFF}
-DWITH_ARM=${WITH_ARM:-OFF}
Expand Down
6 changes: 6 additions & 0 deletions python/setup.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,12 @@ else:
if '${WITH_LITE}' == 'ON':
shutil.copy('${LITE_SHARED_LIB}', libs_path)
package_data['paddle.libs']+=['libpaddle_full_api_shared' + ext_name]
if '${LITE_WITH_NNADAPTER}' == 'ON':
shutil.copy('${LITE_NNADAPTER_LIB}', libs_path)
package_data['paddle.libs']+=['libnnadapter' + ext_name]
if '${NNADAPTER_WITH_NPU}' == 'ON':
shutil.copy('${LITE_NNADAPTER_NPU_LIB}', libs_path)
package_data['paddle.libs']+=['libnnadapter_driver_huawei_ascend_npu' + ext_name]

if '${WITH_PSLIB}' == 'ON':
shutil.copy('${PSLIB_LIB}', libs_path)
Expand Down

0 comments on commit d54f18a

Please sign in to comment.