From 44549f2bdd579c94d79d2a3bcd89cd809194947f Mon Sep 17 00:00:00 2001 From: mingmingtasd Date: Wed, 17 May 2023 16:11:41 +0800 Subject: [PATCH] Shrink the Gather's output shape --- content/browser/ml/webnn/dml/graph_dml_impl.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); }