Use custom segment_sum implementation to improve swap curve fitting performance and make it XLA-compatible.
Use custom segment_sum implementation to improve swap curve fitting performance and make it XLA-compatible.

PiperOrigin-RevId: 353928488

google/tf-quant-finance,google/tf-quant-finance