forked from RaRe-Technologies/benchmark_GPU_platforms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot.py
More file actions
28 lines (23 loc) · 1015 Bytes
/
plot.py
File metadata and controls
28 lines (23 loc) · 1015 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.cbook as cbook
cpufile="cpu_perf.out"
cpu = np.genfromtxt(cpufile, delimiter=',',)
gpufile="gpu_perf.out"
gpu = np.genfromtxt(gpufile, delimiter=',',)
cpufile="cpu_perf_rig.out"
cpurig = np.genfromtxt(cpufile, delimiter=',',)
gpufile="gpu_perf_rig_1.out"
gpurig1 = np.genfromtxt(gpufile, delimiter=',',)
gpufile="gpu_perf_rig_2.out"
gpurig2 = np.genfromtxt(gpufile, delimiter=',',)
gpufile="gpu_perf_rig_3.out"
gpurig3 = np.genfromtxt(gpufile, delimiter=',',)
plt.loglog(cpu[:,0],cpu[:,1],'r--', gpu[:,0],gpu[:,1],'bs',cpurig[:,0],cpurig[:,1],'bs',
gpurig1[:,0],gpurig1[:,1],gpurig2[:,0],gpurig2[:,1],gpurig3[:,0],gpurig3[:,1] )
plt.title('Nbody cuda toolkit benchmark')
plt.legend(('laptop cpu i7', 'laptop GPU GTX1050', "cpu rig celeron", "rig GTX1070 1 device", "rig GTX1070 2 devices", "rig GTX1070 3 devices"),
loc='upper left', shadow=True)
plt.xlabel('Bodies (size of Domain)')
plt.ylabel('Elapsed Time (ms)')
plt.show()