code: def make_lut(layout, block, device):
      _empty = torch.tensor([], dtype=torch.int64, device=layout.device)
      sizes = _empty.clone()
      # sizes along rows
      for h in range(layout.shape[0]):
          sizes = torch.cat((sizes, layout[h, :, :].sum(-1)))
      total_sizes = sizes * block
      # offsets in block format
      offsets = torch.zeros_like(sizes)
      offsets[1:] = torch.cumsum(sizes[:-1], dim=0)
      # block indices
      columns = layout.nonzero(as_tuple=False)[:, 2]
      header = torch.stack((sizes, offsets), dim=1).view(-1)
      lut = torch.cat((header, columns)).type(torch.int32).to(device)
      return lut, int(total_sizes.max())
  
file_path: triton/python/triton/ops/blocksparse/softmax.py
imports: import torch
  from ...None import jit
  from ...None import language
  from ...None import next_power_of_2
label_desc: Use image node_id 1 for calling the _softmax obj's underlying member method code with example usage: obj.make_lut(layout, block, device) and returns: lut,  int