diff options
author | Yong Tang <yong.tang.github@outlook.com> | 2018-09-20 14:14:02 +0000 |
---|---|---|
committer | Yong Tang <yong.tang.github@outlook.com> | 2018-09-20 14:15:50 +0000 |
commit | ec6407526c28353c9a0aca5c471681e7d8d4f981 (patch) | |
tree | 4f690a7e965b9541f449ca27ea126aee115f797e /tensorflow/contrib/verbs | |
parent | 90d084e0c42232043c186e66093b67800fb30fba (diff) |
Fix build failure in verbs
While looking into 22372, the verbs build fails with the following error:
```
tensorflow/contrib/verbs/verbs_server_lib.cc:80:6: error: 'once_call' in namespace 'std' does not name a type
std::once_call reg_mem_visitors_call;
^
tensorflow/contrib/verbs/verbs_server_lib.cc: In member function 'tensorflow::Status tensorflow::VerbsServer::Init(tensorflow::ServiceInitFunction, tensorflow::RendezvousMgrCreationFunction)':
tensorflow/contrib/verbs/verbs_server_lib.cc:85:18: error: 'reg_mem_visitors_call' was not declared in this scope
std::call_once(reg_mem_visitors_call, []() { RdmaMgr::RegMemVisitors(); });
```
This fix fixes the build failures with `once_call` -> `once_flag`.
This fix fixes 22372.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Diffstat (limited to 'tensorflow/contrib/verbs')
-rw-r--r-- | tensorflow/contrib/verbs/verbs_server_lib.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tensorflow/contrib/verbs/verbs_server_lib.cc b/tensorflow/contrib/verbs/verbs_server_lib.cc index 61469686e4..d6425bf409 100644 --- a/tensorflow/contrib/verbs/verbs_server_lib.cc +++ b/tensorflow/contrib/verbs/verbs_server_lib.cc @@ -15,6 +15,8 @@ limitations under the License. #ifdef TENSORFLOW_USE_VERBS +#include <mutex> + #include "tensorflow/contrib/verbs/verbs_server_lib.h" #include "grpc/support/alloc.h" @@ -77,7 +79,7 @@ Status VerbsServer::ChannelCacheFactory(const ServerDef& server_def, } namespace { -std::once_call reg_mem_visitors_call; +std::once_flag reg_mem_visitors_call; } // namespace Status VerbsServer::Init(ServiceInitFunction service_func, |