helion.language.cumprod
- helion.language.cumprod(input_tensor, dim, reverse=False)[source]
Compute the cumulative product along a specified dimension.
Equivalent to
hl.associative_scan(torch.mul, input_tensor, dim, reverse)
.- Parameters:
- Returns:
Tensor with same shape as input containing cumulative product
- Return type:
See also
associative_scan()
: For custom scan operationscumsum()
: For cumulative sumreduce()
: For dimension-reducing operations
Note
Output has same shape as input
Reverse=True computes cumprod from right to left
Equivalent to torch.cumprod