class_docstr: Fused operation which performs following three operations in sequence
  1. Scale the tensor.
  2. Apply upper triangular mask (typically used in gpt models).
  3. Perform softmax.
class_docstr_tok: ["Fused","operation","which","performs","following","three","operations","in","sequence","1",".","Scale","the","tensor",".","2",".","Apply","upper","triangular","mask","(","typically","used","in","gpt","models",")",".","3",".","Perform","softmax","."]
code: def backward(ctx, output_grads):
      softmax_results, scale_t = ctx.saved_tensors
      input_grads = scaled_upper_triang_masked_softmax_backward(
          output_grads, softmax_results, scale_t[0]
      )
      return input_grads, None
  
imports: import torch
  from apex._autocast_utils import _cast_if_autocast_enabled
  from apex.transformer.enums import AttnMaskType
  from fused_softmax_lib import scaled_masked_softmax_backward, scaled_masked_softmax_forward, scaled_masked_softmax_get_batch_per_block, scaled_upper_triang_masked_softmax_backward, scaled_upper_triang_masked_softmax_forward
label_desc: Use image node_id 2 for calling the ScaledUpperTriangMaskedSoftmax obj's underlying member method code with example usage: obj.backward(ctx, output_grads) and returns: input_grads,  None