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

Method CreateBackend

tensorflow/compiler/xla/service/backend.cc:82–97  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

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>>
100Backend::CreateDefaultBackend() {

Callers

nothing calls this directly

Calls 2

platformMethod · 0.45

Tested by

no test coverage detected