| 69 | } |
| 70 | |
| 71 | port::StatusOr<std::unique_ptr<StreamExecutor>> |
| 72 | HostPlatform::GetUncachedExecutor(const StreamExecutorConfig& config) { |
| 73 | auto executor = absl::make_unique<StreamExecutor>( |
| 74 | this, absl::make_unique<HostExecutor>(config.plugin_config), |
| 75 | config.ordinal); |
| 76 | auto init_status = executor->Init(config.device_options); |
| 77 | if (!init_status.ok()) { |
| 78 | return port::Status( |
| 79 | port::error::INTERNAL, |
| 80 | absl::StrFormat( |
| 81 | "failed initializing StreamExecutor for device ordinal %d: %s", |
| 82 | config.ordinal, init_status.ToString().c_str())); |
| 83 | } |
| 84 | |
| 85 | return std::move(executor); |
| 86 | } |
| 87 | |
| 88 | void HostPlatform::RegisterTraceListener( |
| 89 | std::unique_ptr<TraceListener> listener) { |