Commit 81216a9e authored by shssf's avatar shssf Committed by Robert Kimball

IntelGPU backend: Sum operation bug fix (#1330)

* IntelGPU backend: Sum operation bug fix

* PR1330. Style fix
parent 4f26640b
......@@ -115,7 +115,26 @@ void runtime::intelgpu::do_bcast_sum_operation(cldnn::topology& topology,
}
else
{
// Initialize destination output by zeroes
size_t var_idx = 0;
for (auto const& i : output_shape)
{
writer << "for (uint i" << var_idx << " = 0; i" << var_idx << " < " << i << "; ++i"
<< var_idx << ")\n";
writer.block_begin();
++var_idx;
}
writer << "output" << access_dims(output_shape) << " = 0.0f;\n";
// Closing brackets for Sum initialization loop
for (auto const& i : output_shape)
{
writer.block_end();
}
// Now do the Sum operation
var_idx = 0;
for (auto const& i : input_shape)
{
writer << "for (uint i" << var_idx << " = 0; i" << var_idx << " < " << i << "; ++i"
......
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