MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / IsGDRAvailable

Function IsGDRAvailable

tensorflow/contrib/gdr/gdr_memory_manager.cc:45–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43namespace {
44
45bool IsGDRAvailable() {
46#if defined(__APPLE__)
47 return false;
48#elif defined(PLATFORM_WINDOWS)
49 return false;
50#else
51 std::ifstream ifs("/proc/modules");
52 string line;
53 while (std::getline(ifs, line)) {
54 auto sep = line.find(' ');
55 CHECK_NE(sep, std::string::npos);
56 if (line.substr(0, sep) == "nv_peer_mem") {
57 return true;
58 }
59 }
60 return false;
61#endif
62}
63
64int TryToReadNumaNode(ibv_device* device) {
65#if defined(__APPLE__)

Callers 1

InitMethod · 0.70

Calls 1

findMethod · 0.45

Tested by

no test coverage detected