Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ARM] fix arm build failure with Ninja build, test=develop #55548

Merged
merged 1 commit into from
Jul 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion cmake/external/openblas.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ if(NOT WIN32)
set(OPTIONAL_ARGS DYNAMIC_ARCH=1 NUM_THREADS=64)
endif()

if(WITH_ARM)
set(ARM_ARGS TARGET=ARMV8)
endif()
set(COMMON_ARGS CC=${OPENBLAS_CC} NO_SHARED=1 NO_LAPACK=1 libs)
ExternalProject_Add(
extern_openblas
Expand All @@ -90,7 +93,7 @@ if(NOT WIN32)
PREFIX ${CBLAS_PREFIX_DIR}
INSTALL_DIR ${CBLAS_INSTALL_DIR}
BUILD_IN_SOURCE 1
BUILD_COMMAND make -j${NPROC} ${COMMON_ARGS} ${OPTIONAL_ARGS}
BUILD_COMMAND make ${ARM_ARGS} -j${NPROC} ${COMMON_ARGS} ${OPTIONAL_ARGS}
INSTALL_COMMAND make install NO_SHARED=1 NO_LAPACK=1 PREFIX=<INSTALL_DIR>
UPDATE_COMMAND ""
CONFIGURE_COMMAND ""
Expand Down
6 changes: 2 additions & 4 deletions cmake/external/rocksdb.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,9 @@ set(CMAKE_CXX_LINK_EXECUTABLE
if(WITH_ARM)
file(TO_NATIVE_PATH ${PADDLE_SOURCE_DIR}/patches/rocksdb/libaio.h.patch
native_src)
# See: [Why calling some `git` commands before `patch`?]
set(ROCKSDB_PATCH_COMMAND
git checkout -- . && git checkout 6.19.fb && patch -Nd
${CMAKE_BINARY_DIR}/third_party/rocksdb/src/extern_rocksdb/env <
${native_src})
git checkout -- . && git checkout ${ROCKSDB_TAG} && patch -Nd
${PADDLE_SOURCE_DIR}/third_party/rocksdb/env/ < ${native_src})
endif()
ExternalProject_Add(
extern_rocksdb
Expand Down