message: Change Variable mapping JSON output to reflect memory sizes being elements instead of bytes.
  Summary:
  Record element type info and change logging text memory -> elements.
  fixes T4581
  Reviewers: georgep
  Maniphest Tasks: T4581
diff: @@ -237,27 +237,29 @@ void PrintTensorMapping(const poplar::Graph& graph,
  << "\"output_index\": " << output_index << ", "
  << "\"tiles\": [";
  const auto mapping = graph.getTileMapping(tensor);
  + const poplar::Type elementType = tensor.elementType();
  bool first_tile = true;
  unsigned tilesUsed = 0;
  - size_t totalMemory = 0;
  + size_t totalElements = 0;
  for (size_t tileIdx = 0; tileIdx < mapping.size(); tileIdx++) {
  const auto& tile = mapping[tileIdx];
  if (tile.size() != 0) {
  if (!first_tile) ss << ", ";
  tilesUsed++;
  - size_t tileMemSize = 0;
  + size_t tileElementCount = 0;
  for (const auto& interval : tile) {
  - tileMemSize += interval.size();
  + tileElementCount += interval.size();
  }
  ss << "{\"tile_id\": " << tileIdx << ", "
  << "\"num_intervals\": " << tile.size() << ", "
  - << "\"memory_size\": " << tileMemSize << "}";
  + << "\"num_elements\": " << tileElementCount << ", "
  + << "\"element_size\": " << elementType << "}";
  first_tile = false;
  - totalMemory += tileMemSize;
  + totalElements += tileMemSize;
  }
  }
  ss << "], "
  - << "\"total_memory_size\": " << totalMemory << ", "
  + << "\"total_elements\": " << totalElements << ", "
  << "\"tiles_used\": " << tilesUsed << " }";
  first_tensor = false;
  }
  