Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
85914800
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
85914800
编写于
11月 29, 2022
作者:
H
hong
提交者:
GitHub
11月 29, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix ninja compile error (#48435)
* fix lite rocksdb ninja compile error * remove useless code * fix bug
上级
8d9fdd8b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
35 addition
and
34 deletion
+35
-34
cmake/external/lite.cmake
cmake/external/lite.cmake
+32
-30
cmake/external/rocksdb.cmake
cmake/external/rocksdb.cmake
+3
-4
未找到文件。
cmake/external/lite.cmake
浏览文件 @
85914800
...
...
@@ -35,6 +35,21 @@ if(LITE_WITH_XPU)
endif
()
endif
()
if
(
WITH_ARM
)
if
(
LITE_WITH_XPU
)
set
(
LITE_OUTPUT_BIN_DIR inference_lite_lib.armlinux.armv8.xpu
)
elseif
(
LITE_WITH_NNADAPTER
)
message
(
"Enable LITE_WITH_NNADAPTER"
)
if
(
NNADAPTER_WITH_HUAWEI_ASCEND_NPU
)
set
(
LITE_OUTPUT_BIN_DIR inference_lite_lib.armlinux.armv8.nnadapter
)
endif
()
else
()
set
(
LITE_OUTPUT_BIN_DIR inference_lite_lib.armlinux.armv8
)
endif
()
else
()
set
(
LITE_OUTPUT_BIN_DIR inference_lite_lib
)
endif
()
if
(
LITE_WITH_NNADAPTER
)
add_definitions
(
-DLITE_SUBGRAPH_WITH_NNADAPTER
)
if
(
NNADAPTER_WITH_HUAWEI_ASCEND_NPU
)
...
...
@@ -50,6 +65,12 @@ if(NOT LITE_SOURCE_DIR OR NOT LITE_BINARY_DIR)
set
(
LITE_PROJECT extern_lite
)
set
(
LITE_PREFIX_DIR
${
THIRD_PARTY_PATH
}
/lite
)
set
(
LITE_INSTALL_DIR
${
THIRD_PARTY_PATH
}
/install/lite
)
set
(
LITE_BINARY_DIR
${
LITE_PREFIX_DIR
}
/src/extern_lite-build
)
set
(
LITE_SOURCE_DIR
${
LITE_PREFIX_DIR
}
/src/extern_lite
)
set
(
LITE_SHARED_LIB
${
LITE_BINARY_DIR
}
/
${
LITE_OUTPUT_BIN_DIR
}
/cxx/lib/libpaddle_full_api_shared.so
)
if
(
NOT LITE_GIT_TAG
)
set
(
LITE_GIT_TAG 81ef66554099800c143a0feff6e0a491b3b0d12e
)
...
...
@@ -61,7 +82,8 @@ if(NOT LITE_SOURCE_DIR OR NOT LITE_BINARY_DIR)
# No quotes, so cmake can resolve it as a command with arguments.
if
(
WITH_ARM
)
set
(
LITE_BUILD_COMMAND $
(
MAKE
)
publish_inference -j
)
set
(
LITE_BUILD_COMMAND
${
CMAKE_COMMAND
}
--build . --target
publish_inference -j
)
message
(
WARNING
"BUILD_COMMAND:
${
LITE_BUILD_COMMAND
}
"
)
set
(
LITE_OPTIONAL_ARGS
-DWITH_MKL=OFF
...
...
@@ -110,9 +132,11 @@ if(NOT LITE_SOURCE_DIR OR NOT LITE_BINARY_DIR)
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-DCMAKE_BUILD_TYPE=
${
THIRD_PARTY_BUILD_TYPE
}
${
EXTERNAL_OPTIONAL_ARGS
}
${
LITE_OPTIONAL_ARGS
}
)
${
LITE_OPTIONAL_ARGS
}
BUILD_BYPRODUCTS
${
LITE_SHARED_LIB
}
)
else
()
set
(
LITE_BUILD_COMMAND $
(
MAKE
)
publish_inference -j
)
set
(
LITE_BUILD_COMMAND
${
CMAKE_COMMAND
}
--build . --target
publish_inference -j
)
set
(
LITE_OPTIONAL_ARGS
-DWITH_MKL=ON
-DLITE_WITH_CUDA=OFF
...
...
@@ -157,28 +181,9 @@ if(NOT LITE_SOURCE_DIR OR NOT LITE_BINARY_DIR)
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-DCMAKE_BUILD_TYPE=
${
THIRD_PARTY_BUILD_TYPE
}
${
EXTERNAL_OPTIONAL_ARGS
}
${
LITE_OPTIONAL_ARGS
}
)
${
LITE_OPTIONAL_ARGS
}
BUILD_BYPRODUCTS
${
LITE_SHARED_LIB
}
)
endif
()
ExternalProject_Get_Property
(
${
LITE_PROJECT
}
BINARY_DIR
)
ExternalProject_Get_Property
(
${
LITE_PROJECT
}
SOURCE_DIR
)
set
(
LITE_BINARY_DIR
${
BINARY_DIR
}
)
set
(
LITE_SOURCE_DIR
${
SOURCE_DIR
}
)
endif
()
if
(
WITH_ARM
)
if
(
LITE_WITH_XPU
)
set
(
LITE_OUTPUT_BIN_DIR inference_lite_lib.armlinux.armv8.xpu
)
elseif
(
LITE_WITH_NNADAPTER
)
message
(
"Enable LITE_WITH_NNADAPTER"
)
if
(
NNADAPTER_WITH_HUAWEI_ASCEND_NPU
)
set
(
LITE_OUTPUT_BIN_DIR inference_lite_lib.armlinux.armv8.nnadapter
)
endif
()
else
()
set
(
LITE_OUTPUT_BIN_DIR inference_lite_lib.armlinux.armv8
)
endif
()
else
()
set
(
LITE_OUTPUT_BIN_DIR inference_lite_lib
)
endif
()
message
(
STATUS
"Paddle-lite BINARY_DIR:
${
LITE_BINARY_DIR
}
"
)
...
...
@@ -199,12 +204,9 @@ function(external_lite_libs alias path)
endfunction
()
external_lite_libs
(
lite_full_s
tatic
lite_full_s
hared
${
LITE_BINARY_DIR
}
/
${
LITE_OUTPUT_BIN_DIR
}
/cxx/lib/libpaddle_full_api_shared.so
)
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
...
...
@@ -214,13 +216,13 @@ if(LITE_WITH_NNADAPTER)
lite_nnadapter
${
LITE_BINARY_DIR
}
/
${
LITE_OUTPUT_BIN_DIR
}
/cxx/lib/libnnadapter.so
${
LITE_BINARY_DIR
}
/
${
LITE_OUTPUT_BIN_DIR
}
/cxx/lib/libhuawei_ascend_npu.so
)
set
(
LITE_DEPS lite_full_s
tatic
lite_nnadapter
)
set
(
LITE_DEPS lite_full_s
hared
lite_nnadapter
)
set
(
LITE_NNADAPTER_NPU_LIB
${
LITE_BINARY_DIR
}
/
${
LITE_OUTPUT_BIN_DIR
}
/cxx/lib/libhuawei_ascend_npu.so
)
endif
()
else
()
set
(
LITE_DEPS lite_full_s
tatic
)
set
(
LITE_DEPS lite_full_s
hared
)
endif
()
add_definitions
(
-DPADDLE_WITH_LITE
)
...
...
cmake/external/rocksdb.cmake
浏览文件 @
85914800
...
...
@@ -39,18 +39,17 @@ ExternalProject_Add(
-DWITH_GFLAGS=OFF
-DCMAKE_CXX_FLAGS=
${
ROCKSDB_CMAKE_CXX_FLAGS
}
-DCMAKE_C_FLAGS=
${
CMAKE_C_FLAGS
}
# BUILD_BYPRODUCTS ${ROCKSDB_PREFIX_DIR}/src/extern_rocksdb/librocksdb.a
INSTALL_COMMAND
mkdir -p
${
ROCKSDB_INSTALL_DIR
}
/lib/ && cp
${
ROCKSDB_PREFIX_DIR
}
/src/extern_rocksdb/librocksdb.a
${
ROCKSDB_LIBRARIES
}
&& cp -r
${
ROCKSDB_PREFIX_DIR
}
/src/extern_rocksdb/include
${
ROCKSDB_INSTALL_DIR
}
/
BUILD_IN_SOURCE 1
BYPRODUCTS
${
ROCKSDB_LIBRARIES
}
)
add_dependencies
(
extern_rocksdb snappy
)
BUILD_BYPRODUCTS
${
ROCKSDB_LIBRARIES
}
)
add_library
(
rocksdb STATIC IMPORTED GLOBAL
)
add_dependencies
(
extern_rocksdb snappy
)
set_property
(
TARGET rocksdb PROPERTY IMPORTED_LOCATION
${
ROCKSDB_LIBRARIES
}
)
add_dependencies
(
rocksdb extern_rocksdb
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录