frontier scripts

This commit is contained in:
Carl Pearson
2023-10-09 17:04:07 -04:00
parent d19fcf17c4
commit 90b1286205
29 changed files with 265804 additions and 380 deletions

108
results/figs.py Normal file
View File

@@ -0,0 +1,108 @@
from pathlib import Path
import json
from dataclasses import dataclass
import numpy as np
import matplotlib.pyplot as plt
RESULTS_DIR = Path(__file__).parent
## Read all data
data = {}
for e in RESULTS_DIR.iterdir():
if e.suffix != ".json":
continue
print(f'load {e}')
with open(e, 'r') as f:
try:
res = json.load(f)
except json.decoder.JSONDecodeError as e:
print(f"SKIP - incorrect formatting")
continue
benchmarks = res["benchmarks"]
for benchmark in benchmarks:
run_type = benchmark["run_type"]
if run_type == "iteration":
run_name = benchmark["run_name"]
if "Comm_prefetch_managed_GPUToGPU/0/0" in run_name:
continue
elif "/0/0/" in run_name:
continue
xs, ys = data.get(run_name, ([],[]))
ys += [benchmark["real_time"]]
xs += [int(benchmark["bytes"])]
data[run_name] = (xs, ys)
## compute aggregates
for name, (xs, ys) in data.items():
assert all(xs[0] == x_i for x_i in xs)
b = xs[0] # bytes
times = ys
bws = [b / y for y in ys]
times_mean = np.mean(times)
times_stddev = np.std(times)
bws_mean = np.mean(bws)
bws_stddev = np.std(bws)
data[name] = (b, times_mean, times_stddev, bws_mean, bws_stddev)
## split data by name
series = {}
for name, point in data.items():
name, f1, f2 = name.split("/")[0:3]
# expect these to be ints
f1 = int(f1)
f2 = int(f2)
name = "/".join((name, str(f1), str(f2)))
s = series.get(name, [])
s += [point]
series[name] = s
# sort all series
for name, points in series.items():
series[name] = sorted(points, key=lambda p: p[0])
# split to x,t, terr, bw, bwerr
for name, points in series.items():
# [(x,y,z), ...] -> ([x...], [y...], [z...])
x, t, terr, bw, bwerr = zip(*points)
series[name] = (x, t, terr, bw, bwerr)
# print(series)
for name, (x, t, terr, bw, bwerr) in series.items():
plt.errorbar(x, bw, yerr=bwerr, label=name)
for pattern in [
"hipManaged_HostToGPUWriteDst",
"hipMemcpyAsync_GPUToGPU",
"hipMemcpyAsync_GPUToPageable",
"hipMemcpyAsync_GPUToPinned",
"implicit_managed_GPURdHost_coarse",
"implicit_managed_GPURdHost_fine",
"implicit_managed_GPUWrGPU_coarse",
"implicit_managed_GPUWrGPU_fine",
"implicit_mapped_GPURdHost",
"prefetch_managed_GPUToGPU",
"prefetch_managed_GPUToHost",
]:
plt.clf()
for name, (x, t, terr, bw, bwerr) in series.items():
if pattern not in name:
continue
plt.errorbar(x, bw, yerr=bwerr, label=name)
output_path = f"{pattern}.pdf"
print(f"write {output_path}")
plt.xscale('log')
lgd = plt.legend(bbox_to_anchor=(1.04, 1))
plt.tight_layout()
plt.savefig(output_path, bbox_extra_artists=(lgd,), bbox_inches='tight')

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,38 @@
{
"context": {
"date": "2023-10-09T16:54:29-04:00",
"host_name": "frontier01017",
"executable": "/lustre/orion/csc465/scratch/cpearson/frontier-gpu-bandwidth/build/comm_scope",
"num_cpus": 128,
"mhz_per_cpu": 1813,
"cpu_scaling_enabled": false,
"caches": [
{
"type": "Data",
"level": 1,
"size": 32768,
"num_sharing": 2
},
{
"type": "Instruction",
"level": 1,
"size": 32768,
"num_sharing": 2
},
{
"type": "Unified",
"level": 2,
"size": 524288,
"num_sharing": 2
},
{
"type": "Unified",
"level": 3,
"size": 33554432,
"num_sharing": 16
}
],
"load_avg": [12.35,15.21,12.5],
"library_build_type": "release"
},
"benchmarks": [

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,38 @@
{
"context": {
"date": "2023-10-09T16:41:39-04:00",
"host_name": "frontier06647",
"executable": "/lustre/orion/csc465/scratch/cpearson/frontier-gpu-bandwidth/build/comm_scope",
"num_cpus": 128,
"mhz_per_cpu": 1798,
"cpu_scaling_enabled": false,
"caches": [
{
"type": "Data",
"level": 1,
"size": 32768,
"num_sharing": 2
},
{
"type": "Instruction",
"level": 1,
"size": 32768,
"num_sharing": 2
},
{
"type": "Unified",
"level": 2,
"size": 524288,
"num_sharing": 2
},
{
"type": "Unified",
"level": 3,
"size": 33554432,
"num_sharing": 16
}
],
"load_avg": [1.31,5.45,4.52],
"library_build_type": "release"
},
"benchmarks": [

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

2
results/requirements.txt Normal file
View File

@@ -0,0 +1,2 @@
matplotlib
numpy