Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
447d79da
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2299
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看板
未验证
提交
447d79da
编写于
9月 08, 2022
作者:
H
HongyuJia
提交者:
GitHub
9月 08, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
polish code comment, test=doc (#45859)
上级
d3f52bcc
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
9 addition
and
12 deletion
+9
-12
paddle/fluid/framework/operator.h
paddle/fluid/framework/operator.h
+1
-2
paddle/fluid/imperative/layer.cc
paddle/fluid/imperative/layer.cc
+1
-1
paddle/fluid/imperative/tracer.h
paddle/fluid/imperative/tracer.h
+1
-1
paddle/fluid/operators/matmul_v2_op.cc
paddle/fluid/operators/matmul_v2_op.cc
+3
-5
paddle/phi/api/include/context_pool.h
paddle/phi/api/include/context_pool.h
+1
-1
paddle/phi/common/backend.h
paddle/phi/common/backend.h
+1
-1
paddle/phi/core/kernel_factory.h
paddle/phi/core/kernel_factory.h
+1
-1
未找到文件。
paddle/fluid/framework/operator.h
浏览文件 @
447d79da
...
@@ -680,8 +680,7 @@ class OperatorWithKernel : public OperatorBase {
...
@@ -680,8 +680,7 @@ class OperatorWithKernel : public OperatorBase {
/**
/**
* Transfer data from scope to a transferred scope. If there is no data need
* Transfer data from scope to a transferred scope. If there is no data need
* to
* to be transferred, it returns nullptr.
* be tranfered, it returns nullptr.
*
*
* * transfered_inplace_vars is a output vector.
* * transfered_inplace_vars is a output vector.
*/
*/
...
...
paddle/fluid/imperative/layer.cc
浏览文件 @
447d79da
...
@@ -517,7 +517,7 @@ static void OpBaseRunImpl(const framework::OperatorBase& op,
...
@@ -517,7 +517,7 @@ static void OpBaseRunImpl(const framework::OperatorBase& op,
* `transfer_scope` is created before PrepareData, the data after
* `transfer_scope` is created before PrepareData, the data after
* transform is stored in the temporary scope, and then discarded
* transform is stored in the temporary scope, and then discarded
* after the execution of op, but the original input is directly
* after the execution of op, but the original input is directly
* overwritten in the previous dynamic graph implemention.
* overwritten in the previous dynamic graph implement
at
ion.
*/
*/
auto
prepared_op
=
auto
prepared_op
=
PreparedOp
::
Prepare
(
ins
,
outs
,
*
op_kernel
,
place
,
attrs
,
default_attrs
);
PreparedOp
::
Prepare
(
ins
,
outs
,
*
op_kernel
,
place
,
attrs
,
default_attrs
);
...
...
paddle/fluid/imperative/tracer.h
浏览文件 @
447d79da
...
@@ -139,7 +139,7 @@ class Tracer {
...
@@ -139,7 +139,7 @@ class Tracer {
// intermediate var both in imperative and static mode. But the
// intermediate var both in imperative and static mode. But the
// `UniqueNameGenerator` in C++ and `unique_name.py` in Python doesn't share
// `UniqueNameGenerator` in C++ and `unique_name.py` in Python doesn't share
// the same auto-increment id. It will create a variable repeatedly with same
// the same auto-increment id. It will create a variable repeatedly with same
//
name like `tmp_0` in some cases when transform dygraph into static layers.
// name like `tmp_0` in some cases when transform dygraph into static layers.
// So we modify the default prefix key into `eager_tmp` to distinguish with
// So we modify the default prefix key into `eager_tmp` to distinguish with
// static graph.
// static graph.
std
::
string
GenerateUniqueName
(
std
::
string
key
=
"dygraph_tmp"
)
{
std
::
string
GenerateUniqueName
(
std
::
string
key
=
"dygraph_tmp"
)
{
...
...
paddle/fluid/operators/matmul_v2_op.cc
浏览文件 @
447d79da
...
@@ -62,12 +62,12 @@ class MatMulV2Op : public framework::OperatorWithKernel {
...
@@ -62,12 +62,12 @@ class MatMulV2Op : public framework::OperatorWithKernel {
0
,
0
,
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
"The Input(X) dims size must be greater than 0,"
"The Input(X) dims size must be greater than 0,"
" but re
vic
ed dims size is 0. "
));
" but re
ceiv
ed dims size is 0. "
));
PADDLE_ENFORCE_GT
(
ndims_y
,
PADDLE_ENFORCE_GT
(
ndims_y
,
0
,
0
,
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
"The Input(Y) dims size must be greater than 0,"
"The Input(Y) dims size must be greater than 0,"
" but re
vic
ed dims size is 0. "
));
" but re
ceiv
ed dims size is 0. "
));
bool
x_broadcasted
=
false
,
y_broadcasted
=
false
;
bool
x_broadcasted
=
false
,
y_broadcasted
=
false
;
if
(
ndims_x
==
1
)
{
if
(
ndims_x
==
1
)
{
...
@@ -160,9 +160,7 @@ class MatMulV2Op : public framework::OperatorWithKernel {
...
@@ -160,9 +160,7 @@ class MatMulV2Op : public framework::OperatorWithKernel {
}
else
{
}
else
{
#ifdef PADDLE_WITH_MKLDNN
#ifdef PADDLE_WITH_MKLDNN
// When matmul_v2 is first oneDNN op in a chain (there was some non oneDNN
// When matmul_v2 is first oneDNN op in a chain (there was some non oneDNN
// op
// op previously) then we also need to rotate shape NHWC -> NCWH
// previously)
// then we also need to rotate shape NHWC -> NCWH
if
((
expected_kernel_type
.
data_layout_
==
if
((
expected_kernel_type
.
data_layout_
==
framework
::
DataLayout
::
kMKLDNN
)
&&
framework
::
DataLayout
::
kMKLDNN
)
&&
(
tensor
.
layout
()
!=
framework
::
DataLayout
::
kMKLDNN
)
&&
(
tensor
.
layout
()
!=
framework
::
DataLayout
::
kMKLDNN
)
&&
...
...
paddle/phi/api/include/context_pool.h
浏览文件 @
447d79da
...
@@ -59,7 +59,7 @@ struct DefaultDeviceContextType<AllocationType::GPU> {
...
@@ -59,7 +59,7 @@ struct DefaultDeviceContextType<AllocationType::GPU> {
*
*
* Note: DeviceContextPool is an experimental API and may be removed in the
* Note: DeviceContextPool is an experimental API and may be removed in the
* future. From 2.3, we recommend directly using the C++ API to combine new
* future. From 2.3, we recommend directly using the C++ API to combine new
* perators.
*
o
perators.
*/
*/
class
PADDLE_API
DeviceContextPool
{
class
PADDLE_API
DeviceContextPool
{
public:
public:
...
...
paddle/phi/common/backend.h
浏览文件 @
447d79da
...
@@ -61,7 +61,7 @@ enum class Backend : uint8_t {
...
@@ -61,7 +61,7 @@ enum class Backend : uint8_t {
NUM_BACKENDS
,
NUM_BACKENDS
,
/**
/**
* [ Why we need ALL in ba
is
c kernel key member? ]
* [ Why we need ALL in ba
si
c kernel key member? ]
*
*
* For Tensor, ALL represents an illegal Backend, but for Kernel, some
* For Tensor, ALL represents an illegal Backend, but for Kernel, some
* kernels may be device-independent by nature, such as reshape; and when
* kernels may be device-independent by nature, such as reshape; and when
...
...
paddle/phi/core/kernel_factory.h
浏览文件 @
447d79da
...
@@ -210,7 +210,7 @@ class KernelArgsDef {
...
@@ -210,7 +210,7 @@ class KernelArgsDef {
class
Kernel
{
class
Kernel
{
public:
public:
// for map element contruct
// for map element con
s
truct
Kernel
()
=
default
;
Kernel
()
=
default
;
explicit
Kernel
(
KernelFn
fn
,
void
*
variadic_fn
)
explicit
Kernel
(
KernelFn
fn
,
void
*
variadic_fn
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录