File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
onnxruntime/core/providers/webgpu/ep Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff 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);
Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments