[GPU] fix constant shape if its user has scalar inputs (#8564)
* [GPU] fix constant shape if its user has scalar inputs Currently for nodes like: ``` Multiply(input{}, mul_const{2}) -> mul{2} ``` cldnn sets 'mul_const' shape to (1, 2, 1, 1), which may not be correct if it's followed by ``` Add(mul{2}, add_const{2}) -> add{2} ``` because 'mul' shape is (1, 2, 1, 1), 'add_const' shape is (2, 1, 1, 1) and the result becomes (2, 2, 1, 1) instead of expected (2, 1, 1, 1) * Add tests for the issue
This commit is contained in:
parent
2e9f83d705
commit
c5d0dc3e5f
@ -103,7 +103,7 @@ static void CreateConstantOp(Program& p, const std::shared_ptr<ngraph::op::v0::C
|
|||||||
bool all_inputs_1d = true;
|
bool all_inputs_1d = true;
|
||||||
for (size_t j = 0; j < outOp->get_input_size(); j++) {
|
for (size_t j = 0; j < outOp->get_input_size(); j++) {
|
||||||
auto& in_shape = outOp->get_input_shape(j);
|
auto& in_shape = outOp->get_input_shape(j);
|
||||||
if (in_shape.size() != 1)
|
if (in_shape.size() > 1)
|
||||||
all_inputs_1d = false;
|
all_inputs_1d = false;
|
||||||
}
|
}
|
||||||
needsBatchInterpretation = all_inputs_1d;
|
needsBatchInterpretation = all_inputs_1d;
|
||||||
|
@ -11,6 +11,7 @@ using namespace ov::test::subgraph;
|
|||||||
namespace {
|
namespace {
|
||||||
std::vector<std::vector<ov::Shape>> inShapes = {
|
std::vector<std::vector<ov::Shape>> inShapes = {
|
||||||
{{2}},
|
{{2}},
|
||||||
|
{{}, {34100}},
|
||||||
{{2, 200}},
|
{{2, 200}},
|
||||||
{{10, 200}},
|
{{10, 200}},
|
||||||
{{1, 10, 100}},
|
{{1, 10, 100}},
|
||||||
|
@ -88,7 +88,7 @@ std::vector<std::string> disabledTestPatterns() {
|
|||||||
R"(.*CanSetOutBlobWithDifferentPrecision/netPRC=(I4|U4).*)",
|
R"(.*CanSetOutBlobWithDifferentPrecision/netPRC=(I4|U4).*)",
|
||||||
R"(.*CanSetOutBlobWithDifferentPrecision/netPRC=BIN.*)",
|
R"(.*CanSetOutBlobWithDifferentPrecision/netPRC=BIN.*)",
|
||||||
// TODO: Issue: 67486
|
// TODO: Issue: 67486
|
||||||
R"(.*(EltwiseLayerTest|SoftMaxLayerTest).*)",
|
R"(.*(SoftMaxLayerTest).*)",
|
||||||
// TODO: Issue: 68712
|
// TODO: Issue: 68712
|
||||||
R"(.*.MatMul.*CompareWithRefs.*IS0=\(1.5\)_IS1=\(1.5\).*transpose_a=0.*transpose_b=1.*CONSTANT.*FP16.*UNSPECIFIED.*UNSPECIFIED.*ANY.*)",
|
R"(.*.MatMul.*CompareWithRefs.*IS0=\(1.5\)_IS1=\(1.5\).*transpose_a=0.*transpose_b=1.*CONSTANT.*FP16.*UNSPECIFIED.*UNSPECIFIED.*ANY.*)",
|
||||||
// TODO: Issue 66685
|
// TODO: Issue 66685
|
||||||
|
Loading…
Reference in New Issue
Block a user