code: def __init__(self, values, layout):
      assert values.shape[-2] == values.shape[-1]
      assert (
          values.device == layout.device
      ), "Both values and layout need to reside on the same device"
      block_size = values.shape[-1]
      # TODO: make this check conditioned on the use of Triton
      assert (
          block_size >= 16
      ), "Minimum block size is 16, for now at least"
  
      # Pure blocksparse data
      self.__values = values
      self.__layout = layout
  
      # blocksparse operators for triton
      if blocksparse_matmul:
          self._initialize_triton_ops()
      else:
          self.__sparse_dot_sdd = None
          self.__sparse_dot_dsd = None
          self.__sparse_softmax = None
  
imports: import logging
  import torch
  from xformers import _is_triton_available
  from xformers.ops import masked_matmul
label_desc: Use image node_id 2 to create a new BlockSparseTensor object from inherited base classes: torch with example: obj = BlockSparseTensor(values, layout)