class_docstr: An operator optimized for very small values of K (``K <= 32``)         and f32 pre-Ampere as it does not use TensorCores.
  Only supports contiguous inputs in BMK format, so an extra reshape         or contiguous call might be done.
  
  :Deprecated:
  
      This operator is deprecated and should not be used in new code
class_docstr_tok: ["An","operator","optimized","for","very","small","values","of","K","(","``","K","<","=","32","``",")","and","f32","pre-Ampere","as","it","does","not","use","TensorCores",".","Only","supports","contiguous","inputs","in","BMK","format",",","so","an","extra","reshape","or","contiguous","call","might","be","done",".",":","Deprecated",":","This","operator","is","deprecated","and","should","not","be","used","in","new","code"]
code: def not_supported_reasons(cls, d: Inputs) -> List[str]:
      reasons = super(FwOp, cls).not_supported_reasons(d)
      if (
          isinstance(d.attn_bias, torch.Tensor)
          and d.attn_bias.stride(1) != 0
      ):
          reasons.append("bias with non-zero stride not supported")
      buffer_size = 8
      k = d.query.shape[-1]
      for pack in [1, 2, 4]:
          if (k % pack) == 0 and (k // pack) <= buffer_size:
              return reasons
      reasons.append(f"unsupported embed per head: {k}")
      return reasons
  
file_path: xformers/xformers/ops/fmha/small_k.py
imports: from typing import Any, List, Mapping, Optional, Set, Tuple, Union
  import torch
  from ..common import get_xformers_operator, register_operator
  from .attn_bias import AttentionBias
  from .common import AttentionBwOpBase, AttentionFwOpBase, Context, Gradients, Inputs, bmk2bmhk
label_desc: Use image node_id 1 for calling the FwOp obj's underlying member method code with example usage: obj.not_supported_reasons(cls, d) and returns: reasons, reasons