[IE][VPU]: Fix KW issues on Linux (#1916)
* nullptr dereference fixed in Concat and Reduce stages in Graph Transformer * missed parameters in asserts in StridedSlice stage was added
This commit is contained in:
parent
ee96595d1d
commit
9000dd8be9
@ -275,8 +275,10 @@ void FrontEnd::parseConcat(
|
||||
|
||||
auto output = outputs[0];
|
||||
|
||||
auto concat = std::dynamic_pointer_cast<ie::ConcatLayer>(layer);
|
||||
VPU_THROW_UNLESS(layer != nullptr,
|
||||
"parseConcat expects valid CNNLayerPtr, got nullptr");
|
||||
auto concat = std::dynamic_pointer_cast<ie::ConcatLayer>(layer);
|
||||
VPU_THROW_UNLESS(concat != nullptr,
|
||||
"{} layer with name {} must be able to convert to ie::ConcatLayer",
|
||||
layer->type, layer->name);
|
||||
|
||||
|
@ -127,10 +127,12 @@ private:
|
||||
} // namespace
|
||||
|
||||
void FrontEnd::parseReduce(const Model& model, const ie::CNNLayerPtr& _layer, const DataVector& inputs, const DataVector& outputs) const {
|
||||
auto layer = std::dynamic_pointer_cast<ie::ReduceLayer>(_layer);
|
||||
VPU_THROW_UNLESS(_layer != nullptr,
|
||||
"parseReduce expects valid CNNLayerPtr, got nullptr");
|
||||
const auto layer = std::dynamic_pointer_cast<ie::ReduceLayer>(_layer);
|
||||
VPU_THROW_UNLESS(layer != nullptr,
|
||||
"Layer {} of type {} is nullptr",
|
||||
layer->name, layer->type);
|
||||
"Layer {} of type {} cannot be casted to ie::ReduceLayer",
|
||||
_layer->name, _layer->type);
|
||||
VPU_THROW_UNLESS(inputs.size() == 2,
|
||||
"Layer {} of type {} expects {} inputs, but provided {}",
|
||||
layer->name, layer->type, 2, inputs.size());
|
||||
|
@ -122,10 +122,12 @@ void FrontEnd::parseStridedSlice(const Model& model, const ie::CNNLayerPtr& laye
|
||||
const auto& strides = inputs[3];
|
||||
const auto stridesPtr = strides->content()->get<int32_t>();
|
||||
VPU_THROW_UNLESS(stridesPtr != nullptr,
|
||||
"Checking {} with type {} failed: pointer for strides is null");
|
||||
"Checking {} with type {} failed: pointer for strides is null",
|
||||
layer->name, layer->type);
|
||||
for (int i = 0; i < strides->desc().totalDimSize(); i++) {
|
||||
VPU_THROW_UNLESS(stridesPtr[i] > 0,
|
||||
"Checking {} with type {} failed: negative stride is not supported");
|
||||
"Checking {} with type {} failed: negative stride is not supported",
|
||||
layer->name, layer->type);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user