message: [XLA:SPMD][NFC] Change fill_size computation to match dilated_size
  Use the simpler 1 + (size - 1)*dilation for full_size computation.
  Use explicit types and const in a few places.
diff: @@ -578,7 +578,7 @@ PartitionedHlo::ReshardAsWindowedInput(const Window& window,
  base_shape_.rank(), nullptr);
  Window shard_window = window;
  - auto padded_shape = base_shape_;
  + Shape padded_shape = base_shape_;
  std::vector<HloInstruction*> offsets_on_padded_shape(base_shape_.rank());
  std::vector<int64> per_shard_window_counts(base_shape_.rank());
  std::vector<int64> explicit_left_padding(base_shape_.rank());
  @@ -590,11 +590,10 @@ PartitionedHlo::ReshardAsWindowedInput(const Window& window,
  HloInstruction::CreateConstant(LiteralUtil::Zero(S32)));
  continue;
  }
  - const auto& wd = window.dimensions(i);
  - const auto dilated_size = 1 + (wd.size() - 1) * wd.window_dilation();
  - int64 full_size =
  - base_shape_.dimensions(i) +
  - (wd.base_dilation() - 1) * (base_shape_.dimensions(i) - 1) +
  + const WindowDimension& wd = window.dimensions(i);
  + const int64 dilated_size = 1 + (wd.size() - 1) * wd.window_dilation();
  + const int64 full_size =
  + 1 + (base_shape_.dimensions(i) - 1) * wd.base_dilation() +
  wd.padding_high() + wd.padding_low();
  if (full_size < dilated_size) {
  VLOG(2) << "Failed to reshard window operand because the window size is "
  @@ -614,7 +613,7 @@ PartitionedHlo::ReshardAsWindowedInput(const Window& window,
  // padding_high on the sharded op for the remaining. padding_low and
  // padding_high are now given initial values, which will be later updated if
  // dilation is not 1.
  - auto swd = shard_window.mutable_dimensions(i);
  + WindowDimension* swd = shard_window.mutable_dimensions(i);
  explicit_left_padding[i] = wd.padding_low() / wd.base_dilation();
  swd->set_padding_low(wd.padding_low() % wd.base_dilation());
  swd->set_padding_high(0);
  