diff --git a/content/browser/ml/webnn/dml/graph_dml_impl.cc b/content/browser/ml/webnn/dml/graph_dml_impl.cc index d29db9e06a4146..3635bcc48e9da5 100644 --- a/content/browser/ml/webnn/dml/graph_dml_impl.cc +++ b/content/browser/ml/webnn/dml/graph_dml_impl.cc @@ -1255,8 +1255,9 @@ void GraphDMLImpl::AddGather(UINT64 input_index, graph_desc_builder_->Connect({input_node, indices_node}, {node}); - auto node_output = graph_desc_builder_->CreateNodeOutput( - node, 0, std::move(output_expanded_desc)); + TensorDesc output_origin_desc(input_tensor_desc.GetDataType(), output_dimensions); + auto node_output = + graph_desc_builder_->CreateNodeOutput(node, 0, std::move(output_origin_desc)); node_output_map_[output_index] = std::move(node_output); }