Commit 6a554713 authored by LongChan's avatar LongChan
Browse files

Fixing scrip's path

parent e092c33a
......@@ -16,9 +16,36 @@ We provide a fast optimization algorithm and a step-to-step guide on how to gene
- [] Changes done to ScaleSim
- [] Explanation of the testing result
### Demos:
### Demos
The following demos use pre-generated datasets and topologies that can be found in:
### Step-by-step guide:
- [~/optimization_algo/topologies](~/optimization_algo/topologies/) contains all the topologies descriping their respective CNN structures
- [~/optimization_algo/data_source](~/optimization_algo/data_source/) contains all the cycle-accurate data generated using [SCALE sim]()
The instruction below will do a sweep run on each of the following networks:
- FasterRCNN
- Mobilenet
- Yolo tiny
- Googlenet
- Alexnet
- AlphaGoZero
- NCF_rec
- Resnet_50_v1
To run individual
To get optimization result with
1. CMA
```bash
# cd optimization_algo/scripts
# ./sweep_nets_cma.sh
```
2. Brute Force
```bash
# cd optimization_algo/scripts
# ./sweep_nets_.sh
```
#### Custom topologies
#### Custom target board
......
import sys
import time
import csv
import path_constant as pc
from tqdm import tqdm
from itertools import combinations
......@@ -172,7 +173,7 @@ if __name__ == "__main__":
number_of_partition = k,
max_res_available = max_res_unit, initial_res = 0,
res_step = 1,
res_step = 1
)
# bf.generate_gene()
......
......@@ -49,7 +49,7 @@ class cma_approach(object):
def parse_topology_file(self):
layers = []
with open(self.topology_file, 'r') as f:
with open(pc.TOPOLOGIES_PATH+self.topology_file, 'r') as f:
next(f)
for line in f:
elems = line.strip().split(',')
......@@ -62,7 +62,7 @@ class cma_approach(object):
def parse_data_set_file(self, path_to_data_csv):
first = True
target_idx = 2
with open(path_to_data_csv, 'r') as f:
with open(pc.DATA_SOURCE_PATH+path_to_data_csv, 'r') as f:
for line in f:
elems = line.strip().split(',')
# print(elems)
......@@ -378,8 +378,8 @@ if __name__ == "__main__":
target_col = sys.argv[6]
es_hybird = cma_approach(
path_to_datasrc = pc.DATA_SOURCE_PATH+str(topology)+"_mem_bound.csv",
path_to_topology = pc.TOPOLOGIES_PATH+str(topology)+".csv",
path_to_datasrc = str(topology)+"_mem_bound.csv",
path_to_topology = str(topology)+".csv",
target_col = str(target_col),
number_of_partition = k, max_iteration = 10000,
......
This diff is collapsed.
......@@ -10,13 +10,13 @@ do
for res_unit in 960;
do
for target in DRAM_cycle;
do
do
echo $net $partitions $target
python3 brute_force_approach.py \
${net} \
${partitions} \
${res_unit} \
${target}
done
done
done
done
\ No newline at end of file
......@@ -14,7 +14,7 @@ do
for target in DRAM_cycle;
do
echo $net $partitions $target
python3 brute_force_approach.py \
python3 ../approaches/brute_force_approach.py \
${net} \
${partitions} \
${res_unit} \
......
......@@ -24,16 +24,16 @@ do
for res_unit in 960;
do
for target in DRAM_cycle Cycles;
do
echo $net $partitions $strategy
python3 ../approaches/cma_approach.py \
${net} \
${partitions} \
${popsize} \
${res_unit} \
${strategy} \
${target}
done
do
echo $net $partitions $strategy
python3 ../approaches/cma_approach.py \
${net} \
${partitions} \
${popsize} \
${res_unit} \
${strategy} \
${target}
done
done
done
done
......
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