Xilinx ZYNQ Ultrascale+ 性能测试之 Memory Stream
John McCalpin “Memory Bandwidth and Machine Balance in High
Performance Computers”, IEEE TCCA Newsletter, December 1995
http://www.cs.virginia.edu/stream/
Xilinx 4EV 上用自帶LMBENCH測(cè)試結(jié)果如下:
# stream STREAM copy latency: 3.84 nanoseconds STREAM copy bandwidth: 4168.29 MB/sec STREAM scale latency: 7.07 nanoseconds STREAM scale bandwidth: 2261.80 MB/sec STREAM add latency: 10.24 nanoseconds STREAM add bandwidth: 2343.75 MB/sec STREAM triad latency: 12.64 nanoseconds STREAM triad bandwidth: 1899.34 MB/sec意義如下:
STREAM: measure memory bandwidth with the operations:
– Copy: a(i) = b(i)
– Scale: a(i) = s * b(i)
– Add: a(i) = b(i) + c(i)
– Triad: a(i) = b(i) + s * c(i)
LMBENCH 的其他測(cè)試結(jié)果如下
# mhz 1199 MHz, 0.8340 nanosec clock # tlb tlb: 10 pages # par_ops integer bit parallelism: 2.65 integer add parallelism: 1.82 integer div parallelism: 1.00 integer mod parallelism: 2.27 int64 bit parallelism: 1.24 int64 add parallelism: 1.82 int64 div parallelism: 1.00 int64 mod parallelism: 1.93 float add parallelism: 7.86 float mul parallelism: 7.90 float div parallelism: 1.30 double add parallelism: 7.86 double mul parallelism: 7.90 double div parallelism: 1.16 #lat_unix AF_UNIX sock stream latency: 16.0409 microseconds自己下載 stream.c
編譯 aarch64-linux-gnu-gcc -O -fopenmp -DNTIME=20 -DSTREAM_ARRAY_SIZE=120000000 stream.c -o stream
拷貝 libgomp.so.1 到 系統(tǒng)中,系統(tǒng)總內(nèi)存4GByte
運(yùn)行結(jié)果如下
如果編譯的時(shí)候加上 -O2 優(yōu)化,速度會(huì)快一點(diǎn)
# OMP_NUM_THREADS=4 ./stream ------------------------------------------------------------- STREAM version $Revision: 5.10 $ ------------------------------------------------------------- This system uses 8 bytes per array element. ------------------------------------------------------------- Array size = 120000000 (elements), Offset = 0 (elements) Memory per array = 915.5 MiB (= 0.9 GiB). Total memory required = 2746.6 MiB (= 2.7 GiB). Each kernel will be executed 10 times.The *best* time for each kernel (excluding the first iteration)will be used to compute the reported bandwidth. ------------------------------------------------------------- Number of Threads requested = 4 Number of Threads counted = 4 ------------------------------------------------------------- Your clock granularity/precision appears to be 1 microseconds. Each test below will take on the order of 278242 microseconds.(= 278242 clock ticks) Increase the size of the arrays if this shows that you are not getting at least 20 clock ticks per test. ------------------------------------------------------------- WARNING -- The above is only a rough guideline. For best results, please be sure you know the precision of your system timer. ------------------------------------------------------------- Function Best Rate MB/s Avg time Min time Max time Copy: 9413.4 0.205417 0.203965 0.207202 Scale: 7896.5 0.248300 0.243145 0.253207 Add: 7482.3 0.385689 0.384909 0.387379 Triad: 6004.8 0.481600 0.479614 0.483516 ------------------------------------------------------------- Solution Validates: avg error less than 1.000000e-13 on all three arrays -------------------------------------------------------------如果開4個(gè)線程,CPU占 100%,單線程占 25%,速度要下降一半
4K60的每秒數(shù)據(jù)為 3840 * 2160 * 60=497664000=475M
每個(gè)像素按YUV422,占 16bit = 2Byte,拷貝一次帶寬需要 950MByte/s
總結(jié)
以上是生活随笔為你收集整理的Xilinx ZYNQ Ultrascale+ 性能测试之 Memory Stream的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: rbf神经网络 c语言,RBF神经网络极
- 下一篇: 邮箱怎么打开smtp服务器端口号,什么是