class_docstr: Tests ``fully_shard`` with mixed precision.
class_docstr_tok: ["Tests","``","fully_shard","``","with","mixed","precision","."]
code: def test_float16_cast_forward(self):
      self.run_subtests(
          {
              "cast_root_forward_inputs_submodule": [True, False],
              "cast_forward_inputs_submodule": [True, False],
              "use_root_no_params": [True, False],
          },
          self._test_float16_cast_forward,
      )
  
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 2 for calling the TestMixedPrecision obj's underlying member method code with example usage: obj.test_float16_cast_forward() without return types