DNN_NeuroSim_V2.1 icon indicating copy to clipboard operation
DNN_NeuroSim_V2.1 copied to clipboard

It seems wrong for tileLocaEachLayer

Open fishfishfishfishfish opened this issue 2 years ago • 0 comments

In the function ChipFloorPlan in Training_pytorch/NeuroSIM/Chip.cpp, it calculate the double vector tileLocaEachLayer. I presume that tileLocaEachLayer record the location of the first tile that store a layer. The following code to calculate tileLocaEachLayer seems wrong.

for (int i=0; i<netStructure.size(); i++) {
  if (i==0) {
	tileLocaEachLayerRow.push_back(0);
	tileLocaEachLayerCol.push_back(0);
  } else {
        // original code here
	// thisTileTotal += numTileEachLayer[0][i]*numTileEachLayer[1][i];
	tileLocaEachLayerRow.push_back((int)thisTileTotal/(*numTileRow));
	tileLocaEachLayerCol.push_back((int)thisTileTotal%(*numTileRow)-1);
  }
  // I think it should be moved here.
  thisTileTotal += numTileEachLayer[0][i]*numTileEachLayer[1][i];
}

I think the calculation of thisTileTotal should be moved from the else clause to outside.

fishfishfishfishfish avatar Sep 02 '22 03:09 fishfishfishfishfish