Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
月光在发光
Paddle
提交
47d1d5af
P
Paddle
项目概览
月光在发光
/
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,体验更适合开发者的 AI 搜索 >>
未验证
提交
47d1d5af
编写于
3月 08, 2022
作者:
Z
zyfncg
提交者:
GitHub
3月 08, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[PHI] Support string type attr in yaml (#40218)
* support str attr in yaml * fix bug
上级
061044a0
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
13 addition
and
11 deletion
+13
-11
paddle/fluid/eager/auto_code_generator/final_state_generator/eager_gen.py
...er/auto_code_generator/final_state_generator/eager_gen.py
+2
-2
python/paddle/utils/code_gen/api.yaml
python/paddle/utils/code_gen/api.yaml
+2
-2
python/paddle/utils/code_gen/api_base.py
python/paddle/utils/code_gen/api_base.py
+8
-6
python/paddle/utils/code_gen/sparse_api.yaml
python/paddle/utils/code_gen/sparse_api.yaml
+1
-1
未找到文件。
paddle/fluid/eager/auto_code_generator/final_state_generator/eager_gen.py
浏览文件 @
47d1d5af
...
...
@@ -25,10 +25,10 @@ core_ops_args_type_info = {}
yaml_types_mapping
=
{
'int'
:
'int'
,
'int32
_t'
:
'int32_t'
,
'int64_t
'
:
'int64_t'
,
'size_t'
:
'size_t'
,
\
'int'
:
'int'
,
'int32
'
:
'int32_t'
,
'int64
'
:
'int64_t'
,
'size_t'
:
'size_t'
,
\
'float'
:
'float'
,
'double'
:
'double'
,
'bool'
:
'bool'
,
\
'Backend'
:
'paddle::experimental::Backend'
,
'DataLayout'
:
'paddle::experimental::DataLayout'
,
'DataType'
:
'paddle::experimental::DataType'
,
\
'int64
_t
[]'
:
'std::vector<int64_t>'
,
'int[]'
:
'std::vector<int>'
,
'int64[]'
:
'std::vector<int64_t>'
,
'int[]'
:
'std::vector<int>'
,
'Tensor'
:
'Tensor'
,
'Tensor[]'
:
'std::vector<Tensor>'
,
'Tensor[Tensor[]]'
:
'std::vector<std::vector<Tensor>>'
,
...
...
python/paddle/utils/code_gen/api.yaml
浏览文件 @
47d1d5af
...
...
@@ -121,7 +121,7 @@
backward
:
matmul_grad
-
api
:
mean
args
:
(Tensor x, int64
_t
[] axis={}, bool keep_dim=false)
args
:
(Tensor x, int64[] axis={}, bool keep_dim=false)
output
:
Tensor
infer_meta
:
func
:
MeanInferMeta
...
...
@@ -181,7 +181,7 @@
func
:
subtract
-
api
:
sum
args
:
(Tensor x, int64
_t
[] axis={}, DataType dtype=DataType::UNDEFINED, bool keep_dim=false)
args
:
(Tensor x, int64[] axis={}, DataType dtype=DataType::UNDEFINED, bool keep_dim=false)
output
:
Tensor
infer_meta
:
func
:
SumInferMeta
...
...
python/paddle/utils/code_gen/api_base.py
浏览文件 @
47d1d5af
...
...
@@ -89,18 +89,20 @@ class BaseAPI(object):
attr_types_map
=
{
'ScalarArray'
:
'const ScalarArray&'
,
'Scalar'
:
'const Scalar&'
,
'uint8'
:
'uint8_t'
,
'int'
:
'int'
,
'int32
_t
'
:
'int32_t'
,
'int64
_t
'
:
'int64_t'
,
'int32'
:
'int32_t'
,
'int64'
:
'int64_t'
,
'long'
:
'long'
,
'size_t'
:
'size_t'
,
'float'
:
'float'
,
'double'
:
'double'
,
'bool'
:
'bool'
,
'str'
:
'const std::string&'
,
'Backend'
:
'Backend'
,
'DataLayout'
:
'DataLayout'
,
'DataType'
:
'DataType'
,
'int64
_t
[]'
:
'const std::vector<int64_t>&'
,
'int64[]'
:
'const std::vector<int64_t>&'
,
'int[]'
:
'const std::vector<int>&'
,
'long[]'
:
'const std::vector<int64_t>&'
}
...
...
@@ -110,8 +112,8 @@ class BaseAPI(object):
'ScalarArray'
:
'const paddle::optional<ScalarArray>&'
,
'Scalar'
:
'const paddle::optional<Scalar>&'
,
'int'
:
'paddle::optional<int>'
,
'int32
_t
'
:
'paddle::optional<int32_t>'
,
'int64
_t
'
:
'paddle::optional<int64_t>'
,
'int32'
:
'paddle::optional<int32_t>'
,
'int64'
:
'paddle::optional<int64_t>'
,
'size_t'
:
'paddle::optional<size_t>'
,
'float'
:
'paddle::optional<float>'
,
'double'
:
'paddle::optional<double>'
,
...
...
@@ -119,7 +121,7 @@ class BaseAPI(object):
'Backend'
:
'paddle::optional<Backend>'
,
'DataLayout'
:
'paddle::optional<DataLayout>'
,
'DataType'
:
'paddle::optional<DataType>'
,
'int64
_t
[]'
:
'paddle::optional<std::vector<int64_t>>'
,
'int64[]'
:
'paddle::optional<std::vector<int64_t>>'
,
'int[]'
:
'paddle::optional<std::vector<int>>'
}
...
...
python/paddle/utils/code_gen/sparse_api.yaml
浏览文件 @
47d1d5af
...
...
@@ -11,7 +11,7 @@
invoke
:
to_dense_impl(x, backend)
-
sparse_api
:
to_sparse_coo
args
:
(Tensor x, Backend backend, int64
_t
sparse_dim)
args
:
(Tensor x, Backend backend, int64 sparse_dim)
output
:
Tensor(out@SparseCooTensor)
invoke
:
to_sparse_coo_impl(x, backend, sparse_dim)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录