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 __init__(
      self,
      input_in_fp16,
      input_in_bf16,
      scaled_masked_softmax_fusion,
      mask_func,
      softmax_in_fp32,
      scale,
  ):
      super().__init__(
          input_in_fp16,
          input_in_bf16,
          AttnMaskType.padding,
          scaled_masked_softmax_fusion,
          mask_func,
          softmax_in_fp32,
          scale,
      )
      self.scaled_masked_softmax_fusion = generic_scaled_masked_softmax
  
imports: import torch
  from apex._autocast_utils import _cast_if_autocast_enabled
  from apex.transformer.enums import AttnMaskType
label_desc: Use image node_id 1 to create a new GenericFusedScaleMaskSoftmax object from inherited base classes: FusedScaleMaskSoftmax with example: obj = GenericFusedScaleMaskSoftmax(input_in_fp16, input_in_bf16, scaled_masked_softmax_fusion, mask_func, softmax_in_fp32, scale)