1. Fix flaky test after recently enabling the modelling of resharding memory costs by default in auto-sharding.
1. Fix flaky test after recently enabling the modelling of resharding memory costs by default in auto-sharding.
2. Also check shapes of parameters in the test instead of sharding annotations as sharding annotations may not be preserved through the compilation.

FUTURE_COPYBARA_INTEGRATE_REVIEW=https://github.com/openxla/xla/pull/10562 from olupton:missing-warmup b4ccf2928ee45ec9139db003378095b948bb73d5
