未验证 提交 539d6093 编写于 作者: J Juncheng 提交者: GitHub

Fix log level (#5009)

Co-authored-by: Noneflow-ci-bot <69100618+oneflow-ci-bot@users.noreply.github.com>
上级 7142ed99
......@@ -78,22 +78,22 @@ std::shared_ptr<const NetIBDeviceDescriptor> NetIBDeviceDescriptor::Query(int32_
CHECK(ibv::IsAvailable());
ibv_device_attr device_attr{};
if (ibv::wrapper.ibv_query_device(context, &device_attr) != 0) {
LOG(WARNING) << "Unable to query device: " << context->device->name;
LOG(INFO) << "Unable to query device: " << context->device->name;
return std::shared_ptr<const NetIBDeviceDescriptor>();
}
ibv_port_attr port_attr{};
if (ibv::wrapper.ibv_query_port_wrap(context, port, &port_attr) != 0) {
LOG(WARNING) << "Unable to query port: device " << context->device->name << " port " << port;
LOG(INFO) << "Unable to query port: device " << context->device->name << " port " << port;
return std::shared_ptr<const NetIBDeviceDescriptor>();
}
if (port_attr.state != IBV_PORT_ACTIVE) {
LOG(WARNING) << "Inactivate port: device " << context->device->name << " port " << port;
LOG(INFO) << "Inactivate port: device " << context->device->name << " port " << port;
return std::shared_ptr<const NetIBDeviceDescriptor>();
}
// TODO(liujuncheng): Add IBV_LINK_LAYER_ETHERNET support
if (port_attr.link_layer != IBV_LINK_LAYER_INFINIBAND) {
LOG(WARNING) << "Link layer is not supported: device " << context->device->name << " port "
<< port;
LOG(INFO) << "Link layer is not supported: device " << context->device->name << " port "
<< port;
return std::shared_ptr<const NetIBDeviceDescriptor>();
}
auto* desc = new NetIBDeviceDescriptor();
......
......@@ -41,7 +41,7 @@ std::unique_ptr<DynamicLibrary> DynamicLibrary::Load(const std::vector<std::stri
void* handle = dlopen(name.c_str(), RTLD_LOCAL | RTLD_NOW);
if (handle != nullptr) {
DynamicLibrary* lib = new DynamicLibrary(handle);
std::cout << "loaded library: " << lib->AbsolutePath() << "\n";
std::cerr << "loaded library: " << lib->AbsolutePath() << "\n";
return std::unique_ptr<DynamicLibrary>(lib);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册