in astra-sim-alibabacloud/astra-sim/system/Sys.cc [808:860]
bool Sys::post_process_inputs() {
all_reduce_implementation_per_dimension =
generate_collective_implementation_from_input(
inp_all_reduce_implementation);
if (all_reduce_implementation_per_dimension.size() == 0) {
sys_panic("unknown value for all-reduce-implementation in sys input file");
}
reduce_scatter_implementation_per_dimension =
generate_collective_implementation_from_input(
inp_reduce_scatter_implementation);
if (reduce_scatter_implementation_per_dimension.size() == 0) {
sys_panic(
"unknown value for reduce-scatter-implementation in sys input file");
}
all_gather_implementation_per_dimension =
generate_collective_implementation_from_input(
inp_all_gather_implementation);
if (all_gather_implementation_per_dimension.size() == 0) {
sys_panic("unknown value for all-gather-implementation in sys input file");
}
all_to_all_implementation_per_dimension =
generate_collective_implementation_from_input(
inp_all_to_all_implementation);
if (all_to_all_implementation_per_dimension.size() == 0) {
sys_panic("unknown value for all-to-all-implementation in sys input file");
}
if (inp_collective_optimization == "baseline") {
collectiveOptimization = CollectiveOptimization::Baseline;
} else if (inp_collective_optimization == "localBWAware") {
collectiveOptimization = CollectiveOptimization::LocalBWAware;
} else {
sys_panic("unknown value for collective optimization in sys input file");
}
if (inp_boost_mode == 1) {
boost_mode = true;
} else {
boost_mode = false;
}
if (inp_scheduling_policy == "LIFO") {
this->scheduling_policy = SchedulingPolicy::LIFO;
} else if (inp_scheduling_policy == "FIFO") {
this->scheduling_policy = SchedulingPolicy::FIFO;
} else {
sys_panic("unknown value for scheduling policy in sys input file");
}
if (inp_model_shared_bus == 1) {
model_shared_bus = true;
} else {
model_shared_bus = false;
}
return true;
}