Commit 7bf04590 authored by harry1080ti's avatar harry1080ti
Browse files

need to add more stuff

parent ed680c94
[general]
run_name = "US_9x960_ws"
[architecture_presets]
ArrayHeight: 9
ArrayWidth: 960
IfmapSramSz: 33750
FilterSramSz: 2250
OfmapSramSz: 36000
IfmapOffset: 0
FilterOffset: 10000000
OfmapOffset: 20000000
IfmapSramSz: 33750
FilterSramSz: 2250
OfmapSramSz: 36000
Dataflow: ws
\ No newline at end of file
#!/bin/bash
# ./generate_data_set.sh configs/US_sim.cfg topologies/960_DNN/Alexnet.csv
if [ "$1" != "" ]; then
python3 scale.py -arch_config=$1 -network=$2 -ultraScale=False -enable_mp=True -custom_mem_size=True
else
echo "Positional parameter 1 is empty"
fi
\ No newline at end of file
......@@ -15,6 +15,7 @@ flags.DEFINE_string("network","./max_util_topologies/ws/max_util_ws_1920/Googlen
flags.DEFINE_boolean("ultraScale",False,"whether to allow using ultrascale or not")
flags.DEFINE_boolean("rmtrace",True,"whether to remove trace or not")
flags.DEFINE_boolean("enable_mp",False,"whether to enable multi-processing or not")
flags.DEFINE_boolean("custom_mem_size",False,"whether to enable customize memory size or not")
class scale:
def __init__(self, sweep = False, save = False):
......@@ -243,6 +244,14 @@ class scale:
print("************ SCALE SIM Run", ar_dim, "Complete ****************")
return ar_dim
def res_enough(self, ar_dim):
# 4032 RAMB18k
# 9024 DSP48 slices
# enough_DSP = 9024 > (ar_dim[0] * ar_dim[1])
# enough_RAM = 4032 > ar_dim[1] * ((ar_dim[0] * ar_dim[1]) % 3)
# return enough_DSP and enough_RAM
return (ar_dim[0] * ar_dim[1]) < (9 * 1920)
def run_mp_sweep(self):
# python3 scale.py -arch_config=configs/US_sim.cfg -network=topologies/alexnet.csv -ultraScale=False -enable_mp=True
......@@ -251,8 +260,14 @@ class scale:
all_arr_dim_list = []
for i in range(1920):
all_arr_dim_list.append((9, i+1))
# 9024 / 3 = 3008
for k in range(6, 3009):
for i in range(1, int(3008 / (k * 3))):
if self.res_enough((k * 3, i)):
all_arr_dim_list.append((k * 3, i))
# print(all_arr_dim_list)
pool = Pool(processes = 6)
for pro in pool.imap_unordered(self.run_mp_once, all_arr_dim_list):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment