Enable the modeling of memory costs when resharding tensors by default.
Enable the modeling of memory costs when resharding tensors by default.

FUTURE_COPYBARA_INTEGRATE_REVIEW=https://github.com/openxla/xla/pull/9778 from shraiysh:flash-attn-2 77a644020c82939ea89c717c3490b5469d35e175
