Commit 99245594 authored by Sergey Shalnov's avatar Sergey Shalnov Committed by Sang Ik Lee

IntelGPU backend: Broadcast operation fix (#2461)

parent 780ef08c
......@@ -22,7 +22,7 @@ include(ExternalProject)
#------------------------------------------------------------------------------
set(CLDNN_GIT_REPO_URL https://github.com/intel/clDNN.git)
set(CLDNN_GIT_LABEL f91d7d83d8f121e4e159776b108e316f2f08bdf5)
set(CLDNN_GIT_LABEL a34a1614af20dafa2864e2be0806a8d80b4eb356)
set(BOOST_VERSION 1.64.0)
set(OUT_DIR ${EXTERNAL_PROJECTS_ROOT}/cldnn/out)
......
......@@ -844,14 +844,27 @@ shared_ptr<runtime::Executable>
{
do_equal_propagation(topology, get_input_name(op), get_output_name(op));
}
else if (get_input_type(op) != element::i32 && get_input_type(op) != element::i64 &&
((get_input_shape(op).size() == 1 && get_input_shape(op).at(0) == 1) ||
get_input_shape(op).empty()))
else if ((get_output_shape(op).size() <= 4) &&
((get_input_type(op) == element::f32) || (get_input_type(op) == element::i32)))
{
const size_t shift = 4 - get_output_shape(op).size();
vector<uint16_t> fixed_b_axes;
for (uint16_t i = 0; i < shift; ++i)
{
fixed_b_axes.push_back(i);
}
for (auto it = axis.cbegin(); it != axis.cend(); ++it)
{
fixed_b_axes.push_back(*it + shift);
}
const cldnn::tensor output_tensor_size =
intelgpu_space::create_cldnn_tensor(get_output_shape(op));
const cldnn::broadcast cldnn_broadcast(
get_output_name(op), get_input_name(op), output_tensor_size);
get_output_name(op), get_input_name(op), output_tensor_size, fixed_b_axes);
topology.add(cldnn_broadcast);
}
else
......
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