From 715b02167d188d15f0205273b93ea6bbd606f4c5 Mon Sep 17 00:00:00 2001 From: Wenhao Jia Date: Fri, 19 Jun 2020 17:27:50 -0700 Subject: [PATCH] Restore TpuPlatform auto registration code. PiperOrigin-RevId: 317409587 Change-Id: If44d7a39a45c4c7026f70a4d79d965a54c4db295 --- tensorflow/stream_executor/tpu/tpu_platform.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tensorflow/stream_executor/tpu/tpu_platform.cc b/tensorflow/stream_executor/tpu/tpu_platform.cc index 13a845829c1..4bccd822e91 100644 --- a/tensorflow/stream_executor/tpu/tpu_platform.cc +++ b/tensorflow/stream_executor/tpu/tpu_platform.cc @@ -134,4 +134,12 @@ void RegisterTpuPlatform() { } } +REGISTER_MODULE_INITIALIZER(tpu_platform, RegisterTpuPlatform()); + +// Note that module initialization sequencing is not supported in the +// open-source project, so this will be a no-op there. +REGISTER_MODULE_INITIALIZER_SEQUENCE(tpu_platform, multi_platform_manager); +REGISTER_MODULE_INITIALIZER_SEQUENCE(multi_platform_manager_listener, + tpu_platform); + } // namespace tensorflow