class_docstr: A DefaultReshapeHandler which deals with the sharding strategies for Reshape Op, such as torch.reshape.
class_docstr_tok: ["A","DefaultReshapeHandler","which","deals","with","the","sharding","strategies","for","Reshape","Op",",","such","as","torch.reshape","."]
code: def get_operation_data_mapping(self) -> Dict[str, OperationData]:
      # use transposed shape for strategies
      # the strategies will be transformed back to its original shape in self.post_process
  
      # check if the input operand is a parameter
      if isinstance(
          self.node.args[0]._meta_data, torch.nn.parameter.Parameter
      ):
          data_type = OperationDataType.PARAM
      else:
          data_type = OperationDataType.ARG
  
      input_data = self.node.args[0]._meta_data
      input_logical_shape = self.infer_logical_shape(input_data)
      physical_input_operand = OperationData(
          name=str(self.node.args[0]),
          type=data_type,
          data=input_data,
          logical_shape=input_logical_shape,
      )
  
      output_data = self.node._meta_data
      output_logical_shape = self.infer_logical_shape(output_data)
      physical_output = OperationData(
          name=str(self.node),
          type=OperationDataType.OUTPUT,
          data=output_data,
          logical_shape=output_logical_shape,
      )
  
      mapping = {
          "input": physical_input_operand,
          "output": physical_output,
      }
  
      return mapping
  
file_path: ColossalAI/colossalai/auto_parallel/tensor_shard/node_handler/default_reshape_handler.py
imports: from typing import Dict, List
  import torch
  from ..sharding_strategy import OperationData, OperationDataType
  from .node_handler import MetaInfoNodeHandler
  from .registry import operator_registry
  from .strategy import DefaultReshapeGenerator, StrategyGenerator
label_desc: Use image node_id 3 for calling the DefaultReshapeHandler obj's underlying member method code with example usage: obj.get_operation_data_mapping() and returns: mapping