diff --git a/onnxruntime/core/providers/webgpu/webgpu_context.cc b/onnxruntime/core/providers/webgpu/webgpu_context.cc index 755ebbfd174ca..343da693c716b 100644 --- a/onnxruntime/core/providers/webgpu/webgpu_context.cc +++ b/onnxruntime/core/providers/webgpu/webgpu_context.cc @@ -140,7 +140,7 @@ Status WebGpuContext::Run(const ComputeContext& context, const ProgramBase& prog return tensor != nullptr && tensor->Location().mem_type == OrtMemType::OrtMemTypeDefault && tensor->Location().device.Type() == OrtDevice::GPU && - tensor->Location().name == WEBGPU_BUFFER; + !strcmp(tensor->Location().name, WEBGPU_BUFFER); }), "All inputs must be tensors on WebGPU buffers."); @@ -149,7 +149,7 @@ Status WebGpuContext::Run(const ComputeContext& context, const ProgramBase& prog return tensor != nullptr && tensor->Location().mem_type == OrtMemType::OrtMemTypeDefault && tensor->Location().device.Type() == OrtDevice::GPU && - tensor->Location().name == WEBGPU_BUFFER; + !strcmp(tensor->Location().name, WEBGPU_BUFFER); }), "All outputs must be tensors on WebGPU buffers."); #endif