class_docstr: Layernorm.
  
  Args:
      input (:class:`torch.tensor`): input matrix.
      E_x (:class:`torch.tensor`): mean.
      Var_x (:class:`torch.tensor`): variance.
      hidden_size (int): hidden size.
      row_parallel_mode (:class:`colossalai.legacy.context.ParallelMode`): row parallel mode.
  
  Note:
      The parallel_mode should be concluded in ``ParallelMode``. More details about ``ParallelMode`` could be found
      in `parallel_mode <https://github.com/hpcaitech/ColossalAI/blob/main/colossalai/context/parallel_mode.py>`_
class_docstr_tok: ["Layernorm",".","Args",":","input","(",":","class",":","`","torch.tensor","`",")",":","input","matrix",".","E_x","(",":","class",":","`","torch.tensor","`",")",":","mean",".","Var_x","(",":","class",":","`","torch.tensor","`",")",":","variance",".","hidden_size","(","int",")",":","hidden","size",".","row_parallel_mode","(",":","class",":","`","colossalai.legacy.context.ParallelMode","`",")",":","row","parallel","mode",".","Note",":","The","parallel_mode","should","be","concluded","in","``","ParallelMode","``",".","More","details","about","``","ParallelMode","``","could","be","found","in","`","parallel_mode","<","https",":","\/\/github.com\/hpcaitech\/ColossalAI\/blob\/main\/colossalai\/context\/parallel_mode.py",">","`","_"]
code: def forward(
      ctx: Any,
      input: Tensor,
      E_x: Tensor,
      Var_x: Tensor,
      hidden_size: int,
      row_parallel_mode: ParallelMode,
  ) -> Tensor:
      input = input - E_x
      # in here, input = x - E[x], Var_x = 1 / sqrt(Var[x] + eps)
      ctx.hidden_size = hidden_size
      output = input * Var_x
      ctx.save_for_backward(output, Var_x)
      ctx.row_parallel_mode = row_parallel_mode
      return output
  
imports: from typing import Any, Tuple
  import torch
  import torch.distributed
  from torch import Tensor
  from torch.cuda.amp import custom_bwd, custom_fwd
  from colossalai.legacy.communication.collective import all_gather, all_reduce, reduce_scatter
  from colossalai.legacy.context.parallel_mode import ParallelMode
  from colossalai.legacy.core import global_context
  from colossalai.utils import get_current_device
label_desc: Use image node_id 1 for calling the _Layernorm2p5D obj's underlying member method code with example usage: obj.forward(ctx, input, E_x, Var_x, hidden_size, row_parallel_mode) and returns: output