Skip to content

Commit 3598465

Browse files
committed
Clang fix (WebGPU)
1 parent e417315 commit 3598465

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

onnxruntime/core/providers/webgpu/ep/ep.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,11 @@ OrtStatus* ORT_API_CALL Ep::OnRunStartImpl(_In_ OrtEp* this_ptr,
213213
// currently only option "gpu_graph_id" is used
214214
auto graph_annotation_str = Api().ort.GetRunConfigEntry(run_options, kOrtRunOptionsConfigCudaGraphAnnotation);
215215
if (graph_annotation_str != nullptr) {
216-
options.config_options.AddConfigEntry(kOrtRunOptionsConfigCudaGraphAnnotation, graph_annotation_str);
216+
auto status = options.config_options.AddConfigEntry(kOrtRunOptionsConfigCudaGraphAnnotation, graph_annotation_str);
217+
if (!status.IsOK()) {
218+
return Api().ort.CreateStatus(static_cast<OrtErrorCode>(status.Code()),
219+
status.ErrorMessage().c_str());
220+
}
217221
}
218222
auto* ep = static_cast<Ep*>(this_ptr);
219223
auto status = ep->EpImpl()->OnRunStart(options);

onnxruntime/core/providers/webgpu/ep/factory.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,6 @@ OrtStatus* ORT_API_CALL Factory::CreateEpImpl(
134134
auto webgpu_ep = webgpu_ep_factory->CreateProvider(*session_options, *logger);
135135
auto webgpu_ep_impl = static_cast<WebGpuExecutionProvider*>(webgpu_ep.release());
136136
webgpu_ep_impl->SetEpLogger(logger);
137-
int device_id = webgpu_ep_impl->GetDeviceId();
138-
auto& webgpu_context = WebGpuContextFactory::GetContext(device_id);
139137
auto factory = static_cast<Factory*>(this_ptr);
140138
*ep = new Ep(webgpu_ep_impl, *factory, *logger, factory->config_);
141139
return nullptr;

0 commit comments

Comments
 (0)