| 205 | } |
| 206 | |
| 207 | port::StatusOr<std::unique_ptr<StreamExecutor>> |
| 208 | CudaPlatform::GetUncachedExecutor(const StreamExecutorConfig& config) { |
| 209 | auto executor = absl::make_unique<StreamExecutor>( |
| 210 | this, absl::make_unique<GpuExecutor>(config.plugin_config), |
| 211 | config.ordinal); |
| 212 | auto init_status = executor->Init(config.device_options); |
| 213 | if (!init_status.ok()) { |
| 214 | return port::Status( |
| 215 | port::error::INTERNAL, |
| 216 | absl::StrFormat( |
| 217 | "failed initializing StreamExecutor for CUDA device ordinal %d: %s", |
| 218 | config.ordinal, init_status.ToString())); |
| 219 | } |
| 220 | |
| 221 | return std::move(executor); |
| 222 | } |
| 223 | |
| 224 | void CudaPlatform::RegisterTraceListener( |
| 225 | std::unique_ptr<TraceListener> listener) { |