class_docstr: Tests ``fully_shard`` with mixed precision.
class_docstr_tok: ["Tests","``","fully_shard","``","with","mixed","precision","."]
code: def _test_float16_cast_forward(
      self,
      cast_root_forward_inputs_submodule: bool,
      cast_forward_inputs_submodule: bool,
      use_root_no_params: bool,
  ):
      cast_forward_cfg = (
          cast_root_forward_inputs_submodule,
          cast_forward_inputs_submodule,
      )
      x, fsdp = self._input_and_model_init(
          *cast_forward_cfg, use_root_no_params
      )
      # self._validate_eval(x, fsdp)
      self._backward_or_validate_error(x, fsdp, *cast_forward_cfg)
      self._assert_expected_dtypes(
          fsdp, *cast_forward_cfg, use_root_no_params
      )
  
file_path: pytorch/test/distributed/_composable/fully_shard/test_fully_shard_mixed_precision.py
imports: import sys
  from typing import Dict, NamedTuple, Optional
  import torch
  import torch.distributed
  import torch.nn
  from torch.distributed._composable import fully_shard
  from torch.distributed.fsdp import MixedPrecision
  from torch.testing._internal.common_distributed import SaveForwardInputsModel, skip_if_lt_x_gpu
  from torch.testing._internal.common_fsdp import FSDPTest
  from torch.testing._internal.common_utils import run_tests, TEST_WITH_DEV_DBG_ASAN
label_desc: Use image node_id 3 for calling the TestMixedPrecision obj's underlying member method code with example usage: obj._test_float16_cast_forward(cast_root_forward_inputs_submodule, cast_forward_inputs_submodule, use_root_no_params) without return types