static */
| 80 | }; |
| 81 | |
| 82 | /* static */ StatusOr<std::unique_ptr<Backend>> Backend::CreateBackend( |
| 83 | const BackendOptions& options) { |
| 84 | se::Platform* platform = options.platform(); |
| 85 | TF_ASSIGN_OR_RETURN(auto compiler, Compiler::GetForPlatform(platform)); |
| 86 | TF_ASSIGN_OR_RETURN( |
| 87 | auto stream_executors, |
| 88 | PlatformUtil::GetStreamExecutors(platform, options.allowed_devices())); |
| 89 | TF_ASSIGN_OR_RETURN(auto transfer_manager, |
| 90 | TransferManager::GetForPlatform(platform)); |
| 91 | TF_ASSIGN_OR_RETURN(auto computation_placer, |
| 92 | ComputationPlacer::GetForPlatform(platform)); |
| 93 | std::unique_ptr<Backend> backend( |
| 94 | new Backend(platform, compiler, stream_executors, transfer_manager, |
| 95 | computation_placer, options.intra_op_parallelism_threads())); |
| 96 | return std::move(backend); |
| 97 | } |
| 98 | |
| 99 | /* static */ StatusOr<std::unique_ptr<Backend>> |
| 100 | Backend::CreateDefaultBackend() { |
nothing calls this directly
no test coverage detected