Ubuntu-如何判断CPU应用程序当前是否正在使用AVX或SSE? [英] Ubuntu - how to tell if AVX or SSE, is current being used by CPU app?
问题描述
我目前在具有GPU的许多服务器上运行BOINC.
I current run BOINC across a number of servers which have GPUs.
服务器同时运行GPU和CPU BOINC应用程序.
The servers run both GPU and CPU BOINC apps.
由于AVX和SSE在CPU应用程序中使用时会降低CPU频率,因此我必须选择同时运行哪个CPU/GPU,因为某些GPU应用程序会像其他应用程序那样瓶颈(运行时间完成较慢)不是.
As AVX and SSE slow down the CPU freq when being used within a CPU app, I have to be selective which CPU/GPU I run together, as some GPU apps get bottle necked (slower run time completion) where as others do not.
目前,某些CPU应用已被命名,因此可以清楚地看到它们是否使用了AVX,但大多数都没有.
At present some CPU apps are named so it is clear to see if they use AVX but most are not.
因此,有什么我可以运行的命令以及某种查看方式,以查看当前正在运行的任何CPU应用程序是否正在使用AVX或SSE(任何版本)?
Therefore is there any command I can run, and some way of viewing, to see if any of the CPU apps currently running are using AVX or SSE (any versions)?
此外,我是否应该以相同的方式对待FMA的使用(例如,由于CPU温度升高,它是否会减慢CPU频率)?
Also as a side note, should I treat any FMA usage in the same way (eg does it slow down the CPU freq due to increased CPU temps)?
谢谢
推荐答案
您可以使用 perf top
查看实时执行的AVX和SSE指令的数量以及可执行文件和共享库的名称:
You can use perf top
to see the number of AVX and SSE instructions executed in real-time along with executable and shared library names:
perf top -e fp_arith_inst_retired.128b_packed_single -e fp_arith_inst_retired.128b_packed_double -e fp_arith_inst_retired.256b_packed_single -e fp_arith_inst_retired.256b_packed_double
计数器说明(来自 Perf列表代码>
在Intel Coffee Lake CPU上的输出):
Counter descriptions (from perf list
output on Intel Coffee Lake CPU):
floating point:
fp_arith_inst_retired.128b_packed_double
[Number of SSE/AVX computational 128-bit packed double precision floating-point instructions retired. Each count represents 2 computations. Applies to SSE* and AVX*
packed double precision floating-point instructions: ADD SUB MUL DIV MIN MAX SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform
multiple calculations per element]
fp_arith_inst_retired.128b_packed_single
[Number of SSE/AVX computational 128-bit packed single precision floating-point instructions retired. Each count represents 4 computations. Applies to SSE* and AVX*
packed single precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP RSQRT SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they
perform multiple calculations per element]
fp_arith_inst_retired.256b_packed_double
[Number of SSE/AVX computational 256-bit packed double precision floating-point instructions retired. Each count represents 4 computations. Applies to SSE* and AVX*
packed double precision floating-point instructions: ADD SUB MUL DIV MIN MAX SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform
multiple calculations per element]
fp_arith_inst_retired.256b_packed_single
[Number of SSE/AVX computational 256-bit packed single precision floating-point instructions retired. Each count represents 8 computations. Applies to SSE* and AVX*
packed single precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP RSQRT SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they
perform multiple calculations per element]
fp_arith_inst_retired.scalar_double
[Number of SSE/AVX computational scalar double precision floating-point instructions retired. Each count represents 1 computation. Applies to SSE* and AVX* scalar double
precision floating-point instructions: ADD SUB MUL DIV MIN MAX SQRT FM(N)ADD/SUB. FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element]
fp_arith_inst_retired.scalar_single
[Number of SSE/AVX computational scalar single precision floating-point instructions retired. Each count represents 1 computation. Applies to SSE* and AVX* scalar single
precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP RSQRT SQRT FM(N)ADD/SUB. FM(N)ADD/SUB instructions count twice as they perform multiple calculations
per element]
fp_assist.any
[Cycles with any input/output SSE or FP assist]
这篇关于Ubuntu-如何判断CPU应用程序当前是否正在使用AVX或SSE?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!