Skip to content

Commit

Permalink
DML EP squeeze all axes when empty (#12649)
Browse files Browse the repository at this point in the history
DML EP squeeze empty axes
  • Loading branch information
fdwr authored Aug 19, 2022
1 parent b270334 commit aa85092
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1852,8 +1852,14 @@ namespace OperatorHelper
m_axes = kernelInformation.GetAttributes().GetOptionalAttributeVectorInt32(AttrName::Axes);
}
std::vector<DimensionType> inputDimensions = shapeInformation.GetInputTensorShape(0);

HandleNegativeAxes(/*inout*/ m_axes, gsl::narrow_cast<uint32_t>(inputDimensions.size()));
std::sort(m_axes.begin(), m_axes.end());
if (m_axes.empty())
{
m_axes.resize(inputDimensions.size());
std::iota(m_axes.begin(), m_axes.end(), 0u);
}
}

std::vector<EdgeShapes> SqueezeHelper::GetOutputShapes(const MLShapeInferenceContext& shapeInfo) const
Expand Down

0 comments on commit aa85092

Please sign in to comment.