Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
9e13b68f
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看板
提交
9e13b68f
编写于
6月 20, 2017
作者:
Q
qiaolongfei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refine code
上级
b101aaca
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
20 addition
and
20 deletion
+20
-20
CMakeLists.txt
CMakeLists.txt
+6
-6
cmake/configure.cmake
cmake/configure.cmake
+3
-3
go/cmake/golang.cmake
go/cmake/golang.cmake
+1
-2
paddle/api/PaddleAPI.h
paddle/api/PaddleAPI.h
+2
-1
paddle/api/ParameterUpdater.cpp
paddle/api/ParameterUpdater.cpp
+5
-5
paddle/trainer/CMakeLists.txt
paddle/trainer/CMakeLists.txt
+3
-3
未找到文件。
CMakeLists.txt
浏览文件 @
9e13b68f
...
...
@@ -47,7 +47,7 @@ option(WITH_COVERAGE "Compile PaddlePaddle with code coverage" OFF)
option
(
COVERALLS_UPLOAD
"Package code coverage data to coveralls"
OFF
)
option
(
ON_TRAVIS
"Exclude special unit test on Travis CI"
OFF
)
option
(
WITH_C_API
"Compile PaddlePaddle with C-API(Prediction)"
OFF
)
option
(
WITH_G
o
"Compile PaddlePaddle with Go)"
OFF
)
option
(
WITH_G
OLANG
"Compile PaddlePaddle with GOLANG"
OFF
)
# CMAKE_BUILD_TYPE
if
(
NOT CMAKE_BUILD_TYPE
)
...
...
@@ -108,7 +108,7 @@ include(configure) # add paddle env configuration
include_directories
(
"
${
PROJ_ROOT
}
"
)
include_directories
(
"
${
PROJ_ROOT
}
/paddle/cuda/include"
)
include_directories
(
"
${
CMAKE_CURRENT_BINARY_DIR
}
/proto"
)
include_directories
(
"
${
CMAKE_BINARY_DIR
}
/go/pserver/cclient"
)
include_directories
(
"
${
CMAKE_
CURRENT_
BINARY_DIR
}
/go/pserver/cclient"
)
set
(
EXTERNAL_LIBS
${
GFLAGS_LIBRARIES
}
...
...
@@ -130,10 +130,10 @@ add_subdirectory(proto)
add_subdirectory
(
paddle
)
add_subdirectory
(
python
)
if
(
WITH_G
o
)
#
add_subdirectory(go/pserver/cclient
)
add_subdirectory
(
go/
master/c
)
endif
(
WITH_G
o
)
if
(
WITH_G
OLANG
)
#
TODO (add go/master/c back when fixed
)
add_subdirectory
(
go/
pserver/cclient
)
endif
(
WITH_G
OLANG
)
if
(
WITH_DOC
)
add_subdirectory
(
doc
)
...
...
cmake/configure.cmake
浏览文件 @
9e13b68f
...
...
@@ -40,9 +40,9 @@ if(NOT CMAKE_CROSSCOMPILING)
endif
()
endif
()
if
(
NOT WITH_G
o
)
add_definitions
(
-DPADDLE_WITHOUT_GO
)
endif
()
if
(
NOT WITH_G
OLANG
)
add_definitions
(
-DPADDLE_WITHOUT_GO
LANG
)
endif
(
NOT WITH_GOLANG
)
if
(
NOT WITH_GPU
)
add_definitions
(
-DPADDLE_ONLY_CPU
)
...
...
go/cmake/golang.cmake
浏览文件 @
9e13b68f
...
...
@@ -10,8 +10,7 @@ function(GO_LIBRARY NAME BUILD_TYPE)
else
()
set
(
BUILD_MODE -buildmode=c-shared
)
if
(
APPLE
)
# set(LIB_NAME "lib${NAME}.dylib")
set
(
LIB_NAME
"lib
${
NAME
}
.so"
)
set
(
LIB_NAME
"lib
${
NAME
}
.dylib"
)
else
()
set
(
LIB_NAME
"lib
${
NAME
}
.so"
)
endif
()
...
...
paddle/api/PaddleAPI.h
浏览文件 @
9e13b68f
...
...
@@ -842,7 +842,8 @@ public:
int
passCount
,
bool
useSparseUpdater
);
static
ParameterUpdater
*
createNewRemoteUpdater
(
OptimizationConfig
*
config
,
const
std
::
string
pserverSpec
)
throw
(
UnsupportError
);
OptimizationConfig
*
config
,
const
std
::
string
pserverSpec
)
throw
(
UnsupportError
);
~
ParameterUpdater
();
/**
...
...
paddle/api/ParameterUpdater.cpp
浏览文件 @
9e13b68f
...
...
@@ -15,7 +15,7 @@ limitations under the License. */
#include "PaddleAPI.h"
#include "PaddleAPIPrivate.h"
#ifndef PADDLE_WITHOUT_GO
#ifndef PADDLE_WITHOUT_GO
LANG
#include "paddle/trainer/NewRemoteParameterUpdater.h"
#endif
#include "paddle/trainer/RemoteParameterUpdater.h"
...
...
@@ -31,10 +31,10 @@ ParameterUpdater *ParameterUpdater::createLocalUpdater(
return
updater
;
}
ParameterUpdater
*
ParameterUpdater
::
createNewRemoteUpdater
(
OptimizationConfig
*
config
,
const
std
::
string
pserverSpec
)
throw
(
UnsupportError
)
{
#ifndef PADDLE_WITHOUT_GO
ParameterUpdater
*
ParameterUpdater
::
createNewRemoteUpdater
(
OptimizationConfig
*
config
,
const
std
::
string
pserverSpec
)
throw
(
UnsupportError
)
{
#ifndef PADDLE_WITHOUT_GO
LANG
auto
updater
=
new
ParameterUpdater
();
updater
->
m
->
updater
.
reset
(
new
paddle
::
NewRemoteParameterUpdater
(
config
->
m
->
getConfig
(),
pserverSpec
));
...
...
paddle/trainer/CMakeLists.txt
浏览文件 @
9e13b68f
...
...
@@ -26,7 +26,7 @@ set(TRAINER_HEADERS
ThreadParameterUpdater.h
TrainerConfigHelper.h
)
if
(
NOT WITH_G
o
)
if
(
NOT WITH_G
OLANG
)
list
(
REMOVE_ITEM TRAINER_SOURCES
NewRemoteParameterUpdater.cpp
)
list
(
REMOVE_ITEM TRAINER_HEADERS
...
...
@@ -70,8 +70,8 @@ if(APPLE)
set
(
CMAKE_EXE_LINKER_FLAGS
"-framework CoreFoundation -framework Security"
)
endif
()
if
(
WITH_G
o
)
if
(
WITH_G
OLANG
)
add_dependencies
(
paddle_trainer_lib paddle_pserver_cclient
)
target_link_libraries
(
paddle_trainer
${
CMAKE_BINARY_DIR
}
/go/pserver/cclient/libpaddle_pserver_cclient.a
)
target_link_libraries
(
paddle_trainer_lib
${
CMAKE_BINARY_DIR
}
/go/pserver/cclient/libpaddle_pserver_cclient.a
)
endif
(
WITH_G
o
)
endif
(
WITH_G
OLANG
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录