那么,这个 AVX 的东西 - 它就像每个核心的小型机器?或者它就像整个 CPU 的一个引擎单元?
比如,我可以以某种方式在每个核心上使用它吗?我正在玩它,我觉得我可能会“过度使用”它并造成某种瓶颈。
你能解释一下吗?我都弄错了吗?
如何计算英特尔(R)酷睿(TM)i7-3770 CPU的单精度数据和双精度数据的峰值性能.linux的"cat/proc/cpuinfo"是下面的,这是最后一个:
processor : 7
vendor_id : GenuineIntel
cpu family : 6
model : 58
model name : Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
stepping : 9
microcode : 0x10
cpu MHz : 1600.000
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 3
cpu cores : 4
apicid : 7
initial apicid : 7
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse …Run Code Online (Sandbox Code Playgroud) 我正在尝试编写一个与numpy.sum双精度数组一样快的 C 程序,但似乎失败了。
以下是我衡量 numpy 性能的方法:
import numpy as np
import time
SIZE=4000000
REPS=5
xs = np.random.rand(SIZE)
print(xs.dtype)
for _ in range(REPS):
start = time.perf_counter()
r = np.sum(xs)
end = time.perf_counter()
print(f"{SIZE / (end-start) / 10**6:.2f} MFLOPS ({r:.2f})")
Run Code Online (Sandbox Code Playgroud)
输出是:
float64
2941.61 MFLOPS (2000279.78)
3083.56 MFLOPS (2000279.78)
3406.18 MFLOPS (2000279.78)
3712.33 MFLOPS (2000279.78)
3661.15 MFLOPS (2000279.78)
Run Code Online (Sandbox Code Playgroud)
现在尝试在 C 中做类似的事情:
float64
2941.61 MFLOPS (2000279.78)
3083.56 MFLOPS (2000279.78)
3406.18 MFLOPS (2000279.78)
3712.33 MFLOPS (2000279.78)
3661.15 MFLOPS (2000279.78)
Run Code Online (Sandbox Code Playgroud)
编译并gcc -o main …
我一直在寻找第3代和第4代处理器之间的区别.任何人都能告诉我第四代处理器的优点是什么.
1.6GHz的第四代处理器是否优于第三代2.4GHz?
谢谢