Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
1b7fe5e8
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看板
提交
1b7fe5e8
编写于
6月 07, 2021
作者:
P
phlrain
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add data transfer; test=develop
上级
96a39cc1
变更
5
展开全部
显示空白变更内容
内联
并排
Showing
5 changed file
with
38 addition
and
729 deletion
+38
-729
paddle/fluid/framework/CMakeLists.txt
paddle/fluid/framework/CMakeLists.txt
+1
-1
paddle/fluid/framework/new_exec.cc
paddle/fluid/framework/new_exec.cc
+0
-726
paddle/fluid/imperative/CMakeLists.txt
paddle/fluid/imperative/CMakeLists.txt
+1
-1
paddle/fluid/operators/elementwise/elementwise_op.h
paddle/fluid/operators/elementwise/elementwise_op.h
+0
-1
paddle/fluid/pybind/pybind.cc
paddle/fluid/pybind/pybind.cc
+36
-0
未找到文件。
paddle/fluid/framework/CMakeLists.txt
浏览文件 @
1b7fe5e8
...
@@ -394,7 +394,7 @@ cc_library(custom_operator SRCS custom_operator.cc DEPS tensor attribute framewo
...
@@ -394,7 +394,7 @@ cc_library(custom_operator SRCS custom_operator.cc DEPS tensor attribute framewo
cc_test
(
custom_tensor_test SRCS custom_tensor_test.cc DEPS custom_tensor glog
)
cc_test
(
custom_tensor_test SRCS custom_tensor_test.cc DEPS custom_tensor glog
)
#cc_binary(test_executor SRCS test_executor.cc DEPS executor op_registry ${GLOB_OP_LIB} ${GLOB_OPERATOR_DEPS} )
#cc_binary(test_executor SRCS test_executor.cc DEPS executor op_registry ${GLOB_OP_LIB} ${GLOB_OPERATOR_DEPS} )
cc_binary
(
new_executor SRCS new_exec
.cc DEPS operator op_registry executor
${
GLOB_OP_LIB
}
${
GLOB_OPERATOR_DEPS
}
profiler
)
#cc_binary(new_executor SRCS new_exec_test
.cc DEPS operator op_registry executor ${GLOB_OP_LIB} ${GLOB_OPERATOR_DEPS} profiler)
set
(
FLUID_FRAMEWORK_MODULES proto_desc memory lod_tensor executor data_feed_proto layer dynamic_loader custom_operator
)
set
(
FLUID_FRAMEWORK_MODULES proto_desc memory lod_tensor executor data_feed_proto layer dynamic_loader custom_operator
)
...
...
paddle/fluid/framework/new_exec.cc
已删除
100644 → 0
浏览文件 @
96a39cc1
此差异已折叠。
点击以展开。
paddle/fluid/imperative/CMakeLists.txt
浏览文件 @
1b7fe5e8
...
@@ -28,6 +28,6 @@ endif(NOT WIN32)
...
@@ -28,6 +28,6 @@ endif(NOT WIN32)
cc_library
(
gradient_accumulator SRCS gradient_accumulator.cc DEPS blas operator lod_tensor selected_rows selected_rows_functor var_type_traits layer math_function
)
cc_library
(
gradient_accumulator SRCS gradient_accumulator.cc DEPS blas operator lod_tensor selected_rows selected_rows_functor var_type_traits layer math_function
)
cc_binary
(
tracer_test SRCS tracer_test.cc DEPS tracer layer op_registry python pybind
${
GLOB_OP_LIB
}
${
GLOB_OPERATOR_DEPS
}
profiler
)
#
cc_binary(tracer_test SRCS tracer_test.cc DEPS tracer layer op_registry python pybind ${GLOB_OP_LIB} ${GLOB_OPERATOR_DEPS} profiler )
add_subdirectory
(
tests
)
add_subdirectory
(
tests
)
paddle/fluid/operators/elementwise/elementwise_op.h
浏览文件 @
1b7fe5e8
...
@@ -76,7 +76,6 @@ class ElementwiseOp : public framework::OperatorWithKernel {
...
@@ -76,7 +76,6 @@ class ElementwiseOp : public framework::OperatorWithKernel {
"its type to LOD_TENSOR."
,
"its type to LOD_TENSOR."
,
ctx
->
GetInputsVarType
(
"X"
).
front
()));
ctx
->
GetInputsVarType
(
"X"
).
front
()));
}
}
if
(
ctx
->
GetInputDim
(
"X"
)
==
ctx
->
GetInputDim
(
"Y"
))
{
if
(
ctx
->
GetInputDim
(
"X"
)
==
ctx
->
GetInputDim
(
"Y"
))
{
ctx
->
ShareDim
(
"X"
,
/*->*/
"Out"
);
ctx
->
ShareDim
(
"X"
,
/*->*/
"Out"
);
ctx
->
ShareLoD
(
"X"
,
/*->*/
"Out"
);
ctx
->
ShareLoD
(
"X"
,
/*->*/
"Out"
);
...
...
paddle/fluid/pybind/pybind.cc
浏览文件 @
1b7fe5e8
...
@@ -53,6 +53,7 @@ limitations under the License. */
...
@@ -53,6 +53,7 @@ limitations under the License. */
#include "paddle/fluid/framework/trainer.h"
#include "paddle/fluid/framework/trainer.h"
#include "paddle/fluid/framework/type_defs.h"
#include "paddle/fluid/framework/type_defs.h"
#include "paddle/fluid/framework/version.h"
#include "paddle/fluid/framework/version.h"
#include "paddle/fluid/framework/new_exec.h"
#include "paddle/fluid/imperative/layer.h"
#include "paddle/fluid/imperative/layer.h"
#include "paddle/fluid/memory/allocation/allocator_strategy.h"
#include "paddle/fluid/memory/allocation/allocator_strategy.h"
#include "paddle/fluid/memory/allocation/mmap_allocator.h"
#include "paddle/fluid/memory/allocation/mmap_allocator.h"
...
@@ -88,6 +89,7 @@ limitations under the License. */
...
@@ -88,6 +89,7 @@ limitations under the License. */
#include "paddle/fluid/pybind/ps_gpu_wrapper_py.h"
#include "paddle/fluid/pybind/ps_gpu_wrapper_py.h"
#include "paddle/fluid/pybind/pybind_boost_headers.h"
#include "paddle/fluid/pybind/pybind_boost_headers.h"
#if defined(PADDLE_WITH_NCCL) || defined(PADDLE_WITH_RCCL)
#if defined(PADDLE_WITH_NCCL) || defined(PADDLE_WITH_RCCL)
#include "paddle/fluid/pybind/nccl_wrapper_py.h"
#include "paddle/fluid/pybind/nccl_wrapper_py.h"
#endif
#endif
...
@@ -1977,6 +1979,40 @@ All parameter, weight, gradient are variables in Paddle.
...
@@ -1977,6 +1979,40 @@ All parameter, weight, gradient are variables in Paddle.
fetch_vars
);
fetch_vars
);
});
});
py
::
class_
<
framework
::
InterpreterCore
>
(
m
,
"InterpreterCore"
)
.
def
(
py
::
init
<
const
platform
::
Place
&
,
const
ProgramDesc
&>
())
.
def
(
"run"
,
[](
InterpreterCore
&
self
,
const
std
::
unordered_map
<
std
::
string
,
py
::
array
>&
input_dict
,
std
::
vector
<
std
::
string
>
vec_fetch_name
)
{
pybind11
::
gil_scoped_release
release
;
std
::
vector
<
framework
::
Tensor
>
vec_tensor
;
std
::
vector
<
std
::
string
>
vec_name
;
//vec_tensor.reserve( feed.size() );
//vec_tensor.reserve( feed.size ()) ;
//auto new_res = input_dict.cast<py::array>();
for
(
auto
&
item
:
input_dict
)
{
//cerr << "test flag " << test_flag << endl;
cerr
<<
item
.
first
<<
endl
;
framework
::
LoDTensor
t
;
SetTensorFromPyArray
<
platform
::
CPUPlace
>
(
&
t
,
item
.
second
,
platform
::
CPUPlace
(),
false
);
cerr
<<
t
.
dims
()
<<
endl
;
cerr
<<
t
.
data
<
float
>
()[
0
]
<<
endl
;
vec_name
.
push_back
(
item
.
first
);
vec_tensor
.
push_back
(
t
);
}
std
::
cerr
<<
"11"
<<
std
::
endl
;
self
.
run
(
vec_name
,
vec_tensor
,
vec_fetch_name
);
//self.Run(prog, scope, block_id, create_local_scope, create_vars,
// fetch_vars);
});
m
.
def
(
"init_gflags"
,
framework
::
InitGflags
);
m
.
def
(
"init_gflags"
,
framework
::
InitGflags
);
m
.
def
(
"init_glog"
,
framework
::
InitGLOG
);
m
.
def
(
"init_glog"
,
framework
::
InitGLOG
);
m
.
def
(
"load_op_meta_info_and_register_op"
,
m
.
def
(
"load_op_meta_info_and_register_op"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录