Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
0964de11
P
Paddle
项目概览
Crayon鑫
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
0964de11
编写于
8月 02, 2018
作者:
Q
Qiyang Min
提交者:
GitHub
8月 02, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #12505 from velconia/fix_pserver_shutdown
Fix pserver can NOT start with DebugString problem
上级
3185d38a
f9ef0ee8
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
27 addition
and
12 deletion
+27
-12
CMakeLists.txt
CMakeLists.txt
+8
-8
cmake/cudnn.cmake
cmake/cudnn.cmake
+1
-0
paddle/fluid/framework/operator.cc
paddle/fluid/framework/operator.cc
+17
-3
paddle/fluid/framework/tensor.h
paddle/fluid/framework/tensor.h
+1
-1
未找到文件。
CMakeLists.txt
浏览文件 @
0964de11
...
...
@@ -200,6 +200,14 @@ include(external/snappy) # download snappy
include
(
external/snappystream
)
include
(
external/threadpool
)
if
(
WITH_GPU
)
include
(
cuda
)
include
(
tensorrt
)
include
(
external/anakin
)
else
()
set
(
WITH_ANAKIN OFF CACHE STRING
"Anakin is valid only when GPU is set."
FORCE
)
endif
()
include
(
cudnn
)
# set cudnn libraries, must before configure
include
(
cupti
)
include
(
configure
)
# add paddle env configuration
...
...
@@ -228,14 +236,6 @@ set(EXTERNAL_LIBS
${
PYTHON_LIBRARIES
}
)
if
(
WITH_GPU
)
include
(
cuda
)
include
(
tensorrt
)
include
(
external/anakin
)
else
()
set
(
WITH_ANAKIN OFF CACHE STRING
"Anakin is valid only when GPU is set."
FORCE
)
endif
()
if
(
WITH_AMD_GPU
)
find_package
(
HIP
)
include
(
hip
)
...
...
cmake/cudnn.cmake
浏览文件 @
0964de11
...
...
@@ -21,6 +21,7 @@ list(APPEND CUDNN_CHECK_LIBRARY_DIRS
${
CUDNN_ROOT
}
/lib64
${
CUDNN_ROOT
}
/lib
${
CUDNN_ROOT
}
/lib/
${
TARGET_ARCH
}
-linux-gnu
${
CUDNN_ROOT
}
/local/cuda-
${
CUDA_VERSION
}
/targets/
${
TARGET_ARCH
}
-linux/lib/
$ENV{CUDNN_ROOT}
$ENV{CUDNN_ROOT}/lib64
$ENV{CUDNN_ROOT}/lib
...
...
paddle/fluid/framework/operator.cc
浏览文件 @
0964de11
...
...
@@ -18,6 +18,7 @@ limitations under the License. */
#include "paddle/fluid/framework/data_transform.h"
#include "paddle/fluid/framework/executor.h"
#include "paddle/fluid/framework/lod_tensor.h"
#include "paddle/fluid/framework/operator.h"
#include "paddle/fluid/framework/shape_inference.h"
#include "paddle/fluid/framework/var_type.h"
...
...
@@ -57,7 +58,11 @@ static DDim GetDims(const Scope& scope, const std::string& name,
}
if
(
var
->
IsType
<
LoDTensor
>
())
{
return
var
->
Get
<
LoDTensor
>
().
dims
();
const
LoDTensor
&
tensor
=
var
->
Get
<
LoDTensor
>
();
if
(
UNLIKELY
(
!
tensor
.
IsInitialized
()))
{
return
DDim
({
-
1
});
}
return
tensor
.
dims
();
}
else
if
(
var
->
IsType
<
SelectedRows
>
())
{
if
(
get_actual_dim
)
{
return
var
->
Get
<
SelectedRows
>
().
value
().
dims
();
...
...
@@ -74,8 +79,13 @@ static std::string GetDtype(const Scope& scope, const std::string& name) {
if
(
var
==
nullptr
)
{
return
""
;
}
if
(
var
->
IsType
<
LoDTensor
>
())
{
return
DataTypeToString
(
ToDataType
(
var
->
Get
<
LoDTensor
>
().
type
()));
const
LoDTensor
&
tensor
=
var
->
Get
<
LoDTensor
>
();
if
(
UNLIKELY
(
!
tensor
.
IsInitialized
()))
{
return
""
;
}
return
DataTypeToString
(
ToDataType
(
tensor
.
type
()));
}
else
if
(
var
->
IsType
<
SelectedRows
>
())
{
return
DataTypeToString
(
ToDataType
(
var
->
Get
<
SelectedRows
>
().
value
().
type
()));
...
...
@@ -106,7 +116,11 @@ static LoD GetLoD(const Scope& scope, const std::string& name) {
}
if
(
var
->
IsType
<
LoDTensor
>
())
{
return
var
->
Get
<
LoDTensor
>
().
lod
();
const
LoDTensor
&
tensor
=
var
->
Get
<
LoDTensor
>
();
if
(
UNLIKELY
(
!
tensor
.
IsInitialized
()))
{
return
default_lod
;
}
return
tensor
.
lod
();
}
else
{
return
default_lod
;
}
...
...
paddle/fluid/framework/tensor.h
浏览文件 @
0964de11
...
...
@@ -82,7 +82,7 @@ class Tensor {
template
<
typename
T
>
const
T
*
data
()
const
;
bool
IsInitialized
()
const
;
inline
bool
IsInitialized
()
const
;
/**
* @brief Return a pointer to mutable memory block.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录