[IE CLDNN] Fix problems with loop iterator and parameter check in clDNN (#2141)
This commit is contained in:
parent
13dfcb066f
commit
40fd1858a2
@ -106,7 +106,7 @@ int driver_dev_id()
|
||||
auto id_itr = result.begin();
|
||||
while (id_itr != result.end()) {
|
||||
if (std::find(unused_ids.begin(), unused_ids.end(), *id_itr) != unused_ids.end())
|
||||
result.erase(id_itr);
|
||||
id_itr = result.erase(id_itr);
|
||||
else
|
||||
id_itr++;
|
||||
}
|
||||
|
@ -69,18 +69,18 @@ layout scatter_update_inst::calc_output_layout(scatter_update_node const& node)
|
||||
output_type = node.get_fused_output_layout().data_type;
|
||||
}
|
||||
|
||||
if (static_cast<size_t>(axis) < 0 || static_cast<size_t>(axis) >= input_number_of_dims)
|
||||
CLDNN_ERROR_MESSAGE(node.id(), "Incorrect axis value for ScatterUpdate: Axis must be positive and less than the input tensor dimension.");
|
||||
|
||||
if (indices_size > static_cast<size_t>(output_shape.sizes()[axis])) {
|
||||
CLDNN_ERROR_MESSAGE(node.id(),
|
||||
"Undefined behavior ScatterUpdate: indices size must not be larger than the output size along the Axis.");
|
||||
}
|
||||
|
||||
|
||||
if (nonempty_indices_dims + static_cast<size_t>(axis) > updates_number_of_dims) {
|
||||
CLDNN_ERROR_MESSAGE(node.id(),
|
||||
"Undefined behavior ScatterUpdate: indices dimention must not be larger than the updates[:Axis] dimentional size.");
|
||||
}
|
||||
|
||||
if (static_cast<size_t>(axis) < 0 || static_cast<size_t>(axis) >= input_number_of_dims)
|
||||
CLDNN_ERROR_MESSAGE(node.id(), "Incorrect axis value for ScatterUpdate: Axis must be positive and less than the input tensor dimension.");
|
||||
|
||||
return layout{output_type, input_format, output_shape};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user