Skip to content

Commit

Permalink
[ARM] fix arm build failure with Ninja build, test=develop (#55548)
Browse files Browse the repository at this point in the history
  • Loading branch information
qili93 authored Jul 20, 2023
1 parent c308038 commit 4f307a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
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

0 comments on commit 4f307a7

Please sign in to comment.