| 132 | } |
| 133 | |
| 134 | port::StatusOr<std::unique_ptr<StreamExecutor>> |
| 135 | ROCmPlatform::GetUncachedExecutor(const StreamExecutorConfig& config) { |
| 136 | auto executor = absl::make_unique<StreamExecutor>( |
| 137 | this, absl::make_unique<GpuExecutor>(config.plugin_config), |
| 138 | config.ordinal); |
| 139 | auto init_status = executor->Init(config.device_options); |
| 140 | if (!init_status.ok()) { |
| 141 | return port::Status{ |
| 142 | port::error::INTERNAL, |
| 143 | absl::StrFormat( |
| 144 | "failed initializing StreamExecutor for ROCM device ordinal %d: %s", |
| 145 | config.ordinal, init_status.ToString().c_str())}; |
| 146 | } |
| 147 | |
| 148 | return std::move(executor); |
| 149 | } |
| 150 | |
| 151 | void ROCmPlatform::RegisterTraceListener( |
| 152 | std::unique_ptr<TraceListener> listener) { |