-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cc
More file actions
21 lines (19 loc) · 709 Bytes
/
main.cc
File metadata and controls
21 lines (19 loc) · 709 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <rdma/fabric/efa.h>
#include <rdma/ib/efa.h>
#include <iostream>
int main(int argc, char *argv[]) {
std::cout << "=== libfabric EFA devices ===\n";
auto* info = fi::EFAInfo::Get();
for (auto p = info; !!p; p = p->next) {
std::cout << "provider: " << p->fabric_attr->prov_name << "\n";
std::cout << " fabric: " << p->fabric_attr->name << "\n";
std::cout << " domain: " << p->domain_attr->name << "\n";
}
std::cout << "\n=== ibverbs EFA devices ===\n";
auto& infos = ib::EFAInfo::Get();
for (auto& info : infos) {
std::cout << "provider: efa\n";
std::cout << " fabric: efa\n";
std::cout << " domain: " << ibv_get_device_name(info.dev) << "\n";
}
}