class_docstr: Linear layer with row parallelism.
  
  The linear layer is defined as Y = XA + b. A is parallelized along
  its first dimension and X along its second dimension as:
             -   -
            | A_1 |
            | .   |
        A = | .   |        X = [X_1, ..., X_p]
            | .   |
            | A_p |
             -   -
  
  .. note::
      Input is supposed to be three dimensional and each dimension
      is expected to be sequence, batch, and hidden feature, respectively.
  
  Arguments:
      input_size: first dimension of matrix A.
      output_size: second dimension of matrix A.
      bias: If true, add bias. Note that bias is not parallelized.
      input_is_parallel: If true, we assume that the input is already
                         split across the GPUs and we do not split
                         again.
      init_method: method to initialize weights. Note that bias is always set
                   to zero.
      stride: For the strided linear layers.
      keep_master_weight_for_test: This was added for testing and should be
                                   set to False. It returns the master weights
                                   used for initialization.
      skip_bias_add: This was added to enable performance optimization where bias
                     can be fused with other elementwise operations. We skip
                     adding bias but instead return it.
  Keyword Arguments:
      params_dtype:
      use_cpu_initialization:
      gradient_accumulation_fusion:
      sequence_parallel_enabled:
      accumulation_in_fp16: Deprecated
docstr: Forward of RowParallelLinear
  
  Args:
      input_: 3D tensor whose order of dimension is [sequence, batch, hidden]
  
  Returns:
      - output
      - bias
docstr_tok: ["Forward","of","RowParallelLinear","Args",":","input_",":","3D","tensor","whose","order","of","dimension","is","[","sequence",",","batch",",","hidden","]","Returns",":","-","output","-","bias"]
code: def forward(
      self, input_: torch.Tensor
  ) -> Tuple[torch.Tensor, Optional[torch.Tensor]]:
      """Forward of RowParallelLinear
  
      Args:
          input_: 3D tensor whose order of dimension is [sequence, batch, hidden]
  
      Returns:
          - output
          - bias
      """
      # Set up backprop all-reduce.
      if self.input_is_parallel:
          input_parallel = input_
      else:
          assert not self.sequence_parallel_enabled
          input_parallel = scatter_to_tensor_model_parallel_region(
              input_
          )
      # Matrix multiply.
      output_parallel = self._forward_impl(
          input=input_parallel,
          weight=self.weight,
          bias=None,
          gradient_accumulation_fusion=self.gradient_accumulation_fusion,
          async_grad_allreduce=False,
          sequence_parallel_enabled=False,
      )
      # All-reduce across all the partitions.
      if self.sequence_parallel_enabled:
          output_ = reduce_scatter_to_sequence_parallel_region(
              output_parallel
          )
      else:
          output_ = reduce_from_tensor_model_parallel_region(
              output_parallel
          )
      if not self.skip_bias_add:
          output = (
              output_ + self.bias if self.bias is not None else output_
          )
          output_bias = None
      else:
          output = output_
          output_bias = self.bias
      return output, output_bias
  
imports: from typing import Optional, Dict, Tuple, List
  import warnings
  import torch
  import torch.nn.functional
  import torch.nn.init
  from torch.nn.parameter import Parameter
  from apex._autocast_utils import _cast_if_autocast_enabled
  from apex.transformer.parallel_state import get_tensor_model_parallel_group
  from apex.transformer.parallel_state import get_tensor_model_parallel_rank
  from apex.transformer.parallel_state import get_tensor_model_parallel_world_size
  from apex.transformer.utils import divide
  from apex.transformer.tensor_parallel.mappings import copy_to_tensor_model_parallel_region
  from apex.transformer.tensor_parallel.mappings import gather_from_tensor_model_parallel_region
  from apex.transformer.tensor_parallel.mappings import reduce_from_tensor_model_parallel_region
  from apex.transformer.tensor_parallel.mappings import scatter_to_tensor_model_parallel_region
  from apex.transformer.tensor_parallel.mappings import reduce_scatter_to_sequence_parallel_region
  from apex.transformer.tensor_parallel.random import get_cuda_rng_tracker
  from apex.transformer.tensor_parallel.utils import VocabUtility
  from apex.transformer.log_util import get_transformer_logger
label_desc: Use image node_id 2 for calling the RowParallelLinear obj's underlying member method code with example usage: obj.forward(input_) and returns: output,  output_bias