Commit ad94e11e authored by LongChan's avatar LongChan
Browse files

fixed alexnet, all net gen

parent 9481049e
......@@ -43,7 +43,7 @@ MAX_TRIAL = 20
def trial(prop):
trials = 1
n, part, pop, tar, res, seed = prop
print(prop)
instance = ap.cma_approach(
path_to_datasrc = n+"_square_mem_bound.csv",
path_to_topology = n+".csv",
......@@ -82,8 +82,8 @@ if __name__ == "__main__":
MAX_TRIAL = sys.argv[1]
approaches = []
for idx, n in enumerate(nets):
for part in range(3, max_partitions[idx] + 1):
for idx, n in enumerate(nets[4:5]):
for part in range(3, max_partitions[4:5][idx] + 1):
for seed in seedings:
for pop in pop_size:
for tar in targets:
......@@ -91,10 +91,10 @@ if __name__ == "__main__":
# print(n, part, pop, tar, res, seed)
approaches.append((n, part, pop, tar, res, seed))
pool = Pool(processes = cpu_count() - 4)
pool = Pool(processes = cpu_count() - 2)
for result in pool.imap_unordered(trial, approaches):
with open(pc.RESULT_CSV_PATH+'cma_logmore_sq.csv', 'a') as csvFile:
writer = csv.writer(csvFile, delimiter=',', lineterminator="\n")
writer.writerow(result)
pool.close()
pool.join()
\ No newline at end of file
pool.join()
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