Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
49638f25
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看板
未验证
提交
49638f25
编写于
6月 24, 2021
作者:
J
Jiangxinz
提交者:
GitHub
6月 24, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix undef var (#33691)
上级
56692f66
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
9 addition
and
4 deletion
+9
-4
python/paddle/distributed/fleet/launch_utils.py
python/paddle/distributed/fleet/launch_utils.py
+4
-3
python/paddle/fluid/tests/unittests/asp/test_asp_pruning_1d.py
...n/paddle/fluid/tests/unittests/asp/test_asp_pruning_1d.py
+1
-0
python/paddle/fluid/tests/unittests/asp/test_asp_pruning_2d_greedy.py
...e/fluid/tests/unittests/asp/test_asp_pruning_2d_greedy.py
+1
-0
python/paddle/fluid/tests/unittests/parallel_dygraph_transformer.py
...dle/fluid/tests/unittests/parallel_dygraph_transformer.py
+1
-0
python/paddle/fluid/tests/unittests/xpu/test_batch_norm_op_xpu.py
...addle/fluid/tests/unittests/xpu/test_batch_norm_op_xpu.py
+1
-1
tools/CrossStackProfiler/NetFileReader.py
tools/CrossStackProfiler/NetFileReader.py
+1
-0
未找到文件。
python/paddle/distributed/fleet/launch_utils.py
浏览文件 @
49638f25
...
...
@@ -29,6 +29,7 @@ import struct
import
paddle
import
paddle.fluid
as
fluid
from
distutils.util
import
strtobool
logger
=
logging
.
getLogger
(
"root"
)
logger
.
propagate
=
False
...
...
@@ -349,7 +350,7 @@ def add_arguments(argname, type, default, help, argparser, **kwargs):
add_argument("name", str, "Jonh", "User name.", parser)
args = parser.parse_args()
"""
type
=
distutils
.
util
.
strtobool
if
type
==
bool
else
type
type
=
strtobool
if
type
==
bool
else
type
argparser
.
add_argument
(
"--"
+
argname
,
default
=
default
,
...
...
@@ -685,7 +686,7 @@ def get_device_proc_info(args):
gpus
=
get_gpus
(
args
.
gpus
)
if
args
.
nproc_per_node
is
not
None
:
assert
(
len
(
gpus
)
%
int
(
args
.
nproc_per_node
))
==
0
,
\
"gpus' number:{} mod args.nproc_per_node:{} must == 0"
.
format
(
len
(
gpus
),
arg
.
nproc_per_node
)
"gpus' number:{} mod args.nproc_per_node:{} must == 0"
.
format
(
len
(
gpus
),
arg
s
.
nproc_per_node
)
n
=
int
(
len
(
gpus
)
/
int
(
args
.
nproc_per_node
))
devices_per_proc
=
[
...
...
@@ -699,7 +700,7 @@ def get_device_proc_info(args):
xpus
=
get_xpus
(
args
.
xpus
)
if
args
.
nproc_per_node
is
not
None
:
assert
(
len
(
xpus
)
%
int
(
args
.
nproc_per_node
))
==
0
,
\
"xpus' number:{} mod args.nproc_per_node:{} must == 0"
.
format
(
len
(
xpus
),
arg
.
nproc_per_node
)
"xpus' number:{} mod args.nproc_per_node:{} must == 0"
.
format
(
len
(
xpus
),
arg
s
.
nproc_per_node
)
n
=
int
(
len
(
xpus
)
/
int
(
args
.
nproc_per_node
))
devices_per_proc
=
[
...
...
python/paddle/fluid/tests/unittests/asp/test_asp_pruning_1d.py
浏览文件 @
49638f25
...
...
@@ -15,6 +15,7 @@
from
__future__
import
print_function
import
unittest
import
paddle
from
paddle.fluid.contrib
import
sparsity
from
paddle.fluid.tests.unittests.asp.asp_pruning_base
import
TestASPHelperPruningBase
...
...
python/paddle/fluid/tests/unittests/asp/test_asp_pruning_2d_greedy.py
浏览文件 @
49638f25
...
...
@@ -15,6 +15,7 @@
from
__future__
import
print_function
import
unittest
import
paddle
from
paddle.fluid.contrib
import
sparsity
from
paddle.fluid.tests.unittests.asp.asp_pruning_base
import
TestASPHelperPruningBase
...
...
python/paddle/fluid/tests/unittests/parallel_dygraph_transformer.py
浏览文件 @
49638f25
...
...
@@ -20,6 +20,7 @@ import six
import
paddle
import
paddle.fluid
as
fluid
from
paddle.fluid.dygraph
import
Embedding
,
LayerNorm
,
Linear
,
to_variable
,
Layer
from
paddle.optimizer.lr
import
NoamDecay
from
test_dist_base
import
runtime_main
,
TestParallelDyGraphRunnerBase
"""
...
...
python/paddle/fluid/tests/unittests/xpu/test_batch_norm_op_xpu.py
浏览文件 @
49638f25
...
...
@@ -141,7 +141,7 @@ class TestXPUBatchNormOp(unittest.TestCase):
else
:
raise
ValueError
(
"Unsupported data layout! Only NCHW and NHWC is supported, but received "
+
data_layout
)
+
self
.
data_layout
)
np
.
random
.
seed
(
1024
)
self
.
x_np
=
np
.
random
.
random_sample
(
self
.
shape
).
astype
(
self
.
dtype
)
self
.
scale_np
=
np
.
random
.
random_sample
(
...
...
tools/CrossStackProfiler/NetFileReader.py
浏览文件 @
49638f25
...
...
@@ -17,6 +17,7 @@ import json
import
glob
import
logging
import
pandas
as
pd
import
multiprocessing
from
multiprocessing
import
Process
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录