-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also include average step synchronization time in collected timing da…
…ta, add scripts for running timing demos scaled over number of LPUs.
- Loading branch information
Showing
7 changed files
with
117 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env python | ||
|
||
""" | ||
Run timing test (non-GPU) scaled over number of LPUs. | ||
""" | ||
|
||
import numpy as np | ||
|
||
import csv | ||
import re | ||
import subprocess | ||
import sys | ||
|
||
script_name = 'timing_demo.py' | ||
|
||
w = csv.writer(sys.stdout) | ||
for lpus in xrange(2, 9): | ||
average_step_sync_time_list = [] | ||
average_throughput_list = [] | ||
total_throughput_list = [] | ||
runtime_list = [] | ||
for i in xrange(3): | ||
out = subprocess.check_output(['srun', '-n', '1', '-c', str(lpus), | ||
'python', script_name, | ||
'-u', str(lpus), '-s', '1000', '-g', '0', | ||
'-m', '100']) | ||
average_step_sync_time, average_throughput, total_throughput, runtime = out.strip('()\n\"').split(', ') | ||
average_step_sync_time_list.append(float(average_step_sync_time)) | ||
average_throughput_list.append(float(average_throughput)) | ||
total_throughput_list.append(float(total_throughput)) | ||
runtime_list.append(float(runtime)) | ||
w.writerow([lpus, | ||
np.average(average_step_sync_time_list), | ||
np.average(average_throughput_list), | ||
np.average(total_throughput_list), | ||
np.average(runtime_list)]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env python | ||
|
||
""" | ||
Run timing test (GPU) scaled over number of LPUs. | ||
""" | ||
|
||
import numpy as np | ||
|
||
import csv | ||
import re | ||
import subprocess | ||
import sys | ||
|
||
script_name = 'timing_demo_gpu.py' | ||
|
||
w = csv.writer(sys.stdout) | ||
for lpus in xrange(2,8): | ||
average_step_sync_time_list = [] | ||
average_throughput_list = [] | ||
total_throughput_list = [] | ||
runtime_list = [] | ||
for i in xrange(2): | ||
out = subprocess.check_output(['srun', '-n', '1', '-c', str(lpus), | ||
'--gres=gpu:%i' % lpus, | ||
'python', script_name, | ||
'-u', str(lpus), '-s', '1000', '-g', '0', '-m', '100']) | ||
average_step_sync_time, average_throughput, total_throughput, runtime = out.strip('()\n\"').split(', ') | ||
average_step_sync_time_list.append(float(average_step_sync_time)) | ||
average_throughput_list.append(float(average_throughput)) | ||
total_throughput_list.append(float(total_throughput)) | ||
runtime_list.append(float(runtime)) | ||
w.writerow([lpus, | ||
np.average(average_step_sync_time_list), | ||
np.average(average_throughput_list), | ||
np.average(total_throughput_list), | ||
np.average(runtime_list)]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters