2424
2525namespace nixl ::ucx {
2626void
27- config::modify (std::string_view key, std::string_view value) const {
28- const char *env_val = std::getenv (absl::StrFormat (" UCX_%s" , key.data ()).c_str ());
27+ config::modify (std::string_view key, std::string_view value) const {
28+ const char *env_val = std::getenv (absl::StrFormat (" UCX_%s" , key.data ()).c_str ());
2929 if (env_val) {
3030 NIXL_DEBUG << " UCX env var has already been set: " << key << " =" << env_val;
3131 } else {
32- modifyAlways (key, value);
32+ modifyAlways (key, value);
3333 }
3434}
3535
3636void
37- config::modifyAlways (std::string_view key, std::string_view value) const {
38- const auto status = ucp_config_modify (config_.get (), key.data (), value.data ());
37+ config::modifyAlways (std::string_view key, std::string_view value) const {
38+ const auto status = ucp_config_modify (config_.get (), key.data (), value.data ());
3939 if (status != UCS_OK) {
4040 NIXL_WARN << " Failed to modify UCX config: " << key << " =" << value << " : "
41- << ucs_status_string (status);
41+ << ucs_status_string (status);
4242 } else {
4343 NIXL_DEBUG << " Modified UCX config: " << key << " =" << value;
4444 }
@@ -47,12 +47,10 @@ config::modifyAlways (std::string_view key, std::string_view value) const {
4747ucp_config_t *
4848config::readUcpConfig () {
4949 ucp_config_t *config = nullptr ;
50- const auto status = ucp_config_read ( NULL , NULL , &config);
50+ const auto status = ucp_config_read ( nullptr , nullptr , &config);
5151 if (status != UCS_OK) {
52- const auto err_str =
53- std::string (" Failed to create UCX config: " ) + ucs_status_string (status);
54- NIXL_ERROR << err_str;
55- throw std::runtime_error (err_str);
52+ throw std::runtime_error (" Failed to create UCX config: " +
53+ std::string (ucs_status_string (status)));
5654 }
5755 return config;
5856}
0 commit comments