class_docstr: Generic version of FusedSacleMaskSoftmax.
  It removes the seq-len limitations and has slight performance degragation compared with FusedScaleMaskSoftmax
  
  fused operation: scaling + mask + softmax
  
  Arguments:
      input_in_fp16: flag to indicate if input in fp16 data format.
      input_in_bf16: flag to indicate if input in bf16 data format.
      scaled_masked_softmax_fusion: flag to indicate user want to use softmax fusion
      mask_func: mask function to be applied.
      softmax_in_fp32: if true, softmax in performed at fp32 precision.
      scale: scaling factor used in input tensor scaling.
class_docstr_tok: ["Generic","version","of","FusedSacleMaskSoftmax",".","It","removes","the","seq-len","limitations","and","has","slight","performance","degragation","compared","with","FusedScaleMaskSoftmax","fused","operation",":","scaling","+","mask","+","softmax","Arguments",":","input_in_fp16",":","flag","to","indicate","if","input","in","fp16","data","format",".","input_in_bf16",":","flag","to","indicate","if","input","in","bf16","data","format",".","scaled_masked_softmax_fusion",":","flag","to","indicate","user","want","to","use","softmax","fusion","mask_func",":","mask","function","to","be","applied",".","softmax_in_fp32",":","if","true",",","softmax","in","performed","at","fp32","precision",".","scale",":","scaling","factor","used","in","input","tensor","scaling","."]
code: def is_kernel_available(self, mask, b, np, sq, sk):
      if (
          self.scaled_masked_softmax_fusion and 0 < sk
      ):  # user want to fuse  # sk must be 1 ~
          return True
      return False
  
imports: import torch
  from apex._autocast_utils import _cast_if_autocast_enabled
  from apex.transformer.enums import AttnMaskType
label_desc: Use image node_id 2 for calling the GenericFusedScaleMaskSoftmax obj's underlying member method code with example usage: obj.is_kernel_available(mask, b, np, sq, sk) and returns: False, True