code: def _cummin(input):
      """
      Computes cummulative minimum of input at dimension ``dim=0``.
  
      :param torch.Tensor input: the input tensor.
      :returns torch.Tensor: accumulate min of `input` at dimension `dim=0`.
      """
      # FIXME: is there a better trick to find accumulate min of a sequence?
      N = input.size(0)
      input_tril = input.unsqueeze(0).repeat((N,) + (1,) * input.dim())
      triu_mask = (
          torch.ones(N, N, dtype=input.dtype, device=input.device)
          .triu(diagonal=1)
          .reshape((N, N) + (1,) * (input.dim() - 1))
      )
      triu_mask = triu_mask.expand((N, N) + input.shape[1:]) > 0.5
      input_tril.masked_fill_(triu_mask, input.max())
      return input_tril.min(dim=1)[0]
  
imports: import math
  import numbers
  import torch
  from torch.fft import irfft, rfft
  from .tensor_utils import next_fast_len
label_desc: Use image node_id 6 for calling a global function with example usage: _cummin(input) and returns: input_tril