Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
f792d5f7
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看板
未验证
提交
f792d5f7
编写于
4月 09, 2020
作者:
Z
zhangchunle
提交者:
GitHub
4月 09, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify sampcd_processor.py (#23695)
上级
c9b3bdbf
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
29 addition
and
6 deletion
+29
-6
tools/sampcd_processor.py
tools/sampcd_processor.py
+29
-6
未找到文件。
tools/sampcd_processor.py
浏览文件 @
f792d5f7
...
...
@@ -457,7 +457,9 @@ def get_filenames():
'''
filenames
=
[]
global
methods
global
whl_error
methods
=
[]
whl_error
=
[]
get_incrementapi
()
API_spec
=
'dev_pr_diff_api.spec'
with
open
(
API_spec
)
as
f
:
...
...
@@ -466,6 +468,7 @@ def get_filenames():
try
:
module
=
eval
(
api
).
__module__
except
AttributeError
:
whl_error
.
append
(
api
)
continue
if
len
(
module
.
split
(
'.'
))
>
2
:
filename
=
'../python/'
...
...
@@ -474,8 +477,9 @@ def get_filenames():
filename
=
filename
+
'%s/'
%
module
.
split
(
'.'
)[
i
]
filename
=
filename
+
module_py
else
:
filename
=
''
print
(
"
\n
----Exception in get api filename----
\n
"
)
print
(
"
\n
"
+
api
+
'module is '
+
module
+
"
\n
"
)
print
(
"
\n
"
+
api
+
'
module is '
+
module
+
"
\n
"
)
if
filename
not
in
filenames
:
filenames
.
append
(
filename
)
# get all methods
...
...
@@ -577,7 +581,7 @@ else:
os
.
mkdir
(
"./samplecode_temp"
)
cpus
=
multiprocessing
.
cpu_count
()
filenames
=
get_filenames
()
if
len
(
filenames
)
==
0
:
if
len
(
filenames
)
==
0
and
len
(
whl_error
)
==
0
:
print
(
"-----API_PR.spec is the same as API_DEV.spec-----"
)
exit
(
0
)
elif
'../python/paddle/fluid/core_avx.py'
in
filenames
:
...
...
@@ -605,8 +609,27 @@ else:
os
.
rmdir
(
"./samplecode_temp"
)
print
(
"----------------End of the Check--------------------"
)
for
temp
in
result
:
if
not
temp
:
print
(
"Mistakes found in sample codes"
)
exit
(
1
)
if
len
(
whl_error
)
!=
0
:
print
(
"%s is not in whl."
%
whl_error
)
print
(
""
)
print
(
"Please check the whl package and API_PR.spec!"
)
print
(
"You can follow these steps in order to generate API.spec:"
)
print
(
"1. cd ${paddle_path}, compile paddle;"
)
print
(
"2. pip install build/python/dist/(build whl package);"
)
print
(
"3. run 'python tools/print_signatures.py paddle > paddle/fluid/API.spec'."
)
for
temp
in
result
:
if
not
temp
:
print
(
""
)
print
(
"In addition, mistakes found in sample codes."
)
print
(
"Please check sample codes."
)
print
(
"----------------------------------------------------"
)
exit
(
1
)
else
:
for
temp
in
result
:
if
not
temp
:
print
(
"Mistakes found in sample codes."
)
print
(
"Please check sample codes."
)
exit
(
1
)
print
(
"Sample code check is successful!"
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录