static */
| 127 | } |
| 128 | |
| 129 | /* static */ LocalService* ClientLibrary::GetXlaService( |
| 130 | se::Platform* platform) { |
| 131 | ClientLibrary& client_library = Singleton(); |
| 132 | tensorflow::mutex_lock lock(client_library.service_mutex_); |
| 133 | auto it = client_library.local_instances_.find(platform->id()); |
| 134 | CHECK(it != client_library.local_instances_.end()); |
| 135 | return it->second->service.get(); |
| 136 | } |
| 137 | |
| 138 | /* static */ StatusOr<CompileOnlyClient*> |
| 139 | ClientLibrary::GetOrCreateCompileOnlyClient(se::Platform* platform) { |