[IE][VPU]: Customer model compilation error - fix(#1901)

Fix of 36693 issue. 

* Problem: One of the concat inputs is a constant. Adjust_data_layout pass tries to duplicate all inputs that do not meet the strides requirements, and then copy from the original input to the duplicate with strides. But duplicateData with an argument in the form of a constant also creates a constant, and then, when Copy, an error appears, the presence of a constant output, which cannot be.
* Solution: In addConvertedData create an intermediate date with the same description as the constant, and then copy the constant data into it with the required strides.

Co-authored-by: DariaMityagina <daria.mityagina@intel.com>
This commit is contained in:
Roman Vyunov (Intel)
2020-09-01 13:03:31 +03:00
committed by GitHub
parent 43ec4a5695
commit 7796b0f277

View File

@@ -359,9 +359,16 @@ Data PassImpl::addConvertedData(
const Model& model,
const Data& orig,
const StridesRequirement& reqs) {
auto data = model->duplicateData(
orig,
"@adjust-strides");
auto data = orig;
if (orig->usage() == DataUsage::Const) {
auto newData = model->addNewData(orig->name(), orig->desc());
newData->attrs().copyFrom(orig->attrs());
data = newData;
} else {
data = model->duplicateData(orig, "@adjust-strides");
}
data->resetRequiredStrides();
data->updateRequiredStrides(reqs);