Skip to content

Commit

Permalink
[IE Myriad] IN renamed to I_N to avoid compile error in Windows build…
Browse files Browse the repository at this point in the history
…: C2513: 'int': no variable declared before '='
  • Loading branch information
nikita-kud committed Jul 21, 2020
1 parent c829505 commit b2105f7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ void PassImpl::run(const Model& model) {
continue;
}

int IN = inputDesc.dim(Dim::N);
int I_N = inputDesc.dim(Dim::N);
int IC = inputDesc.dim(Dim::C);
int ID = inputDesc.dim(Dim::D);
int IH = inputDesc.dim(Dim::H);
Expand Down Expand Up @@ -144,7 +144,7 @@ void PassImpl::run(const Model& model) {
"but: KO=%d, OC=%d", KO, OC);

// check spacial dims of output
int inputShape[] = {IW, IH, ID, IC, IN};
int inputShape[] = {IW, IH, ID, IC, I_N};
int outputShape[] = {OW, OH, OD, OC, ON};
int weightsShape[] = {KW, KH, KD, KI, KO};
for (int i = 0; i < 3; i++) {
Expand Down Expand Up @@ -311,7 +311,7 @@ void PassImpl::run(const Model& model) {
// create subInputs[i], if it was not created previously
if (subInputs[i] == nullptr) {
auto postfix = formatString("@input_depth=%d/%d", i + 1, ID);
DataDesc subInputsDesc(inputDesc.type(), DimsOrder::NCHW, {IW, IH, IC, IN});
DataDesc subInputsDesc(inputDesc.type(), DimsOrder::NCHW, {IW, IH, IC, I_N});
subInputs[i] = model->duplicateData(input, postfix, subInputsDesc);
}

Expand Down Expand Up @@ -378,7 +378,7 @@ void PassImpl::run(const Model& model) {
continue; // this subInputs[d] is not needed
}
auto postfix = formatString("@input_depth=%d/%d", d + 1, ID);
DataDesc subInputsDesc3D(inputDesc.type(), DimsOrder::NCDHW, {IW, IH, 1, IC, IN});
DataDesc subInputsDesc3D(inputDesc.type(), DimsOrder::NCDHW, {IW, IH, 1, IC, I_N});
subInputs3D[d] = model->duplicateData(input, postfix + "@3D", subInputsDesc3D);
_stageBuilder->addReshapeStage(model,
stage->name() + "@split",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ void PassImpl::run(const Model& model) {
VPU_THROW_UNLESS(inputDesc.type() == outputDesc.type(), "incompatible data types");
VPU_THROW_UNLESS(inputDesc.dimsOrder() == outputDesc.dimsOrder(), "incompatible dim orders");

int IN = inputDesc.dim(Dim::N);
int I_N = inputDesc.dim(Dim::N);
int IC = inputDesc.dim(Dim::C);
int ID = inputDesc.dim(Dim::D);
int IH = inputDesc.dim(Dim::H);
Expand All @@ -128,11 +128,11 @@ void PassImpl::run(const Model& model) {
int OH = outputDesc.dim(Dim::H);
int OW = outputDesc.dim(Dim::W);

VPU_THROW_UNLESS(IN == ON, "incompatible: input batch=%d, output batch=%d", IN, ON);
VPU_THROW_UNLESS(I_N == ON, "incompatible: input batch=%d, output batch=%d", I_N, ON);
VPU_THROW_UNLESS(IC == OC, "incompatible: input channels=%d, output channels=%d", IC, OC);

// check spacial dims of output
int inputShape[] = {IW, IH, ID, IC, IN};
int inputShape[] = {IW, IH, ID, IC, I_N};
int outputShape[] = {OW, OH, OD, OC, ON};
for (int i = 0; i < 3; i++) {
int expectedOutputSize = (inputShape[i]
Expand Down Expand Up @@ -318,7 +318,7 @@ void PassImpl::run(const Model& model) {
// create subInputs[i], if it was not created previously
if (subInputs[i] == nullptr) {
auto postfix = formatString("@input_depth=%d/%d", i + 1, ID);
DataDesc subInputsDesc(inputDesc.type(), DimsOrder::NCHW, {IW, IH, IC, IN});
DataDesc subInputsDesc(inputDesc.type(), DimsOrder::NCHW, {IW, IH, IC, I_N});
subInputs[i] = model->duplicateData(input, postfix, subInputsDesc);
}

Expand Down Expand Up @@ -358,7 +358,7 @@ void PassImpl::run(const Model& model) {
continue; // this subInputs[d] is not needed
}
auto postfix = formatString("@input_depth=%d/%d", d + 1, ID);
DataDesc subInputsDesc3D(inputDesc.type(), DimsOrder::NCDHW, {IW, IH, 1, IC, IN});
DataDesc subInputsDesc3D(inputDesc.type(), DimsOrder::NCDHW, {IW, IH, 1, IC, I_N});
subInputs3D[d] = model->duplicateData(input, postfix + "@3D", subInputsDesc3D);
_stageBuilder->addReshapeStage(model,
stage->name() + "@split",
Expand Down

0 comments on commit b2105f7

Please sign in to comment.