[torch][segment_reduce] Update default values when initial value is not set (#61266)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/61266
Same as title.
Mainly this concludes the initially planned features from the op. Only missing functionality is to do reduction on any axis (currently axis 0 only is supported).
Test Plan: Updated unit test.
Reviewed By: ngimel
Differential Revision: D29552037
fbshipit-source-id: 023c7cbf750a0671f76082708f14c05739dda07a