cumprod [numpy](https://numpy.org/doc/stable/reference/generated/numpy.cumprod.html) has this implemented. It is the torch.cumprod It will be good to have this implemented. The library I am working on [burn](https://github.com/tracel-ai/burn) - is adding prod functionality and this is required to implement the gradient. Ref: #1351