Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
77f62c48
P
Paddle
项目概览
PaddlePaddle
/
Paddle
1 年多 前同步成功
通知
2302
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
77f62c48
编写于
6月 07, 2023
作者:
Z
Zhenghai Zhang
提交者:
GitHub
6月 07, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add arm_brpc,box_ps cache (#54400)
上级
2943aca7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
32 addition
and
18 deletion
+32
-18
cmake/external/arm_brpc.cmake
cmake/external/arm_brpc.cmake
+14
-11
cmake/external/box_ps.cmake
cmake/external/box_ps.cmake
+18
-7
未找到文件。
cmake/external/arm_brpc.cmake
浏览文件 @
77f62c48
# Copyright (c) 20
18
PaddlePaddle Authors. All Rights Reserved.
# Copyright (c) 20
23
PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
...
...
@@ -32,12 +32,15 @@ if((NOT DEFINED ARM_BRPC_NAME) OR (NOT DEFINED ARM_BRPC_URL))
set
(
ARM_BRPC_NAME
"arm_brpc"
CACHE STRING
""
FORCE
)
set
(
ARM_BRPC_URL
"https://paddlerec.bj.bcebos.com/online_infer/arm_brpc_ubuntu18/output.tar.gz"
CACHE STRING
""
FORCE
)
endif
()
message
(
STATUS
"ARM_BRPC_NAME:
${
ARM_BRPC_NAME
}
, ARM_BRPC_URL:
${
ARM_BRPC_URL
}
"
)
set
(
ARM_BRPC_PREFIX_DIR
"
${
THIRD_PARTY_PATH
}
/arm_brpc"
)
set
(
ARM_BRPC_PROJECT
"extern_arm_brpc"
)
set
(
ARM_BRPC_DOWNLOAD_DIR
"
${
ARM_BRPC_PREFIX_DIR
}
/src/
${
ARM_BRPC_PROJECT
}
"
)
set
(
ARM_BRPC_DOWNLOAD_DIR
"
${
PADDLE_SOURCE_DIR
}
/third_party/arm_brpc
"
)
set
(
ARM_BRPC_DST_DIR
"output"
)
set
(
ARM_BRPC_INSTALL_ROOT
"
${
THIRD_PARTY_PATH
}
/install"
)
set
(
ARM_BRPC_INSTALL_DIR
${
ARM_BRPC_INSTALL_ROOT
}
/arm_brpc/output
)
...
...
@@ -49,32 +52,32 @@ set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH}" "${ARM_BRPC_ROOT}/lib")
include_directories
(
${
ARM_BRPC_INSTALL_ROOT
}
/
${
ARM_BRPC_NAME
}
/output/include
)
file
(
DOWNLOAD
${
ARM_BRPC_URL
}
${
ARM_BRPC_DOWNLOAD_DIR
}
TLS_VERIFY OFF
STATUS ERR
)
file
(
WRITE
${
ARM_BRPC_DOWNLOAD_DIR
}
/CMakeLists.txt
"PROJECT(ARM_BRPC)
\n
"
"cmake_minimum_required(VERSION 3.0)
\n
"
"install(DIRECTORY
${
ARM_BRPC_DST_DIR
}
${
ARM_BRPC_DST_DIR
}
\n
"
" DESTINATION
${
ARM_BRPC_NAME
}
)
\n
"
)
set
(
ARM_BRPC_URL
"https://paddlerec.bj.bcebos.com/online_infer/arm_brpc_ubuntu18/output.tar.gz"
CACHE STRING
""
FORCE
)
ExternalProject_Add
(
${
ARM_BRPC_PROJECT
}
${
EXTERNAL_PROJECT_LOG_ARGS
}
PREFIX
${
ARM_BRPC_PREFIX_DIR
}
DOWNLOAD_DIR
${
ARM_BRPC_DOWNLOAD_DIR
}
DOWNLOAD_COMMAND rm -rf output.tar.gz && wget --no-check-certificate
${
ARM_BRPC_URL
}
&& tar zxvf output.tar.gz
#DOWNLOAD_COMMAND cp /home/wangbin44/Paddle/build/output.tar.gz .
# && tar zxvf output.tar.gz
DOWNLOAD_NO_PROGRESS 1
SOURCE_DIR
${
ARM_BRPC_INSTALL_DIR
}
UPDATE_COMMAND
""
COMMAND
${
CMAKE_COMMAND
}
-E copy
${
ARM_BRPC_DOWNLOAD_DIR
}
/CMakeLists.txt
${
ARM_BRPC_INSTALL_DIR
}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=
${
ARM_BRPC_INSTALL_ROOT
}
-DCMAKE_BUILD_TYPE=
${
THIRD_PARTY_BUILD_TYPE
}
CMAKE_CACHE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=
${
ARM_BRPC_INSTALL_ROOT
}
-DCMAKE_BUILD_TYPE=
${
THIRD_PARTY_BUILD_TYPE
}
BUILD_BYPRODUCTS
${
ARM_BRPC_LIB
}
)
add_library
(
arm_brpc STATIC IMPORTED GLOBAL
)
# 直接导入已经生成的库
add_library
(
arm_brpc STATIC IMPORTED GLOBAL
)
set_property
(
TARGET arm_brpc PROPERTY IMPORTED_LOCATION
${
ARM_BRPC_LIB
}
)
add_dependencies
(
arm_brpc
${
ARM_BRPC_PROJECT
}
)
cmake/external/box_ps.cmake
浏览文件 @
77f62c48
# Copyright (c) 20
19
PaddlePaddle Authors. All Rights Reserved.
# Copyright (c) 20
23
PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
...
...
@@ -23,13 +23,17 @@ if((NOT DEFINED BOX_PS_VER) OR (NOT DEFINED BOX_PS_URL))
set
(
BOX_PS_NAME
"box_ps"
CACHE STRING
""
FORCE
)
set
(
BOX_PS_DOWNLOAD_FILE
${
BOX_PS_NAME
}
.tar.gz
CACHE STRING
""
FORCE
)
set
(
BOX_PS_URL
"http://box-ps.gz.bcebos.com/
box_ps.tar.gz
"
"http://box-ps.gz.bcebos.com/
${
BOX_PS_DOWNLOAD_FILE
}
"
CACHE STRING
""
FORCE
)
endif
()
message
(
STATUS
"BOX_PS_NAME:
${
BOX_PS_NAME
}
, BOX_PS_URL:
${
BOX_PS_URL
}
"
)
set
(
BOX_PS_SOURCE_DIR
"
${
THIRD_PARTY_PATH
}
/box_ps"
)
set
(
BOX_PS_DOWNLOAD_DIR
"
${
BOX_PS_SOURCE_DIR
}
/src/
${
BOX_PS_PROJECT
}
"
)
set
(
BOX_PS_DOWNLOAD_DIR
"
${
PADDLE_SOURCE_DIR
}
/third_party/box_ps/
${
CMAKE_SYSTEM_NAME
}
"
)
set
(
BOX_PS_DST_DIR
"box_ps"
)
set
(
BOX_PS_INSTALL_ROOT
"
${
THIRD_PARTY_PATH
}
/install"
)
set
(
BOX_PS_INSTALL_DIR
${
BOX_PS_INSTALL_ROOT
}
/
${
BOX_PS_DST_DIR
}
)
...
...
@@ -40,20 +44,27 @@ set(BOX_PS_LIB ${BOX_PS_LIB_DIR}/libbox_ps.so)
set
(
CMAKE_INSTALL_RPATH
"
${
CMAKE_INSTALL_RPATH
}
"
"
${
BOX_PS_ROOT
}
/lib"
)
include_directories
(
${
BOX_PS_INC_DIR
}
)
file
(
DOWNLOAD
${
BOX_PS_URL
}
${
BOX_PS_DOWNLOAD_DIR
}
/
${
BOX_PS_DOWNLOAD_FILE
}
TLS_VERIFY OFF
STATUS ERR
)
file
(
WRITE
${
BOX_PS_DOWNLOAD_DIR
}
/CMakeLists.txt
"PROJECT(BOX_PS)
\n
"
"cmake_minimum_required(VERSION 3.0)
\n
"
"install(DIRECTORY
${
BOX_PS_NAME
}
/include
${
BOX_PS_NAME
}
/lib
\n
"
"install(DIRECTORY
./include .
/lib
\n
"
" DESTINATION
${
BOX_PS_DST_DIR
}
)
\n
"
)
ExternalProject_Add
(
${
BOX_PS_PROJECT
}
${
EXTERNAL_PROJECT_LOG_ARGS
}
URL
${
BOX_PS_DOWNLOAD_DIR
}
/
${
BOX_PS_DOWNLOAD_FILE
}
PREFIX
${
BOX_PS_SOURCE_DIR
}
DOWNLOAD_DIR
${
BOX_PS_DOWNLOAD_DIR
}
DOWNLOAD_COMMAND wget --no-check-certificate
${
BOX_PS_URL
}
-c -q -O
${
BOX_PS_NAME
}
.tar.gz && tar zxvf
${
BOX_PS_NAME
}
.tar.gz
DOWNLOAD_NO_PROGRESS 1
SOURCE_DIR
${
BOX_PS_INSTALL_DIR
}
UPDATE_COMMAND
""
COMMAND
${
CMAKE_COMMAND
}
-E copy
${
BOX_PS_DOWNLOAD_DIR
}
/CMakeLists.txt
${
BOX_PS_INSTALL_DIR
}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=
${
BOX_PS_INSTALL_ROOT
}
-DCMAKE_BUILD_TYPE=
${
THIRD_PARTY_BUILD_TYPE
}
CMAKE_CACHE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=
${
BOX_PS_INSTALL_ROOT
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录