Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
83d0d853
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看板
未验证
提交
83d0d853
编写于
1月 26, 2022
作者:
Y
yaozhixin
提交者:
GitHub
1月 26, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update uts p2 (#39232)
上级
42a0947e
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
43 addition
and
40 deletion
+43
-40
python/paddle/fluid/tests/unittests/ipu/test_groupnorm_op_ipu.py
...paddle/fluid/tests/unittests/ipu/test_groupnorm_op_ipu.py
+2
-2
python/paddle/fluid/tests/unittests/ipu/test_instancenorm_op_ipu.py
...dle/fluid/tests/unittests/ipu/test_instancenorm_op_ipu.py
+2
-2
python/paddle/fluid/tests/unittests/ipu/test_ipu_batchs_per_step_simple.py
...id/tests/unittests/ipu/test_ipu_batchs_per_step_simple.py
+8
-3
python/paddle/fluid/tests/unittests/ipu/test_ipu_fp16_support.py
...paddle/fluid/tests/unittests/ipu/test_ipu_fp16_support.py
+3
-3
python/paddle/fluid/tests/unittests/ipu/test_ipu_inference_model_io.py
.../fluid/tests/unittests/ipu/test_ipu_inference_model_io.py
+5
-4
python/paddle/fluid/tests/unittests/ipu/test_ipu_model_pipeline.py
...ddle/fluid/tests/unittests/ipu/test_ipu_model_pipeline.py
+3
-5
python/paddle/fluid/tests/unittests/ipu/test_ipu_strategy.py
python/paddle/fluid/tests/unittests/ipu/test_ipu_strategy.py
+4
-5
python/paddle/fluid/tests/unittests/ipu/test_layernorm_op_ipu.py
...paddle/fluid/tests/unittests/ipu/test_layernorm_op_ipu.py
+2
-2
python/paddle/fluid/tests/unittests/ipu/test_log_softmax_op_ipu.py
...ddle/fluid/tests/unittests/ipu/test_log_softmax_op_ipu.py
+2
-2
python/paddle/fluid/tests/unittests/ipu/test_lookuptable_op_ipu.py
...ddle/fluid/tests/unittests/ipu/test_lookuptable_op_ipu.py
+2
-2
python/paddle/fluid/tests/unittests/ipu/test_lr_sheduelr.py
python/paddle/fluid/tests/unittests/ipu/test_lr_sheduelr.py
+2
-2
python/paddle/fluid/tests/unittests/ipu/test_matmul_op_ipu.py
...on/paddle/fluid/tests/unittests/ipu/test_matmul_op_ipu.py
+2
-2
python/paddle/fluid/tests/unittests/ipu/test_mean_op_ipu.py
python/paddle/fluid/tests/unittests/ipu/test_mean_op_ipu.py
+2
-2
python/paddle/fluid/tests/unittests/ipu/test_mul_op_ipu.py
python/paddle/fluid/tests/unittests/ipu/test_mul_op_ipu.py
+2
-2
python/paddle/fluid/tests/unittests/ipu/test_pool_avg_op_ipu.py
.../paddle/fluid/tests/unittests/ipu/test_pool_avg_op_ipu.py
+2
-2
未找到文件。
python/paddle/fluid/tests/unittests/ipu/test_groupnorm_op_ipu.py
浏览文件 @
83d0d853
...
...
@@ -101,8 +101,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_instancenorm_op_ipu.py
浏览文件 @
83d0d853
...
...
@@ -97,8 +97,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_ipu_batchs_per_step_simple.py
浏览文件 @
83d0d853
...
...
@@ -62,9 +62,14 @@ class TestFunc(unittest.TestCase):
if
run_ipu
:
feed_list
=
[
image
.
name
]
fetch_list
=
[
out
.
name
]
ipu_strategy
=
compiler
.
get_ipu_strategy
()
ipu_strategy
.
is_training
=
False
ipu_strategy
.
batches_per_step
=
bps
ipu_strategy
=
paddle
.
static
.
IpuStrategy
()
ipu_strategy
.
SetGraphConfig
(
num_ipus
=
2
,
is_training
=
False
,
enable_manual_shard
=
True
,
need_avg_shard
=
True
)
ipu_strategy
.
SetPipeliningConfig
(
enable_pipelinin
=
True
,
batches_per_step
=
bps
)
program
=
compiler
.
IPUCompiledProgram
(
main_prog
,
ipu_strategy
=
ipu_strategy
).
compile
(
feed_list
,
fetch_list
)
...
...
python/paddle/fluid/tests/unittests/ipu/test_ipu_fp16_support.py
浏览文件 @
83d0d853
...
...
@@ -83,9 +83,9 @@ class TestBase(IPUOpTest):
feed
=
self
.
feed_ipu
if
run_ipu
else
self
.
feed_cpu
if
run_ipu
:
feed_list
=
self
.
feed_list
ipu_strategy
=
compiler
.
get_ipu_s
trategy
()
ipu_strategy
.
is_training
=
False
ipu_strategy
.
enable_fp16
=
True
ipu_strategy
=
paddle
.
static
.
IpuS
trategy
()
ipu_strategy
.
SetGraphConfig
(
is_training
=
False
)
ipu_strategy
.
SetHalfConfig
(
enable_fp16
=
True
)
program
=
compiler
.
IPUCompiledProgram
(
main_prog
,
ipu_strategy
=
ipu_strategy
).
compile
(
feed_list
,
fetch_list
)
...
...
python/paddle/fluid/tests/unittests/ipu/test_ipu_inference_model_io.py
浏览文件 @
83d0d853
...
...
@@ -94,8 +94,9 @@ class TestBase(IPUOpTest):
exe
=
paddle
.
static
.
Executor
(
place
)
exe
.
run
(
startup_prog
)
ipu_strategy
=
compiler
.
get_ipu_strategy
()
ipu_strategy
.
is_training
=
self
.
attrs
[
'is_training'
]
ipu_strategy
=
paddle
.
static
.
IpuStrategy
()
ipu_strategy
.
SetGraphConfig
(
is_training
=
self
.
attrs
[
'is_training'
])
program
=
compiler
.
IPUCompiledProgram
(
main_prog
,
ipu_strategy
=
ipu_strategy
).
compile
(
self
.
feed_list
,
fetch_list
)
...
...
@@ -123,8 +124,8 @@ class TestBase(IPUOpTest):
if
run_ipu
:
feed_list
=
feed_target_names
fetch_list
=
[
fetch_targets
[
0
].
name
]
ipu_strategy
=
compiler
.
get_ipu_s
trategy
()
ipu_strategy
.
is_training
=
False
ipu_strategy
=
paddle
.
static
.
IpuS
trategy
()
ipu_strategy
.
SetGraphConfig
(
is_training
=
False
)
program
=
compiler
.
IPUCompiledProgram
(
inference_program
,
ipu_strategy
=
ipu_strategy
).
compile
(
feed_list
,
fetch_list
)
...
...
python/paddle/fluid/tests/unittests/ipu/test_ipu_model_pipeline.py
浏览文件 @
83d0d853
...
...
@@ -59,11 +59,9 @@ class TestCastNet(unittest.TestCase):
if
run_ipu
:
feed_list
=
[
image
.
name
]
fetch_list
=
[
loss
.
name
]
ipu_strategy
=
compiler
.
get_ipu_strategy
()
ipu_strategy
.
num_ipus
=
2
ipu_strategy
.
is_training
=
False
ipu_strategy
.
enable_manual_shard
=
True
ipu_strategy
.
enable_pipelining
=
False
ipu_strategy
=
paddle
.
static
.
IpuStrategy
()
ipu_strategy
.
SetGraphConfig
(
num_ipus
=
2
,
is_training
=
False
,
enable_manual_shard
=
True
)
program
=
compiler
.
IPUCompiledProgram
(
main_prog
,
ipu_strategy
=
ipu_strategy
).
compile
(
feed_list
,
fetch_list
)
...
...
python/paddle/fluid/tests/unittests/ipu/test_ipu_strategy.py
浏览文件 @
83d0d853
...
...
@@ -29,7 +29,7 @@ SEED = 2021
"core is not compiled with IPU"
)
class
TestConvNet
(
unittest
.
TestCase
):
def
test_training
(
self
):
ipu_strategy
=
compiler
.
get_ipu_s
trategy
()
ipu_strategy
=
paddle
.
static
.
IpuS
trategy
()
assert
ipu_strategy
.
num_ipus
==
1
,
"Default num_ipus must be 1"
assert
ipu_strategy
.
is_training
==
True
,
"Default is_training is True"
...
...
@@ -38,17 +38,16 @@ class TestConvNet(unittest.TestCase):
assert
ipu_strategy
.
enable_manual_shard
==
False
,
\
"Default enable_manual_shard is False"
ipu_strategy
.
num_ipus
=
2
ipu_strategy
.
SetGraphConfig
(
num_ipus
=
2
,
is_training
=
False
,
enable_manual_shard
=
True
)
ipu_strategy
.
SetPipeliningConfig
(
enable_pipelining
=
True
)
assert
ipu_strategy
.
num_ipus
==
2
,
"Set num_ipus Failed"
ipu_strategy
.
is_training
=
False
assert
ipu_strategy
.
is_training
==
False
,
"Set is_training Failed"
ipu_strategy
.
enable_pipelining
=
True
assert
ipu_strategy
.
enable_pipelining
==
True
,
\
"Set enable_pipelining Failed"
ipu_strategy
.
enable_manual_shard
=
True
assert
ipu_strategy
.
enable_manual_shard
==
True
,
\
"Set enable_manual_shard Failed"
...
...
python/paddle/fluid/tests/unittests/ipu/test_layernorm_op_ipu.py
浏览文件 @
83d0d853
...
...
@@ -104,8 +104,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_log_softmax_op_ipu.py
浏览文件 @
83d0d853
...
...
@@ -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_lookuptable_op_ipu.py
浏览文件 @
83d0d853
...
...
@@ -96,8 +96,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_lr_sheduelr.py
浏览文件 @
83d0d853
...
...
@@ -70,8 +70,8 @@ class TestConvNet(unittest.TestCase):
if
run_ipu
:
feed_list
=
[
image
.
name
]
fetch_list
=
[
loss
.
name
]
ipu_strategy
=
compiler
.
get_ipu_s
trategy
()
ipu_strategy
.
is_training
=
True
ipu_strategy
=
paddle
.
static
.
IpuS
trategy
()
ipu_strategy
.
SetGraphConfig
(
is_training
=
True
)
program
=
compiler
.
IPUCompiledProgram
(
main_prog
,
ipu_strategy
=
ipu_strategy
).
compile
(
feed_list
,
fetch_list
)
...
...
python/paddle/fluid/tests/unittests/ipu/test_matmul_op_ipu.py
浏览文件 @
83d0d853
...
...
@@ -87,8 +87,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_mean_op_ipu.py
浏览文件 @
83d0d853
...
...
@@ -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
)
...
...
python/paddle/fluid/tests/unittests/ipu/test_mul_op_ipu.py
浏览文件 @
83d0d853
...
...
@@ -86,8 +86,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_pool_avg_op_ipu.py
浏览文件 @
83d0d853
...
...
@@ -87,8 +87,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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录