Commit 6d9bc696 authored by Sergey Shalnov's avatar Sergey Shalnov Committed by Scott Cyphers

IntelGPU backend: Concat operation fix (#2506)

parent 84167659
......@@ -609,8 +609,15 @@ shared_ptr<runtime::Executable>
}
}
const cldnn::concatenation cldnn_concat(get_output_name(op), inputs, cldnn_axis);
topology.add(cldnn_concat);
if (inputs.empty())
{
do_equal_propagation(topology, get_input_name(op), get_output_name(op));
}
else
{
const cldnn::concatenation cldnn_concat(get_output_name(op), inputs, cldnn_axis);
topology.add(cldnn_concat);
}
break;
}
case OP_TYPEID::Softmax:
......
......@@ -1204,6 +1204,23 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_zero_length_1d_middle)
EXPECT_EQ((vector<float>{1, 2, 3, 4, 5, 6, 7, 8}), read_vector<float>(result));
}
NGRAPH_TEST(${BACKEND_NAME}, concat_zero_zero)
{
Shape shape{0};
auto constant_1 = op::Constant::create(element::f32, shape, {1});
auto concat_1 = make_shared<op::Concat>(NodeVector{constant_1, constant_1}, 0);
auto f = make_shared<Function>(concat_1, ParameterVector{});
auto backend = runtime::Backend::create("${BACKEND_NAME}");
auto result = backend->create_tensor(element::f32, shape);
auto handle = backend->compile(f);
handle->call_with_validate({result}, {});
EXPECT_EQ(vector<float>{}, read_vector<float>(result));
}
NGRAPH_TEST(${BACKEND_NAME}, concat_zero_length_4d_middle)
{
Shape shape_a{2, 2, 1, 1};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment