diff --git a/src/common/accelerator.cc b/src/common/accelerator.cc index 4290863..f695d28 100644 --- a/src/common/accelerator.cc +++ b/src/common/accelerator.cc @@ -270,7 +270,7 @@ unsigned accelerator_t::get_total_num_PEs() { rtn *= ((spatial_component_t*)component_list[(unsigned)component_t::CHIP_X])->dim_x * ((spatial_component_t*)component_list[(unsigned)component_t::CHIP_Y])->dim_y; } - return 1; + return rtn; } // Get Total number of CHIP components in accelerator unsigned accelerator_t::get_total_num_chips() { @@ -279,7 +279,7 @@ unsigned accelerator_t::get_total_num_chips() { rtn *= ((spatial_component_t*)component_list[(unsigned)component_t::CHIP_X])->dim_x * ((spatial_component_t*)component_list[(unsigned)component_t::CHIP_Y])->dim_y; } - return 1; + return rtn; } // Get MAC array width (or height) unsigned accelerator_t::get_mac_array_size(dimension_t dim_) { @@ -643,4 +643,4 @@ void accelerator_t::set_bypass(bool* bypass_, std::string value_) { } } return; -} \ No newline at end of file +} diff --git a/src/optimizer/brute_force.cc b/src/optimizer/brute_force.cc index 36d9631..a17e88c 100644 --- a/src/optimizer/brute_force.cc +++ b/src/optimizer/brute_force.cc @@ -180,8 +180,8 @@ void brute_force_t::search(unsigned tid_, for(auto value = row_best.begin(); value != row_best.end(); ++value) { iter_best *= *value; } - // Compare DRAM iteration - if(row_curr < row_best) { + // Change to current scheduling table + if(iter_curr < iter_best) { best_local_scheduling_option = local_scheduling_option; } }