-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enable benchmark resnet with MKLDNN #5422
Conversation
benchmark/paddle/image/run_mkldnn.sh
Outdated
train vgg 128 True | ||
train vgg 256 True | ||
total_cores=`ls -l /sys/devices/system/cpu/ | grep "cpu[0-9]*$" | wc -l` | ||
online_cores=`cat /sys/devices/system/cpu/cpu*/online | grep -o '1' | wc -l` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我在服务器Intel(R) Xeon(R) CPU E5-2620 v2 @ 2.10GHz 上运行42和43行:
- 42行是12
- 43行是11
这样说明是关了超线程?
上次的测试中,超线程的影响不是很大。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
上次的测试是因为还有操作系统的因素在里面。并且,在后面高端处理器中这个配置还是会有一定影响的。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这两个命令,对docker和mac都适用么
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docker我试了是可以的,但是我这边没有mac,没有测试过。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mac上面测试会报错/sys/devices/system/cpu/: No such file or directory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
谢谢,那请问下,这几个命令有效吗?
grep 'physical id' /proc/cpuinfo |sort -u|wc -l
grep "cpu cores" /proc/cpuinfo|uniq
grep -c processor /proc/cpuinfo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
上面这个命令也是不行的,都会报错:/proc/cpuinfo: No such file or directory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嗯,是的,我后来也查到了,所以我还是删除了这里HT的判断,免得把事情弄麻烦了。谢谢
benchmark/paddle/image/run_mkldnn.sh
Outdated
# resnet-50, 101 and 152 | ||
train resnet 50 $batchsize $use_mkldnn | ||
train resnet 101 $batchsize $use_mkldnn | ||
train resnet 152 $batchsize $use_mkldnn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 这里需要测那么多?那这一个脚本跑下来太久了。vgg和resnet各选一个就够了。
- 个人觉得原来全部写开比较好,方便选择和测试,因为还有一个openblas版本要测。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以各选一个。
另外关于openblas的测试,只需要第一个for那里去掉True就好了,这样改动也挺少的。不然你还是要删除好几行。
并且加一个topology,每个batchsize需要写一行,这样省code。
@luotao1 对于HT的判断,由于在Mac上比较麻烦做到兼容,也有点得不偿失,所以还是去掉了自动判断,保留了以前的做法。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.