Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
35ae1027
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看板
未验证
提交
35ae1027
编写于
9月 04, 2020
作者:
I
iducn
提交者:
GitHub
9月 04, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add shell of CPU's version info (#26937)
上级
fcb2ac60
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
50 addition
and
0 deletion
+50
-0
paddle/scripts/paddle_build.sh
paddle/scripts/paddle_build.sh
+1
-0
tools/get_cpu_info.sh
tools/get_cpu_info.sh
+49
-0
未找到文件。
paddle/scripts/paddle_build.sh
浏览文件 @
35ae1027
...
...
@@ -1421,6 +1421,7 @@ function main() {
init
if
[
"
$CMD
"
!=
"assert_file_approvals"
]
;
then
python
${
PADDLE_ROOT
}
/tools/summary_env.py
bash
${
PADDLE_ROOT
}
/tools/get_cpu_info.sh
fi
case
$CMD
in
build_only
)
...
...
tools/get_cpu_info.sh
0 → 100755
浏览文件 @
35ae1027
#!/bin/bash
if
[
"
`
uname
-s
`
"
!=
"Linux"
]
;
then
echo
"Current scenario only support in Linux yet!"
exit
0
fi
echo
"********** Hardware Information **********"
sockets
=
`
grep
'physical id'
/proc/cpuinfo |
sort
-u
|
wc
-l
`
cores_per_socket
=
`
grep
'core id'
/proc/cpuinfo |
sort
-u
|
wc
-l
`
ht
=
`
lscpu |grep
"per core"
|awk
-F
':'
'{print $2}'
|xargs
`
physical_cores
=
$((
sockets
*
cores_per_socket
))
virtual_cores
=
`
grep
'processor'
/proc/cpuinfo |
sort
-u
|
wc
-l
`
numa_nodes
=
`
lscpu |grep
"NUMA node(s)"
|awk
-F
':'
'{print $2}'
|xargs
`
echo
"CPU Name :
`
cat
/proc/cpuinfo |grep
-i
"model name"
|uniq |awk
-F
':'
'{print $2}'
|xargs
`
"
echo
"CPU Family :
`
lscpu |grep
\"
CPU family
\"
|awk
-F
':'
'{print $2}'
|xargs
`
"
echo
"Socket Number :
$sockets
"
echo
"Cores Per Socket :
$cores_per_socket
"
echo
"Total Physical Cores :
$physical_cores
"
echo
"Total Virtual Cores :
$virtual_cores
"
if
[
$ht
-eq
1
]
;
then
echo
"Hyper Threading : OFF"
if
[
$physical_cores
-ne
$virtual_cores
]
;
then
echo
"Error: HT logical error"
fi
else
echo
"Hyper Threading : ON"
if
[
$physical_cores
-ge
$virtual_cores
]
;
then
echo
"Error: HT logical error"
fi
fi
echo
"NUMA Nodes :
$numa_nodes
"
if
[
$numa_nodes
-lt
$sockets
]
;
then
echo
"Warning: NUMA node is not enough for the best performance,
\
at least
$sockets
"
fi
echo
"********** Software Information **********"
echo
"OS Version :
`
cat
/proc/version
`
"
echo
"Kernel Release Version :
`
uname
-r
`
"
echo
"Kernel Patch Version :
`
uname
-v
`
"
echo
"GCC Version :
`
gcc
--version
|
head
-n
1|awk
-F
'\\\(GCC\\\)'
'{print $2}'
`
"
if
command
-v
cmake
>
/dev/null 2>&1
;
then
cmake_ver
=
`
cmake
--version
|
head
-n
1 |
awk
-F
'version'
'{print $2}'
`
else
cmake_ver
=
" Not installed"
fi
echo
"CMake Version :
$cmake_ver
"
echo
"******************************************"
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录