mem_explore not working with 4-level memory
When running mem_explore
with 4-level memory hierarchy, the optimizer errors out.
However, when I run the same configuration using basic
, a result can be produced.
This issue is likely introduced from commit 43208301. The same issue does not exist in interstellar.
Error Messages:
Traceback (most recent call last):
File "../../tools/run_optimizer.py", line 116, in <module>
mem_explore_optimizer(arch_info, network_info, schedule_info, args.verbose)
File "../../tools/run_optimizer.py", line 49, in mem_explore_optimizer
energy, perf = basic_optimizer(arch_info, network_info, schedule_info, False, verbose)
File "../../tools/run_optimizer.py", line 11, in basic_optimizer
resource = cm.Resource.arch(arch_info)
File "/home/users/allpan/ee272-2022/ee272-interstellar/cnn_mapping/resource.py", line 136, in arch
info["parallel_cost"], info["array_dim"], info["utilization_threshold"], info["replication"],info["memory_partitions"], info['invalid_underutilized'])
File "/home/users/allpan/ee272-2022/ee272-interstellar/cnn_mapping/resource.py", line 84, in __init__
buf_access_cost_list, buf_unit_static_cost_list)]
ValueError: cannot copy sequence with size 13 to array axis with dimension 12
Memory architecture:
{
"mem_levels": 4,
"capacity":[8, 32, 65536, 1073741824],
"access_cost":[0.015, 0.06, 13.5, 200],
"static_cost":[0, 0, 0, 0],
"parallel_count":[1, 256, 1, 1],
"mac_capacity":0,
"parallel_mode": [0, 1, 0, 0],
"parallel_cost":[0.035],
"capacity_scale":[2, 2, 2],
"access_cost_scale":[2, 2, 1.5],
"explore_points":[3, 2, 2],
"precision":16
}
Dataflow:
{
"schedule_hint": {
"IC": {
"level1":{
"order":0,
"partitioning_size":16
}
},
"OC": {
"level1":{
"order":1,
"partitioning_size":16
}
}
},
"partition_loops": ["OX", "ON"]
}
Layer:
{
"fmap_width":7,
"fmap_height":7,
"input_fmap_channel":512,
"output_fmap_channel":512,
"window_width":3,
"window_height":3,
"batch_size":16
}