【发布时间】:2018-06-11 06:40:02
【问题描述】:
我有一个 Python 代码,我想用 nvprof 或 visual profiler 进行分析,
我想知道我的代码使用了多少线程?
我需要 Linux 命令。
使用这个命令:
sudo dmidecode -t 4 | egrep -i "Designation|Intel|core|thread"
为我获取此信息,但不适用于我的代码:
Socket Designation: CPU1
Manufacturer: Intel
HTT (Multi-threading)
Version: Intel(R) Xeon(R) CPU E5-2697 v3 @ 2.60GHz
Core Count: 14
Core Enabled: 14
Thread Count: 28
Multi-Core
Hardware Thread
Socket Designation: CPU2
Manufacturer: Intel
HTT (Multi-threading)
Version: Intel(R) Xeon(R) CPU E5-2697 v3 @ 2.60GHz
Core Count: 14
Core Enabled: 14
Thread Count: 28
Multi-Core
Hardware Thread
我想知道我的 Python 代码使用了多少线程。
【问题讨论】: