in src/torch_ucc.cpp [94:128]
void read_confg() {
// default configuration
torch_ucc_config.blocking_wait.fill(true);
torch_ucc_config.enable_profiling = false;
torch_ucc_config.use_future = true;
torch_ucc_config.shared_comm = false;
torch_ucc_config.use_allgatherv = false;
// read all torch_ucc env. variables and update the map
char* env;
for (auto& torch_ucc_env : torch_ucc_envs_map) {
env = std::getenv(torch_ucc_env.first.c_str());
if (env) {
torch_ucc_envs_map[torch_ucc_env.first] = std::string(env);
}
}
torch_ucc_config.blocking_wait[(std::uint8_t)OpType::ALLGATHER] =
std::stoi(torch_ucc_envs_map.at("TORCH_UCC_ALLGATHER_BLOCKING_WAIT"));
torch_ucc_config.blocking_wait[(std::uint8_t)OpType::ALLREDUCE] =
std::stoi(torch_ucc_envs_map.at("TORCH_UCC_ALLREDUCE_BLOCKING_WAIT"));
torch_ucc_config.blocking_wait[(std::uint8_t)OpType::ALLTOALL_BASE] =
std::stoi(torch_ucc_envs_map.at("TORCH_UCC_ALLTOALL_BLOCKING_WAIT"));
torch_ucc_config.blocking_wait[(std::uint8_t)OpType::BROADCAST] =
std::stoi(torch_ucc_envs_map.at("TORCH_UCC_BCAST_BLOCKING_WAIT"));
torch_ucc_config.blocking_wait[(std::uint8_t)OpType::REDUCE_SCATTER] =
std::stoi(torch_ucc_envs_map.at("TORCH_UCC_REDUCE_SCATTER_BLOCKING_WAIT"));
torch_ucc_config.use_future =
std::stoi(torch_ucc_envs_map.at("TORCH_UCC_USE_FUTURE"));
torch_ucc_config.enable_profiling =
std::stoi(torch_ucc_envs_map.at("TORCH_UCC_PROFILING_ENABLE"));
torch_ucc_config.shared_comm =
std::stoi(torch_ucc_envs_map.at("TORCH_UCC_SHARED_COMM"));
torch_ucc_config.use_allgatherv =
std::stoi(torch_ucc_envs_map.at("TORCH_UCC_USE_ALLGATHERV"));
}