Fix hemera scripts
This commit is contained in:
@ -47,29 +47,29 @@ function bench(func, inputs)
|
||||
)
|
||||
end
|
||||
|
||||
# preparation of machine
|
||||
machine = Machine(
|
||||
[
|
||||
MetagraphOptimization.NumaNode(
|
||||
0,
|
||||
1,
|
||||
MetagraphOptimization.default_strategy(MetagraphOptimization.NumaNode),
|
||||
-1.0,
|
||||
UUIDs.uuid1(),
|
||||
),
|
||||
],
|
||||
[-1.0;;],
|
||||
)
|
||||
|
||||
# bench and produce data
|
||||
n_inputs = 10_000
|
||||
n_inputs = 50_000
|
||||
optimizer = ReductionOptimizer()
|
||||
processes = [("ke->kke", 50), ("ke->ke", 1), ("ke->kke", 1), ("ke->kkke", 5), ("ke->kkkke", 5), ("ke->kkkkke", 10), ("ke->kkkkkke", 20)]
|
||||
processes = [("ke->kke", 5), ("ke->ke", 1), ("ke->kke", 1), ("ke->kkke", 1), ("ke->kkkke", 1), ("ke->kkkkke", 1)]
|
||||
|
||||
for (process_str, STEPSIZE) in processes
|
||||
n = 0
|
||||
opt_time_cum = 0
|
||||
|
||||
# preparation of graph
|
||||
machine = Machine(
|
||||
[
|
||||
MetagraphOptimization.NumaNode(
|
||||
0,
|
||||
1,
|
||||
MetagraphOptimization.default_strategy(MetagraphOptimization.NumaNode),
|
||||
-1.0,
|
||||
UUIDs.uuid1(),
|
||||
),
|
||||
],
|
||||
[-1.0;;],
|
||||
)
|
||||
|
||||
process = parse_process(process_str, QEDModel())
|
||||
graph = gen_graph(process)
|
||||
inputs = [gen_process_input(process) for _ in 1:n_inputs]
|
||||
@ -113,3 +113,51 @@ for (process_str, STEPSIZE) in processes
|
||||
end
|
||||
|
||||
CSV.write(results_filename, df)
|
||||
|
||||
for (process_str, STEPSIZE) in [("AB->AB", 1), ("AB->ABBB", 1), ("AB->ABBBBB", 1)]
|
||||
n = 0
|
||||
opt_time_cum = 0
|
||||
|
||||
process = parse_process(process_str, ABCModel())
|
||||
graph = parse_dag("input/$process_str.txt", ABCModel())
|
||||
inputs = [gen_process_input(process) for _ in 1:n_inputs]
|
||||
|
||||
get_compute_function(graph, process, machine)
|
||||
|
||||
while true
|
||||
func_gen_time = @elapsed func = get_compute_function(graph, process, machine)
|
||||
res = bench(func, inputs)
|
||||
|
||||
graph_properties = get_properties(graph)
|
||||
push!(
|
||||
df,
|
||||
(
|
||||
Threads.nthreads(),
|
||||
process_str,
|
||||
n,
|
||||
opt_time_cum,
|
||||
graph_properties.noNodes,
|
||||
graph_properties.noEdges,
|
||||
graph_properties.computeEffort,
|
||||
graph_properties.data,
|
||||
graph_properties.computeIntensity,
|
||||
func_gen_time,
|
||||
res.cpu_compile_time,
|
||||
res.cpu_single_thread_time,
|
||||
res.cpu_multi_thread_time,
|
||||
res.gpu_compile_time,
|
||||
res.gpu_time,
|
||||
),
|
||||
)
|
||||
CSV.write(results_filename, df)
|
||||
|
||||
if fixpoint_reached(optimizer, graph)
|
||||
break
|
||||
end
|
||||
|
||||
opt_time_cum += @elapsed optimize!(optimizer, graph, STEPSIZE)
|
||||
n += STEPSIZE
|
||||
end
|
||||
end
|
||||
|
||||
CSV.write(results_filename, df)
|
||||
|
@ -50,30 +50,35 @@ function bench(func, inputs)
|
||||
)
|
||||
end
|
||||
|
||||
log("CUDA devices: $(CUDA.devices())")
|
||||
for dev in CUDA.devices()
|
||||
log("CUDA device: $(dev)")
|
||||
end
|
||||
|
||||
|
||||
# preparation of machine
|
||||
machine = Machine(
|
||||
[
|
||||
MetagraphOptimization.NumaNode(
|
||||
0,
|
||||
1,
|
||||
MetagraphOptimization.default_strategy(MetagraphOptimization.NumaNode),
|
||||
-1.0,
|
||||
UUIDs.uuid1(),
|
||||
),
|
||||
],
|
||||
[-1.0;;],
|
||||
)
|
||||
|
||||
|
||||
# bench and produce data
|
||||
n_inputs = 10_000
|
||||
n_inputs = 50_000
|
||||
optimizer = ReductionOptimizer()
|
||||
processes = [("ke->kke", 50), ("ke->ke", 1), ("ke->kke", 1), ("ke->kkke", 1), ("ke->kkkke", 5)]
|
||||
processes = [("ke->kke", 50), ("ke->ke", 1), ("ke->kke", 1), ("ke->kkke", 1)]
|
||||
|
||||
for (process_str, STEPSIZE) in processes
|
||||
n = 0
|
||||
opt_time_cum = 0
|
||||
|
||||
# preparation of graph
|
||||
machine = Machine(
|
||||
[
|
||||
MetagraphOptimization.NumaNode(
|
||||
0,
|
||||
1,
|
||||
MetagraphOptimization.default_strategy(MetagraphOptimization.NumaNode),
|
||||
-1.0,
|
||||
UUIDs.uuid1(),
|
||||
),
|
||||
],
|
||||
[-1.0;;],
|
||||
)
|
||||
process = parse_process(process_str, QEDModel())
|
||||
graph = gen_graph(process)
|
||||
inputs = CuVector([gen_process_input(process) for _ in 1:n_inputs])
|
||||
@ -117,3 +122,51 @@ for (process_str, STEPSIZE) in processes
|
||||
end
|
||||
|
||||
CSV.write(results_filename, df)
|
||||
|
||||
for (process_str, STEPSIZE) in [("AB->AB", 1), ("AB->ABBB", 1), ("AB->ABBBBB", 1)]
|
||||
n = 0
|
||||
opt_time_cum = 0
|
||||
|
||||
process = parse_process(process_str, ABCModel())
|
||||
graph = parse_dag("input/$process_str.txt", ABCModel())
|
||||
inputs = CuVector([gen_process_input(process) for _ in 1:n_inputs])
|
||||
|
||||
get_compute_function(graph, process, machine)
|
||||
|
||||
while true
|
||||
func_gen_time = @elapsed func = get_compute_function(graph, process, machine)
|
||||
res = bench(func, inputs)
|
||||
|
||||
graph_properties = get_properties(graph)
|
||||
push!(
|
||||
df,
|
||||
(
|
||||
Threads.nthreads(),
|
||||
process_str,
|
||||
n,
|
||||
opt_time_cum,
|
||||
graph_properties.noNodes,
|
||||
graph_properties.noEdges,
|
||||
graph_properties.computeEffort,
|
||||
graph_properties.data,
|
||||
graph_properties.computeIntensity,
|
||||
func_gen_time,
|
||||
res.cpu_compile_time,
|
||||
res.cpu_single_thread_time,
|
||||
res.cpu_multi_thread_time,
|
||||
res.gpu_compile_time,
|
||||
res.gpu_time,
|
||||
),
|
||||
)
|
||||
CSV.write(results_filename, df)
|
||||
|
||||
if fixpoint_reached(optimizer, graph)
|
||||
break
|
||||
end
|
||||
|
||||
opt_time_cum += @elapsed optimize!(optimizer, graph, STEPSIZE)
|
||||
n += STEPSIZE
|
||||
end
|
||||
end
|
||||
|
||||
CSV.write(results_filename, df)
|
||||
|
Reference in New Issue
Block a user