Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
csdn_franckjun
Paddle
提交
10e3d677
P
Paddle
项目概览
csdn_franckjun
/
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
10e3d677
编写于
11月 26, 2018
作者:
Q
Qiyang Min
提交者:
GitHub
11月 26, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #14574 from velconia/fix_dist_resnet_ut_in_py36
Upgrade pybind11 to v2.2.4 to support Python3.7
上级
6224e61f
e43f5bc7
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
15 addition
and
16 deletion
+15
-16
cmake/external/pybind11.cmake
cmake/external/pybind11.cmake
+1
-1
paddle/fluid/API.spec
paddle/fluid/API.spec
+4
-4
paddle/fluid/pybind/protobuf.cc
paddle/fluid/pybind/protobuf.cc
+7
-6
paddle/fluid/pybind/pybind.cc
paddle/fluid/pybind/pybind.cc
+2
-3
paddle/fluid/pybind/tensor_py.h
paddle/fluid/pybind/tensor_py.h
+0
-1
paddle/scripts/paddle_build.sh
paddle/scripts/paddle_build.sh
+1
-1
未找到文件。
cmake/external/pybind11.cmake
浏览文件 @
10e3d677
...
@@ -26,7 +26,7 @@ ExternalProject_Add(
...
@@ -26,7 +26,7 @@ ExternalProject_Add(
extern_pybind
extern_pybind
${
EXTERNAL_PROJECT_LOG_ARGS
}
${
EXTERNAL_PROJECT_LOG_ARGS
}
GIT_REPOSITORY
"https://github.com/pybind/pybind11.git"
GIT_REPOSITORY
"https://github.com/pybind/pybind11.git"
GIT_TAG
"v2.
1.1
"
GIT_TAG
"v2.
2.4
"
PREFIX
${
PYBIND_SOURCE_DIR
}
PREFIX
${
PYBIND_SOURCE_DIR
}
UPDATE_COMMAND
""
UPDATE_COMMAND
""
CONFIGURE_COMMAND
""
CONFIGURE_COMMAND
""
...
...
paddle/fluid/API.spec
浏览文件 @
10e3d677
...
@@ -26,10 +26,10 @@ paddle.fluid.release_memory ArgSpec(args=['input_program', 'skip_opt_set'], vara
...
@@ -26,10 +26,10 @@ paddle.fluid.release_memory ArgSpec(args=['input_program', 'skip_opt_set'], vara
paddle.fluid.DistributeTranspilerConfig.__init__
paddle.fluid.DistributeTranspilerConfig.__init__
paddle.fluid.ParallelExecutor.__init__ ArgSpec(args=['self', 'use_cuda', 'loss_name', 'main_program', 'share_vars_from', 'exec_strategy', 'build_strategy', 'num_trainers', 'trainer_id', 'scope'], varargs=None, keywords=None, defaults=(None, None, None, None, None, 1, 0, None))
paddle.fluid.ParallelExecutor.__init__ ArgSpec(args=['self', 'use_cuda', 'loss_name', 'main_program', 'share_vars_from', 'exec_strategy', 'build_strategy', 'num_trainers', 'trainer_id', 'scope'], varargs=None, keywords=None, defaults=(None, None, None, None, None, 1, 0, None))
paddle.fluid.ParallelExecutor.run ArgSpec(args=['self', 'fetch_list', 'feed', 'feed_dict', 'return_numpy'], varargs=None, keywords=None, defaults=(None, None, True))
paddle.fluid.ParallelExecutor.run ArgSpec(args=['self', 'fetch_list', 'feed', 'feed_dict', 'return_numpy'], varargs=None, keywords=None, defaults=(None, None, True))
paddle.fluid.ExecutionStrategy.__init__ __init__(self: paddle.fluid.core.ExecutionStrategy) -> None
paddle.fluid.ExecutionStrategy.__init__ __init__(self: paddle.fluid.core.
ParallelExecutor.
ExecutionStrategy) -> None
paddle.fluid.BuildStrategy.GradientScaleStrategy.__init__ __init__(self: paddle.fluid.core.GradientScaleStrategy, arg0: int) -> None
paddle.fluid.BuildStrategy.GradientScaleStrategy.__init__ __init__(self: paddle.fluid.core.
ParallelExecutor.BuildStrategy.
GradientScaleStrategy, arg0: int) -> None
paddle.fluid.BuildStrategy.ReduceStrategy.__init__ __init__(self: paddle.fluid.core.ReduceStrategy, arg0: int) -> None
paddle.fluid.BuildStrategy.ReduceStrategy.__init__ __init__(self: paddle.fluid.core.
ParallelExecutor.BuildStrategy.
ReduceStrategy, arg0: int) -> None
paddle.fluid.BuildStrategy.__init__ __init__(self: paddle.fluid.core.BuildStrategy) -> None
paddle.fluid.BuildStrategy.__init__ __init__(self: paddle.fluid.core.
ParallelExecutor.
BuildStrategy) -> None
paddle.fluid.create_lod_tensor ArgSpec(args=['data', 'recursive_seq_lens', 'place'], varargs=None, keywords=None, defaults=None)
paddle.fluid.create_lod_tensor ArgSpec(args=['data', 'recursive_seq_lens', 'place'], varargs=None, keywords=None, defaults=None)
paddle.fluid.create_random_int_lodtensor ArgSpec(args=['recursive_seq_lens', 'base_shape', 'place', 'low', 'high'], varargs=None, keywords=None, defaults=None)
paddle.fluid.create_random_int_lodtensor ArgSpec(args=['recursive_seq_lens', 'base_shape', 'place', 'low', 'high'], varargs=None, keywords=None, defaults=None)
paddle.fluid.io.save_vars ArgSpec(args=['executor', 'dirname', 'main_program', 'vars', 'predicate', 'filename'], varargs=None, keywords=None, defaults=(None, None, None, None))
paddle.fluid.io.save_vars ArgSpec(args=['executor', 'dirname', 'main_program', 'vars', 'predicate', 'filename'], varargs=None, keywords=None, defaults=(None, None, None, None))
...
...
paddle/fluid/pybind/protobuf.cc
浏览文件 @
10e3d677
...
@@ -30,11 +30,12 @@ namespace pybind11 {
...
@@ -30,11 +30,12 @@ namespace pybind11 {
namespace
detail
{
namespace
detail
{
// Can be replaced by a generic lambda in C++14
// Can be replaced by a generic lambda in C++14
struct
variant_caster_visitor
:
public
boost
::
static_visitor
<
handle
>
{
struct
__attribute__
((
visibility
(
"hidden"
)))
paddle_variant_caster_visitor
:
public
boost
::
static_visitor
<
handle
>
{
return_value_policy
policy
;
return_value_policy
policy
;
handle
parent
;
handle
parent
;
variant_caster_visitor
(
return_value_policy
policy
,
handle
parent
)
paddle_
variant_caster_visitor
(
return_value_policy
policy
,
handle
parent
)
:
policy
(
policy
),
parent
(
parent
)
{}
:
policy
(
policy
),
parent
(
parent
)
{}
template
<
class
T
>
template
<
class
T
>
...
@@ -44,10 +45,10 @@ struct variant_caster_visitor : public boost::static_visitor<handle> {
...
@@ -44,10 +45,10 @@ struct variant_caster_visitor : public boost::static_visitor<handle> {
};
};
template
<
class
Variant
>
template
<
class
Variant
>
struct
variant_caster
;
struct
paddle_
variant_caster
;
template
<
template
<
class
...
>
class
V
,
class
...
Ts
>
template
<
template
<
class
...
>
class
V
,
class
...
Ts
>
struct
variant_caster
<
V
<
Ts
...
>>
{
struct
paddle_
variant_caster
<
V
<
Ts
...
>>
{
using
Type
=
V
<
Ts
...
>
;
using
Type
=
V
<
Ts
...
>
;
template
<
typename
T
>
template
<
typename
T
>
...
@@ -90,7 +91,7 @@ struct variant_caster<V<Ts...>> {
...
@@ -90,7 +91,7 @@ struct variant_caster<V<Ts...>> {
static
handle
cast
(
Type
const
&
src
,
return_value_policy
policy
,
static
handle
cast
(
Type
const
&
src
,
return_value_policy
policy
,
handle
parent
)
{
handle
parent
)
{
variant_caster_visitor
visitor
(
policy
,
parent
);
paddle_
variant_caster_visitor
visitor
(
policy
,
parent
);
return
boost
::
apply_visitor
(
visitor
,
src
);
return
boost
::
apply_visitor
(
visitor
,
src
);
}
}
...
@@ -101,7 +102,7 @@ struct variant_caster<V<Ts...>> {
...
@@ -101,7 +102,7 @@ struct variant_caster<V<Ts...>> {
// Add specialization for concrete variant type
// Add specialization for concrete variant type
template
<
class
...
Args
>
template
<
class
...
Args
>
struct
type_caster
<
boost
::
variant
<
Args
...
>>
struct
type_caster
<
boost
::
variant
<
Args
...
>>
:
variant_caster
<
boost
::
variant
<
Args
...
>>
{};
:
paddle_
variant_caster
<
boost
::
variant
<
Args
...
>>
{};
}
// namespace detail
}
// namespace detail
}
// namespace pybind11
}
// namespace pybind11
...
...
paddle/fluid/pybind/pybind.cc
浏览文件 @
10e3d677
...
@@ -86,12 +86,12 @@ bool IsCompiledWithDIST() {
...
@@ -86,12 +86,12 @@ bool IsCompiledWithDIST() {
#endif
#endif
}
}
PYBIND11_
PLUGIN
(
core
)
{
PYBIND11_
MODULE
(
core
,
m
)
{
// Not used, just make sure cpu_info.cc is linked.
// Not used, just make sure cpu_info.cc is linked.
paddle
::
platform
::
CpuTotalPhysicalMemory
();
paddle
::
platform
::
CpuTotalPhysicalMemory
();
paddle
::
memory
::
allocation
::
UseAllocatorStrategyGFlag
();
paddle
::
memory
::
allocation
::
UseAllocatorStrategyGFlag
();
py
::
module
m
(
"core"
,
"C++ core of PaddlePaddle"
)
;
m
.
doc
()
=
"C++ core of PaddlePaddle"
;
// using framework in this function. Since it is inside a function, it will
// using framework in this function. Since it is inside a function, it will
// not cause namespace pollution.
// not cause namespace pollution.
...
@@ -907,7 +907,6 @@ All parameter, weight, gradient are variables in Paddle.
...
@@ -907,7 +907,6 @@ All parameter, weight, gradient are variables in Paddle.
});
});
BindRecordIOWriter
(
&
m
);
BindRecordIOWriter
(
&
m
);
return
m
.
ptr
();
}
}
}
// namespace pybind
}
// namespace pybind
}
// namespace paddle
}
// namespace paddle
paddle/fluid/pybind/tensor_py.h
浏览文件 @
10e3d677
...
@@ -21,7 +21,6 @@ limitations under the License. */
...
@@ -21,7 +21,6 @@ limitations under the License. */
#include "paddle/fluid/memory/memcpy.h"
#include "paddle/fluid/memory/memcpy.h"
#include "paddle/fluid/platform/device_context.h"
#include "paddle/fluid/platform/device_context.h"
#include "paddle/fluid/platform/float16.h"
#include "paddle/fluid/platform/float16.h"
#include "pybind11/common.h"
#include "pybind11/numpy.h"
#include "pybind11/numpy.h"
#include "pybind11/pybind11.h"
#include "pybind11/pybind11.h"
...
...
paddle/scripts/paddle_build.sh
浏览文件 @
10e3d677
...
@@ -149,7 +149,7 @@ function cmake_gen() {
...
@@ -149,7 +149,7 @@ function cmake_gen() {
elif
[
"
$1
"
==
"cp37-cp37m"
]
;
then
elif
[
"
$1
"
==
"cp37-cp37m"
]
;
then
export
LD_LIBRARY_PATH
=
/opt/_internal/cpython-3.7.0/lib/:
${
LD_LIBRARY_PATH
}
export
LD_LIBRARY_PATH
=
/opt/_internal/cpython-3.7.0/lib/:
${
LD_LIBRARY_PATH
}
export
PATH
=
/opt/_internal/cpython-3.7.0/bin/:
${
PATH
}
export
PATH
=
/opt/_internal/cpython-3.7.0/bin/:
${
PATH
}
export
PYTHON_FLAGS
=
"-DPYTHON_EXECUTABLE:FILEPATH=/opt/_internal/cpython-3.7.0/bin/python3
export
PYTHON_FLAGS
=
"-DPYTHON_EXECUTABLE:FILEPATH=/opt/_internal/cpython-3.7.0/bin/python3
.7
-DPYTHON_INCLUDE_DIR:PATH=/opt/_internal/cpython-3.7.0/include/python3.7m
-DPYTHON_INCLUDE_DIR:PATH=/opt/_internal/cpython-3.7.0/include/python3.7m
-DPYTHON_LIBRARIES:FILEPATH=/opt/_internal/cpython-3.7.0/lib/libpython3.so"
-DPYTHON_LIBRARIES:FILEPATH=/opt/_internal/cpython-3.7.0/lib/libpython3.so"
fi
fi
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录