Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
22f14e74
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2298
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看板
未验证
提交
22f14e74
编写于
12月 14, 2021
作者:
A
Aurelius84
提交者:
GitHub
12月 14, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add const in GetInput/OutputVarPtrs in InferShapeContext (#38066)
上级
f44add7b
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
15 addition
and
14 deletion
+15
-14
paddle/fluid/eager/legacy/infer_shape_context.h
paddle/fluid/eager/legacy/infer_shape_context.h
+2
-2
paddle/fluid/framework/new_executor/new_executor_defs.cc
paddle/fluid/framework/new_executor/new_executor_defs.cc
+3
-2
paddle/fluid/framework/new_executor/new_executor_defs.h
paddle/fluid/framework/new_executor/new_executor_defs.h
+2
-2
paddle/fluid/framework/op_desc.cc
paddle/fluid/framework/op_desc.cc
+2
-2
paddle/fluid/framework/operator.cc
paddle/fluid/framework/operator.cc
+2
-2
paddle/fluid/framework/shape_inference.h
paddle/fluid/framework/shape_inference.h
+2
-2
paddle/fluid/imperative/infer_shape_context.h
paddle/fluid/imperative/infer_shape_context.h
+2
-2
未找到文件。
paddle/fluid/eager/legacy/infer_shape_context.h
浏览文件 @
22f14e74
...
...
@@ -216,13 +216,13 @@ class EagerInferShapeContext : public paddle::framework::InferShapeContext {
// TODO(paddle-dev): Can this be template?
std
::
vector
<
paddle
::
framework
::
InferShapeVarPtr
>
GetInputVarPtrs
(
const
std
::
string
&
name
)
override
{
const
std
::
string
&
name
)
const
override
{
PADDLE_THROW
(
paddle
::
platform
::
errors
::
PermissionDenied
(
"GetInputVarPtrs not support in dygraph runtime context"
));
}
std
::
vector
<
paddle
::
framework
::
InferShapeVarPtr
>
GetOutputVarPtrs
(
const
std
::
string
&
name
)
override
{
const
std
::
string
&
name
)
const
override
{
PADDLE_THROW
(
paddle
::
platform
::
errors
::
PermissionDenied
(
"GetOutputVarPtrs not support in dygraph runtime context"
));
}
...
...
paddle/fluid/framework/new_executor/new_executor_defs.cc
浏览文件 @
22f14e74
...
...
@@ -309,7 +309,7 @@ bool InterpretercoreInferShapeContext::IsRuntime() const { return true; }
// TODO(paddle-dev): Can this be template?
std
::
vector
<
InferShapeVarPtr
>
InterpretercoreInferShapeContext
::
GetInputVarPtrs
(
const
std
::
string
&
name
)
{
const
std
::
string
&
name
)
const
{
const
std
::
vector
<
Variable
*>&
vars
=
InputVars
(
name
);
std
::
vector
<
InferShapeVarPtr
>
res
;
res
.
reserve
(
vars
.
size
());
...
...
@@ -318,7 +318,8 @@ std::vector<InferShapeVarPtr> InterpretercoreInferShapeContext::GetInputVarPtrs(
}
std
::
vector
<
InferShapeVarPtr
>
InterpretercoreInferShapeContext
::
GetOutputVarPtrs
(
const
std
::
string
&
name
)
{
InterpretercoreInferShapeContext
::
GetOutputVarPtrs
(
const
std
::
string
&
name
)
const
{
const
std
::
vector
<
Variable
*>&
vars
=
OutputVars
(
name
);
std
::
vector
<
InferShapeVarPtr
>
res
;
res
.
reserve
(
vars
.
size
());
...
...
paddle/fluid/framework/new_executor/new_executor_defs.h
浏览文件 @
22f14e74
...
...
@@ -86,10 +86,10 @@ class InterpretercoreInferShapeContext : public InferShapeContext {
// TODO(paddle-dev): Can this be template?
std
::
vector
<
InferShapeVarPtr
>
GetInputVarPtrs
(
const
std
::
string
&
name
)
override
;
const
std
::
string
&
name
)
const
override
;
std
::
vector
<
InferShapeVarPtr
>
GetOutputVarPtrs
(
const
std
::
string
&
name
)
override
;
const
std
::
string
&
name
)
const
override
;
DDim
GetInputDim
(
const
std
::
string
&
name
)
const
override
;
...
...
paddle/fluid/framework/op_desc.cc
浏览文件 @
22f14e74
...
...
@@ -200,7 +200,7 @@ class CompileTimeInferShapeContext : public InferShapeContext {
}
std
::
vector
<
InferShapeVarPtr
>
GetInputVarPtrs
(
const
std
::
string
&
name
)
override
{
const
std
::
string
&
name
)
const
override
{
const
std
::
vector
<
std
::
string
>
arg_names
=
Inputs
(
name
);
std
::
vector
<
InferShapeVarPtr
>
res
;
res
.
reserve
(
arg_names
.
size
());
...
...
@@ -212,7 +212,7 @@ class CompileTimeInferShapeContext : public InferShapeContext {
}
std
::
vector
<
InferShapeVarPtr
>
GetOutputVarPtrs
(
const
std
::
string
&
name
)
override
{
const
std
::
string
&
name
)
const
override
{
const
std
::
vector
<
std
::
string
>
arg_names
=
Outputs
(
name
);
std
::
vector
<
InferShapeVarPtr
>
res
;
res
.
reserve
(
arg_names
.
size
());
...
...
paddle/fluid/framework/operator.cc
浏览文件 @
22f14e74
...
...
@@ -871,7 +871,7 @@ class RuntimeInferShapeContext : public InferShapeContext {
// TODO(paddle-dev): Can this be template?
std
::
vector
<
InferShapeVarPtr
>
GetInputVarPtrs
(
const
std
::
string
&
name
)
override
{
const
std
::
string
&
name
)
const
override
{
const
std
::
vector
<
Variable
*>&
vars
=
InputVars
(
name
);
std
::
vector
<
InferShapeVarPtr
>
res
;
res
.
reserve
(
vars
.
size
());
...
...
@@ -880,7 +880,7 @@ class RuntimeInferShapeContext : public InferShapeContext {
}
std
::
vector
<
InferShapeVarPtr
>
GetOutputVarPtrs
(
const
std
::
string
&
name
)
override
{
const
std
::
string
&
name
)
const
override
{
const
std
::
vector
<
Variable
*>&
vars
=
OutputVars
(
name
);
std
::
vector
<
InferShapeVarPtr
>
res
;
res
.
reserve
(
vars
.
size
());
...
...
paddle/fluid/framework/shape_inference.h
浏览文件 @
22f14e74
...
...
@@ -103,9 +103,9 @@ class InferShapeContext {
virtual
bool
IsRuntime
()
const
=
0
;
virtual
std
::
vector
<
InferShapeVarPtr
>
GetInputVarPtrs
(
const
std
::
string
&
name
)
=
0
;
const
std
::
string
&
name
)
const
=
0
;
virtual
std
::
vector
<
InferShapeVarPtr
>
GetOutputVarPtrs
(
const
std
::
string
&
name
)
=
0
;
const
std
::
string
&
name
)
const
=
0
;
protected:
virtual
std
::
vector
<
DDim
>
GetRepeatedDims
(
const
std
::
string
&
name
)
const
=
0
;
...
...
paddle/fluid/imperative/infer_shape_context.h
浏览文件 @
22f14e74
...
...
@@ -216,13 +216,13 @@ class DygraphInferShapeContext : public framework::InferShapeContext {
// TODO(paddle-dev): Can this be template?
std
::
vector
<
framework
::
InferShapeVarPtr
>
GetInputVarPtrs
(
const
std
::
string
&
name
)
override
{
const
std
::
string
&
name
)
const
override
{
PADDLE_THROW
(
platform
::
errors
::
PermissionDenied
(
"GetInputVarPtrs not support in dygraph runtime context"
));
}
std
::
vector
<
framework
::
InferShapeVarPtr
>
GetOutputVarPtrs
(
const
std
::
string
&
name
)
override
{
const
std
::
string
&
name
)
const
override
{
PADDLE_THROW
(
platform
::
errors
::
PermissionDenied
(
"GetOutputVarPtrs not support in dygraph runtime context"
));
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录