pytorch / xla

Enabling PyTorch on XLA Devices (e.g. Google TPU)
https://pytorch.org/xla
Other
2.46k stars 467 forks source link

Implement operations `cummax`, `cummin` #8013

Closed guyao closed 2 weeks ago

guyao commented 2 weeks ago

The return type of pytorch cummax/cummin is tuple of two output tensors (values, indices).

However jax cummax/cummin does not return same result.

Implement this operation using associative_scan with running min/max reduce function.

resolves #7373 resolves #7374