Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
6efb9f59
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看板
未验证
提交
6efb9f59
编写于
1月 26, 2022
作者:
Y
yaozhixin
提交者:
GitHub
1月 26, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update uts p1 (#39210)
上级
fd44de58
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
43 addition
and
42 deletion
+43
-42
python/paddle/fluid/tests/unittests/ipu/ernie_training.py
python/paddle/fluid/tests/unittests/ipu/ernie_training.py
+9
-10
python/paddle/fluid/tests/unittests/ipu/test_activation_x_op.py
.../paddle/fluid/tests/unittests/ipu/test_activation_x_op.py
+2
-2
python/paddle/fluid/tests/unittests/ipu/test_avg_shard_ipu.py
...on/paddle/fluid/tests/unittests/ipu/test_avg_shard_ipu.py
+6
-4
python/paddle/fluid/tests/unittests/ipu/test_batch_norm_op_ipu.py
...addle/fluid/tests/unittests/ipu/test_batch_norm_op_ipu.py
+2
-2
python/paddle/fluid/tests/unittests/ipu/test_cast_op_ipu.py
python/paddle/fluid/tests/unittests/ipu/test_cast_op_ipu.py
+2
-2
python/paddle/fluid/tests/unittests/ipu/test_concat_op_ipu.py
...on/paddle/fluid/tests/unittests/ipu/test_concat_op_ipu.py
+2
-2
python/paddle/fluid/tests/unittests/ipu/test_conv_op_ipu.py
python/paddle/fluid/tests/unittests/ipu/test_conv_op_ipu.py
+2
-2
python/paddle/fluid/tests/unittests/ipu/test_cross_entropy2_op_ipu.py
...e/fluid/tests/unittests/ipu/test_cross_entropy2_op_ipu.py
+2
-2
python/paddle/fluid/tests/unittests/ipu/test_dropout_op_ipu.py
...n/paddle/fluid/tests/unittests/ipu/test_dropout_op_ipu.py
+2
-2
python/paddle/fluid/tests/unittests/ipu/test_elemetwise_x_op_ipu.py
...dle/fluid/tests/unittests/ipu/test_elemetwise_x_op_ipu.py
+2
-2
python/paddle/fluid/tests/unittests/ipu/test_equal_op_ipu.py
python/paddle/fluid/tests/unittests/ipu/test_equal_op_ipu.py
+2
-2
python/paddle/fluid/tests/unittests/ipu/test_expand_op_ipu.py
...on/paddle/fluid/tests/unittests/ipu/test_expand_op_ipu.py
+4
-4
python/paddle/fluid/tests/unittests/ipu/test_fill_constant_op_ipu.py
...le/fluid/tests/unittests/ipu/test_fill_constant_op_ipu.py
+2
-2
python/paddle/fluid/tests/unittests/ipu/test_gather_op_ipu.py
...on/paddle/fluid/tests/unittests/ipu/test_gather_op_ipu.py
+2
-2
python/paddle/fluid/tests/unittests/ipu/test_gelu_op_ipu.py
python/paddle/fluid/tests/unittests/ipu/test_gelu_op_ipu.py
+2
-2
未找到文件。
python/paddle/fluid/tests/unittests/ipu/ernie_training.py
浏览文件 @
6efb9f59
...
...
@@ -856,16 +856,15 @@ if __name__ == "__main__":
paddle
.
static
.
load
(
main_prog
,
"model/ernie"
)
if
args
.
run_on_ipu
:
ipu_strategy
=
compiler
.
get_ipu_strategy
()
ipu_strategy
.
num_ipus
=
args
.
num_ipus
ipu_strategy
.
enable_manual_shard
=
args
.
num_ipus
>
1
ipu_strategy
.
enable_pipelining
=
args
.
enable_pipelining
if
args
.
enable_pipelining
:
if
args
.
is_training
:
ipu_strategy
.
batches_per_step
=
args
.
num_ipus
+
1
else
:
ipu_strategy
.
batches_per_step
=
args
.
num_ipus
ipu_strategy
.
is_training
=
args
.
is_training
ipu_strategy
=
paddle
.
static
.
IpuStrategy
()
ipu_strategy
.
SetGraphConfig
(
num_ipus
=
args
.
num_ipus
,
is_training
=
args
.
is_training
,
enable_manual_shard
=
args
.
num_ipus
>
1
)
ipu_strategy
.
SetPipeliningConfig
(
enable_pipelining
=
args
.
enable_pipelining
,
batches_per_step
=
args
.
num_ipus
+
1
)
ipu_compiler
=
compiler
.
IPUCompiledProgram
(
main_prog
,
ipu_strategy
=
ipu_strategy
)
program
=
ipu_compiler
.
compile
(
feed_list
,
fetch_list
)
...
...
python/paddle/fluid/tests/unittests/ipu/test_activation_x_op.py
浏览文件 @
6efb9f59
...
...
@@ -72,8 +72,8 @@ class TestRelu(IPUOpTest):
if
run_ipu
:
feed_list
=
self
.
feed_list
ipu_strategy
=
compiler
.
get_ipu_s
trategy
()
ipu_strategy
.
is_training
=
self
.
is_training
ipu_strategy
=
paddle
.
static
.
IpuS
trategy
()
ipu_strategy
.
SetGraphConfig
(
is_training
=
self
.
is_training
)
program
=
compiler
.
IpuCompiler
(
main_prog
,
ipu_strategy
=
ipu_strategy
).
compile
(
feed_list
,
fetch_list
)
...
...
python/paddle/fluid/tests/unittests/ipu/test_avg_shard_ipu.py
浏览文件 @
6efb9f59
...
...
@@ -81,10 +81,12 @@ class TestBase(IPUOpTest):
if
run_ipu
:
feed_list
=
self
.
feed_list
ipu_strategy
=
compiler
.
get_ipu_strategy
()
ipu_strategy
.
is_training
=
self
.
is_training
# enable avg shard pass
ipu_strategy
.
need_avg_shard
=
True
ipu_strategy
=
paddle
.
static
.
IpuStrategy
()
ipu_strategy
.
SetGraphConfig
(
num_ipus
=
2
,
is_training
=
self
.
is_training
,
enable_manual_shard
=
True
,
need_avg_shard
=
True
)
program
=
compiler
.
IPUCompiledProgram
(
main_prog
,
ipu_strategy
=
ipu_strategy
).
compile
(
feed_list
,
fetch_list
)
...
...
python/paddle/fluid/tests/unittests/ipu/test_batch_norm_op_ipu.py
浏览文件 @
6efb9f59
...
...
@@ -79,8 +79,8 @@ class TestBase(IPUOpTest):
if
run_ipu
:
feed_list
=
self
.
feed_list
ipu_strategy
=
compiler
.
get_ipu_s
trategy
()
ipu_strategy
.
is_training
=
self
.
is_training
ipu_strategy
=
paddle
.
static
.
IpuS
trategy
()
ipu_strategy
.
SetGraphConfig
(
is_training
=
self
.
is_training
)
program
=
compiler
.
IPUCompiledProgram
(
main_prog
,
ipu_strategy
=
ipu_strategy
).
compile
(
feed_list
,
fetch_list
)
...
...
python/paddle/fluid/tests/unittests/ipu/test_cast_op_ipu.py
浏览文件 @
6efb9f59
...
...
@@ -81,8 +81,8 @@ class TestBase(IPUOpTest):
if
run_ipu
:
feed_list
=
self
.
feed_list
ipu_strategy
=
compiler
.
get_ipu_s
trategy
()
ipu_strategy
.
is_training
=
self
.
is_training
ipu_strategy
=
paddle
.
static
.
IpuS
trategy
()
ipu_strategy
.
SetGraphConfig
(
is_training
=
self
.
is_training
)
program
=
compiler
.
IPUCompiledProgram
(
main_prog
,
ipu_strategy
=
ipu_strategy
).
compile
(
feed_list
,
fetch_list
)
...
...
python/paddle/fluid/tests/unittests/ipu/test_concat_op_ipu.py
浏览文件 @
6efb9f59
...
...
@@ -83,8 +83,8 @@ class TestBase(IPUOpTest):
if
run_ipu
:
feed_list
=
self
.
feed_list
ipu_strategy
=
compiler
.
get_ipu_s
trategy
()
ipu_strategy
.
is_training
=
self
.
is_training
ipu_strategy
=
paddle
.
static
.
IpuS
trategy
()
ipu_strategy
.
SetGraphConfig
(
is_training
=
self
.
is_training
)
program
=
compiler
.
IPUCompiledProgram
(
main_prog
,
ipu_strategy
=
ipu_strategy
).
compile
(
feed_list
,
fetch_list
)
...
...
python/paddle/fluid/tests/unittests/ipu/test_conv_op_ipu.py
浏览文件 @
6efb9f59
...
...
@@ -81,8 +81,8 @@ class TestBase(IPUOpTest):
if
run_ipu
:
feed_list
=
self
.
feed_list
ipu_strategy
=
compiler
.
get_ipu_s
trategy
()
ipu_strategy
.
is_training
=
self
.
is_training
ipu_strategy
=
paddle
.
static
.
IpuS
trategy
()
ipu_strategy
.
SetGraphConfig
(
is_training
=
self
.
is_training
)
program
=
compiler
.
IPUCompiledProgram
(
main_prog
,
ipu_strategy
=
ipu_strategy
).
compile
(
feed_list
,
fetch_list
)
...
...
python/paddle/fluid/tests/unittests/ipu/test_cross_entropy2_op_ipu.py
浏览文件 @
6efb9f59
...
...
@@ -93,8 +93,8 @@ class TestBase(IPUOpTest):
if
run_ipu
:
feed_list
=
self
.
feed_list
ipu_strategy
=
compiler
.
get_ipu_s
trategy
()
ipu_strategy
.
is_training
=
self
.
is_training
ipu_strategy
=
paddle
.
static
.
IpuS
trategy
()
ipu_strategy
.
SetGraphConfig
(
is_training
=
self
.
is_training
)
program
=
compiler
.
IPUCompiledProgram
(
main_prog
,
ipu_strategy
=
ipu_strategy
).
compile
(
feed_list
,
fetch_list
)
...
...
python/paddle/fluid/tests/unittests/ipu/test_dropout_op_ipu.py
浏览文件 @
6efb9f59
...
...
@@ -83,8 +83,8 @@ class TestBase(IPUOpTest):
if
run_ipu
:
feed_list
=
self
.
feed_list
ipu_strategy
=
compiler
.
get_ipu_s
trategy
()
ipu_strategy
.
is_training
=
self
.
is_training
ipu_strategy
=
paddle
.
static
.
IpuS
trategy
()
ipu_strategy
.
SetGraphConfig
(
is_training
=
self
.
is_training
)
program
=
compiler
.
IPUCompiledProgram
(
main_prog
,
ipu_strategy
=
ipu_strategy
).
compile
(
feed_list
,
fetch_list
)
...
...
python/paddle/fluid/tests/unittests/ipu/test_elemetwise_x_op_ipu.py
浏览文件 @
6efb9f59
...
...
@@ -75,8 +75,8 @@ class TestMul(IPUOpTest):
if
run_ipu
:
feed_list
=
self
.
feed_list
ipu_strategy
=
compiler
.
get_ipu_s
trategy
()
ipu_strategy
.
is_training
=
self
.
is_training
ipu_strategy
=
paddle
.
static
.
IpuS
trategy
()
ipu_strategy
.
SetGraphConfig
(
is_training
=
self
.
is_training
)
program
=
compiler
.
IPUCompiledProgram
(
main_prog
,
ipu_strategy
=
ipu_strategy
).
compile
(
feed_list
,
fetch_list
)
...
...
python/paddle/fluid/tests/unittests/ipu/test_equal_op_ipu.py
浏览文件 @
6efb9f59
...
...
@@ -84,8 +84,8 @@ class TestBase(IPUOpTest):
if
run_ipu
:
feed_list
=
self
.
feed_list
ipu_strategy
=
compiler
.
get_ipu_s
trategy
()
ipu_strategy
.
is_training
=
self
.
is_training
ipu_strategy
=
paddle
.
static
.
IpuS
trategy
()
ipu_strategy
.
SetGraphConfig
(
is_training
=
self
.
is_training
)
program
=
compiler
.
IPUCompiledProgram
(
main_prog
,
ipu_strategy
=
ipu_strategy
).
compile
(
feed_list
,
fetch_list
)
...
...
python/paddle/fluid/tests/unittests/ipu/test_expand_op_ipu.py
浏览文件 @
6efb9f59
...
...
@@ -76,8 +76,8 @@ class TestBase(IPUOpTest):
if
run_ipu
:
feed_list
=
self
.
feed_list
ipu_strategy
=
compiler
.
get_ipu_s
trategy
()
ipu_strategy
.
is_training
=
self
.
is_training
ipu_strategy
=
paddle
.
static
.
IpuS
trategy
()
ipu_strategy
.
SetGraphConfig
(
is_training
=
self
.
is_training
)
program
=
compiler
.
IPUCompiledProgram
(
main_prog
,
ipu_strategy
=
ipu_strategy
).
compile
(
feed_list
,
fetch_list
)
...
...
@@ -142,8 +142,8 @@ class TestCase1(TestBase):
if
run_ipu
:
feed_list
=
self
.
feed_list
ipu_strategy
=
compiler
.
get_ipu_s
trategy
()
ipu_strategy
.
is_training
=
self
.
is_training
ipu_strategy
=
paddle
.
static
.
IpuS
trategy
()
ipu_strategy
.
SetGraphConfig
(
is_training
=
self
.
is_training
)
program
=
compiler
.
IPUCompiledProgram
(
main_prog
,
ipu_strategy
=
ipu_strategy
).
compile
(
feed_list
,
fetch_list
)
...
...
python/paddle/fluid/tests/unittests/ipu/test_fill_constant_op_ipu.py
浏览文件 @
6efb9f59
...
...
@@ -78,8 +78,8 @@ class TestBase(IPUOpTest):
if
run_ipu
:
feed_list
=
self
.
feed_list
ipu_strategy
=
compiler
.
get_ipu_s
trategy
()
ipu_strategy
.
is_training
=
self
.
is_training
ipu_strategy
=
paddle
.
static
.
IpuS
trategy
()
ipu_strategy
.
SetGraphConfig
(
is_training
=
self
.
is_training
)
program
=
compiler
.
IPUCompiledProgram
(
main_prog
,
ipu_strategy
=
ipu_strategy
).
compile
(
feed_list
,
fetch_list
)
...
...
python/paddle/fluid/tests/unittests/ipu/test_gather_op_ipu.py
浏览文件 @
6efb9f59
...
...
@@ -83,8 +83,8 @@ class TestBase(IPUOpTest):
if
run_ipu
:
feed_list
=
self
.
feed_list
ipu_strategy
=
compiler
.
get_ipu_s
trategy
()
ipu_strategy
.
is_training
=
self
.
is_training
ipu_strategy
=
paddle
.
static
.
IpuS
trategy
()
ipu_strategy
.
SetGraphConfig
(
is_training
=
self
.
is_training
)
program
=
compiler
.
IPUCompiledProgram
(
main_prog
,
ipu_strategy
=
ipu_strategy
).
compile
(
feed_list
,
fetch_list
)
...
...
python/paddle/fluid/tests/unittests/ipu/test_gelu_op_ipu.py
浏览文件 @
6efb9f59
...
...
@@ -81,8 +81,8 @@ class TestBase(IPUOpTest):
if
run_ipu
:
feed_list
=
self
.
feed_list
ipu_strategy
=
compiler
.
get_ipu_s
trategy
()
ipu_strategy
.
is_training
=
self
.
is_training
ipu_strategy
=
paddle
.
static
.
IpuS
trategy
()
ipu_strategy
.
SetGraphConfig
(
is_training
=
self
.
is_training
)
program
=
compiler
.
IPUCompiledProgram
(
main_prog
,
ipu_strategy
=
ipu_strategy
).
compile
(
feed_list
,
fetch_list
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录