Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
yushenjjy
Paddle
提交
080024f0
P
Paddle
项目概览
yushenjjy
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
0
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
080024f0
编写于
3月 13, 2022
作者:
Z
zyfncg
提交者:
GitHub
3月 13, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor unary infermeta (#40365)
上级
ec09ef26
变更
2
展开全部
显示空白变更内容
内联
并排
Showing
2 changed file
with
827 addition
and
826 deletion
+827
-826
paddle/phi/infermeta/unary.cc
paddle/phi/infermeta/unary.cc
+730
-730
paddle/phi/infermeta/unary.h
paddle/phi/infermeta/unary.h
+97
-96
未找到文件。
paddle/phi/infermeta/unary.cc
浏览文件 @
080024f0
此差异已折叠。
点击以展开。
paddle/phi/infermeta/unary.h
浏览文件 @
080024f0
...
...
@@ -32,32 +32,20 @@ class MetaConfig;
// Because functions in this file not only can infer shape, but also need
// infer lod or other useful data.
void
ArgMinMaxInferMeta
(
const
MetaTensor
&
x
,
int64_t
axis
,
bool
keepdims
,
bool
flatten
,
int
dtype
,
MetaTensor
*
out
,
MetaConfig
config
=
MetaConfig
());
void
ArgsortInferMeta
(
const
MetaTensor
&
input
,
int
axis
,
bool
descending
,
MetaTensor
*
output
,
MetaTensor
*
indices
);
void
UnchangedInferMeta
(
const
MetaTensor
&
x
,
MetaTensor
*
out
);
// meta x -> out without change, check if axis in range [-Rank(x), Rank(x)-1]
void
UnchangedInferMetaCheckAxis
(
const
MetaTensor
&
x
,
int
axis
,
MetaTensor
*
out
);
void
RealAndImagInferMeta
(
const
MetaTensor
&
x
,
MetaTensor
*
out
);
void
FlattenInferMeta
(
const
MetaTensor
&
x
,
int
start_axis
,
int
stop_axis
,
MetaTensor
*
out
);
void
GumbelSoftmaxInferMeta
(
const
MetaTensor
&
x
,
float
temperature
,
bool
hard
,
int
axis
,
MetaTensor
*
out
);
void
CastInferMeta
(
const
MetaTensor
&
x
,
DataType
out_dtype
,
MetaTensor
*
out
);
void
CholeskyInferMeta
(
const
MetaTensor
&
x
,
bool
upper
,
MetaTensor
*
out
);
...
...
@@ -76,6 +64,30 @@ void CumsumInferMeta(const MetaTensor& x,
bool
reverse
,
MetaTensor
*
out
);
void
DiagInferMeta
(
const
MetaTensor
&
x
,
int
offset
,
float
padding_value
,
MetaTensor
*
out
);
void
DiagonalInferMeta
(
const
MetaTensor
&
input
,
int
offset
,
int
axis1
,
int
axis2
,
MetaTensor
*
out
);
void
EighInferMeta
(
const
MetaTensor
&
x
,
const
std
::
string
&
uplo
,
MetaTensor
*
out_w
,
MetaTensor
*
out_v
);
void
FlattenInferMeta
(
const
MetaTensor
&
x
,
int
start_axis
,
int
stop_axis
,
MetaTensor
*
out
);
void
GumbelSoftmaxInferMeta
(
const
MetaTensor
&
x
,
float
temperature
,
bool
hard
,
int
axis
,
MetaTensor
*
out
);
void
IncrementInferMeta
(
const
MetaTensor
&
x
,
float
value
,
MetaTensor
*
out
);
void
InferMetaFromVecValue
(
const
MetaTensor
&
x
,
...
...
@@ -84,11 +96,37 @@ void InferMetaFromVecValue(const MetaTensor& x,
void
IsEmptyInferMeta
(
const
MetaTensor
&
x
,
MetaTensor
*
out
);
void
IsfiniteInferMeta
(
const
MetaTensor
&
input
,
MetaTensor
*
out
);
void
MultinomialInferMeta
(
const
MetaTensor
&
x
,
int
num_samples
,
bool
replacement
,
MetaTensor
*
out
);
void
PadInferMeta
(
const
MetaTensor
&
input
,
const
std
::
vector
<
int
>&
paddings
,
float
pad_value
,
MetaTensor
*
out
,
MetaConfig
config
=
MetaConfig
());
void
PixelShuffleInferMeta
(
const
MetaTensor
&
x
,
int
upscale_factor
,
const
std
::
string
&
data_format
,
MetaTensor
*
out
);
void
RealAndImagInferMeta
(
const
MetaTensor
&
x
,
MetaTensor
*
out
);
void
ReduceInferMeta
(
const
MetaTensor
&
x
,
const
std
::
vector
<
int64_t
>&
axis
,
bool
keep_dim
,
MetaTensor
*
out
);
void
ReduceInferMetaBase
(
const
MetaTensor
&
x
,
const
std
::
vector
<
int64_t
>&
axis
,
bool
keep_dim
,
bool
reduce_all
,
MetaTensor
*
out
);
void
ReshapeInferMeta
(
const
MetaTensor
&
x
,
const
ScalarArray
&
shape
,
MetaTensor
*
out
,
...
...
@@ -100,50 +138,63 @@ void ReshapeWithXShapeInferMeta(const MetaTensor& x,
MetaTensor
*
out
,
MetaConfig
config
=
MetaConfig
());
void
TileInferMeta
(
const
MetaTensor
&
x
,
const
ScalarArray
&
repeat_times
,
void
ShardIndexInferMeta
(
const
MetaTensor
&
in
,
int
index_num
,
int
nshards
,
int
shard_id
,
int
ignore_value
,
MetaTensor
*
out
,
MetaConfig
config
=
MetaConfig
());
void
SumRawInferMeta
(
const
MetaTensor
&
x
,
void
SizeInferMeta
(
const
MetaTensor
&
input
,
MetaTensor
*
out
);
void
SoftmaxInferMeta
(
const
MetaTensor
&
x
,
int
axis
,
MetaTensor
*
out
);
void
SplitInferMeta
(
const
MetaTensor
&
x_meta
,
const
ScalarArray
&
num_or_sections
,
const
Scalar
&
axis
,
std
::
vector
<
MetaTensor
*>
out
,
MetaConfig
config
=
MetaConfig
());
void
SumInferMeta
(
const
MetaTensor
&
x
,
const
std
::
vector
<
int64_t
>&
axis
,
bool
keep_dim
,
bool
reduce_all
,
DataType
dtype
,
bool
keep_dim
,
MetaTensor
*
out
);
void
ReduceInferMetaBase
(
const
MetaTensor
&
x
,
void
SumRawInferMeta
(
const
MetaTensor
&
x
,
const
std
::
vector
<
int64_t
>&
axis
,
bool
keep_dim
,
bool
reduce_all
,
DataType
dtype
,
MetaTensor
*
out
);
void
Reduc
eInferMeta
(
const
MetaTensor
&
x
,
const
std
::
vector
<
int64_t
>&
axi
s
,
bool
keep_dim
,
MetaTensor
*
out
);
void
Til
eInferMeta
(
const
MetaTensor
&
x
,
const
ScalarArray
&
repeat_time
s
,
MetaTensor
*
out
,
MetaConfig
config
=
MetaConfig
()
);
void
SumInferMeta
(
const
MetaTensor
&
x
,
const
std
::
vector
<
int64_t
>&
axis
,
DataType
dtype
,
bool
keep_dim
,
MetaTensor
*
out
);
void
TraceInferMeta
(
const
MetaTensor
&
x
,
int
offset
,
int
axis1
,
int
axis2
,
MetaTensor
*
out
);
void
TransferLayoutInferMeta
(
const
MetaTensor
&
x
,
DataLayout
layout
,
MetaTensor
*
out
);
void
SplitInferMeta
(
const
MetaTensor
&
x_meta
,
const
ScalarArray
&
num_or_sections
,
const
Scalar
&
axis
,
std
::
vector
<
MetaTensor
*>
out
,
MetaConfig
config
=
MetaConfig
());
void
TransposeInferMeta
(
const
MetaTensor
&
x
,
const
std
::
vector
<
int
>&
axis
,
MetaTensor
*
out
);
void
UnbindInferMeta
(
const
MetaTensor
&
x
,
int
axis
,
std
::
vector
<
MetaTensor
>*
outs
);
void
TraceInferMeta
(
const
MetaTensor
&
x
,
int
offset
,
int
axis1
,
int
axis2
,
MetaTensor
*
out
);
void
UnchangedInferMeta
(
const
MetaTensor
&
x
,
MetaTensor
*
out
);
// meta x -> out without change, check if axis in range [-Rank(x), Rank(x)-1]
void
UnchangedInferMetaCheckAxis
(
const
MetaTensor
&
x
,
int
axis
,
MetaTensor
*
out
);
void
UnfoldInferMeta
(
const
MetaTensor
&
x
,
const
std
::
vector
<
int
>&
kernel_sizes
,
...
...
@@ -153,56 +204,6 @@ void UnfoldInferMeta(const MetaTensor& x,
MetaTensor
*
out
,
MetaConfig
config
=
MetaConfig
());
void
DiagInferMeta
(
const
MetaTensor
&
x
,
int
offset
,
float
padding_value
,
MetaTensor
*
out
);
void
ArgMinMaxInferMeta
(
const
MetaTensor
&
x
,
int64_t
axis
,
bool
keepdims
,
bool
flatten
,
int
dtype
,
MetaTensor
*
out
,
MetaConfig
config
=
MetaConfig
());
void
SizeInferMeta
(
const
MetaTensor
&
input
,
MetaTensor
*
out
);
void
PadInferMeta
(
const
MetaTensor
&
input
,
const
std
::
vector
<
int
>&
paddings
,
float
pad_value
,
MetaTensor
*
out
,
MetaConfig
config
=
MetaConfig
());
void
DiagonalInferMeta
(
const
MetaTensor
&
input
,
int
offset
,
int
axis1
,
int
axis2
,
MetaTensor
*
out
);
void
PixelShuffleInferMeta
(
const
MetaTensor
&
x
,
int
upscale_factor
,
const
std
::
string
&
data_format
,
MetaTensor
*
out
);
void
IsfiniteInferMeta
(
const
MetaTensor
&
input
,
MetaTensor
*
out
);
void
TransposeInferMeta
(
const
MetaTensor
&
x
,
const
std
::
vector
<
int
>&
axis
,
MetaTensor
*
out
);
void
EighInferMeta
(
const
MetaTensor
&
x
,
const
std
::
string
&
uplo
,
MetaTensor
*
out_w
,
MetaTensor
*
out_v
);
void
WhereIndexInferMeta
(
const
MetaTensor
&
condition
,
MetaTensor
*
out
);
void
ShardIndexInferMeta
(
const
MetaTensor
&
in
,
int
index_num
,
int
nshards
,
int
shard_id
,
int
ignore_value
,
MetaTensor
*
out
,
MetaConfig
config
=
MetaConfig
());
void
SoftmaxInferMeta
(
const
MetaTensor
&
x
,
int
axis
,
MetaTensor
*
out
);
}
// namespace phi
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录