Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
25a77450
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看板
未验证
提交
25a77450
编写于
3月 08, 2023
作者:
K
kangguangli
提交者:
GitHub
3月 08, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove with_data_parallel in OpTest (#51237)
上级
2bd63c0c
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
12 addition
and
36 deletion
+12
-36
python/paddle/fluid/tests/unittests/eager_op_test.py
python/paddle/fluid/tests/unittests/eager_op_test.py
+4
-14
python/paddle/fluid/tests/unittests/op_test.py
python/paddle/fluid/tests/unittests/op_test.py
+4
-14
python/paddle/fluid/tests/unittests/parallel_executor_test_base.py
...ddle/fluid/tests/unittests/parallel_executor_test_base.py
+4
-6
python/paddle/fluid/tests/unittests/test_multiprocess_dataloader_dynamic.py
...d/tests/unittests/test_multiprocess_dataloader_dynamic.py
+0
-1
python/paddle/fluid/tests/unittests/test_multiprocess_dataloader_iterable_dataset_dynamic.py
.../test_multiprocess_dataloader_iterable_dataset_dynamic.py
+0
-1
未找到文件。
python/paddle/fluid/tests/unittests/eager_op_test.py
浏览文件 @
25a77450
...
...
@@ -943,11 +943,7 @@ class OpTest(unittest.TestCase):
use_cuda
=
False
if
isinstance
(
place
,
fluid
.
CUDAPlace
):
use_cuda
=
True
compiled_prog
=
fluid
.
CompiledProgram
(
program
).
with_data_parallel
(
loss_name
=
loss
.
name
if
loss
else
None
,
places
=
place
)
compiled_prog
=
fluid
.
CompiledProgram
(
program
)
program
=
compiled_prog
fetch_list
=
getattr
(
self
,
"fetch_list"
,
[])
# if the fetch_list is customized by user, we use it directly.
...
...
@@ -971,9 +967,7 @@ class OpTest(unittest.TestCase):
build_strategy
.
enable_inplace
=
enable_inplace
compiled_prog
=
fluid
.
CompiledProgram
(
program
).
with_data_parallel
(
build_strategy
=
build_strategy
,
places
=
place
program
,
build_strategy
=
build_strategy
)
program
=
compiled_prog
...
...
@@ -1273,9 +1267,7 @@ class OpTest(unittest.TestCase):
build_strategy
=
fluid
.
BuildStrategy
()
build_strategy
.
enable_inplace
=
enable_inplace
compiled_program
=
fluid
.
CompiledProgram
(
grad_program
).
with_data_parallel
(
loss_name
=
""
,
build_strategy
=
build_strategy
,
places
=
place
grad_program
,
build_strategy
=
build_strategy
)
program
=
compiled_program
...
...
@@ -2426,9 +2418,7 @@ class OpTest(unittest.TestCase):
use_cuda
=
False
if
isinstance
(
place
,
fluid
.
CUDAPlace
):
use_cuda
=
True
compiled_prog
=
fluid
.
CompiledProgram
(
prog
).
with_data_parallel
(
loss_name
=
loss
.
name
,
places
=
place
)
compiled_prog
=
fluid
.
CompiledProgram
(
prog
)
prog
=
compiled_prog
executor
=
fluid
.
Executor
(
place
)
res
=
list
(
...
...
python/paddle/fluid/tests/unittests/op_test.py
浏览文件 @
25a77450
...
...
@@ -1041,11 +1041,7 @@ class OpTest(unittest.TestCase):
use_cuda
=
False
if
isinstance
(
place
,
fluid
.
CUDAPlace
):
use_cuda
=
True
compiled_prog
=
fluid
.
CompiledProgram
(
program
).
with_data_parallel
(
loss_name
=
loss
.
name
if
loss
else
None
,
places
=
place
)
compiled_prog
=
fluid
.
CompiledProgram
(
program
)
program
=
compiled_prog
fetch_list
=
getattr
(
self
,
"fetch_list"
,
[])
# if the fetch_list is customized by user, we use it directly.
...
...
@@ -1069,9 +1065,7 @@ class OpTest(unittest.TestCase):
build_strategy
.
enable_inplace
=
enable_inplace
compiled_prog
=
fluid
.
CompiledProgram
(
program
).
with_data_parallel
(
build_strategy
=
build_strategy
,
places
=
place
program
,
build_strategy
=
build_strategy
)
program
=
compiled_prog
...
...
@@ -1371,9 +1365,7 @@ class OpTest(unittest.TestCase):
build_strategy
=
fluid
.
BuildStrategy
()
build_strategy
.
enable_inplace
=
enable_inplace
compiled_program
=
fluid
.
CompiledProgram
(
grad_program
).
with_data_parallel
(
loss_name
=
""
,
build_strategy
=
build_strategy
,
places
=
place
grad_program
,
build_strategy
=
build_strategy
)
program
=
compiled_program
...
...
@@ -2736,9 +2728,7 @@ class OpTest(unittest.TestCase):
use_cuda
=
False
if
isinstance
(
place
,
fluid
.
CUDAPlace
):
use_cuda
=
True
compiled_prog
=
fluid
.
CompiledProgram
(
prog
).
with_data_parallel
(
loss_name
=
loss
.
name
,
places
=
place
)
compiled_prog
=
fluid
.
CompiledProgram
(
prog
)
prog
=
compiled_prog
executor
=
fluid
.
Executor
(
place
)
res
=
list
(
...
...
python/paddle/fluid/tests/unittests/parallel_executor_test_base.py
浏览文件 @
25a77450
...
...
@@ -104,10 +104,9 @@ class TestParallelExecutorBase(unittest.TestCase):
)
if
use_parallel_executor
:
binary
=
compiler
.
CompiledProgram
(
main
).
with_data_parallel
(
loss_name
=
loss
.
name
,
binary
=
compiler
.
CompiledProgram
(
main
,
build_strategy
=
build_strategy
,
exec_strategy
=
exec_strategy
,
)
else
:
binary
=
main
...
...
@@ -204,10 +203,9 @@ class TestParallelExecutorBase(unittest.TestCase):
use_device
,
)
binary
=
compiler
.
CompiledProgram
(
main
).
with_data_parallel
(
loss_name
=
loss
.
name
,
binary
=
compiler
.
CompiledProgram
(
main
,
build_strategy
=
build_strategy
,
exec_strategy
=
exec_strategy
,
)
exe
.
run
(
binary
,
feed
=
feed_dict
,
fetch_list
=
[
loss
.
name
])
...
...
python/paddle/fluid/tests/unittests/test_multiprocess_dataloader_dynamic.py
浏览文件 @
25a77450
...
...
@@ -121,7 +121,6 @@ class TestDygraphDataLoader(unittest.TestCase):
return
ret
def
test_main
(
self
):
# dynamic graph do not run with_data_parallel
for
p
in
prepare_places
():
for
persistent_workers
in
[
False
,
True
]:
results
=
[]
...
...
python/paddle/fluid/tests/unittests/test_multiprocess_dataloader_iterable_dataset_dynamic.py
浏览文件 @
25a77450
...
...
@@ -121,7 +121,6 @@ class TestDygraphDataLoader(unittest.TestCase):
return
ret
def
test_main
(
self
):
# dynamic graph do not run with_data_parallel
for
p
in
prepare_places
():
for
persistent_workers
in
[
False
,
True
]:
results
=
[]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录