code: def _create_dino_pretraining_config(
      with_fsdp: bool, with_mixed_precision: bool, gpu_count: int = 2
  ):
      cfg = compose_hydra_configuration(
          [
              "config=test/performance/dino_vit",
              "config.SEED_VALUE=0",
              "config.DATA.TRAIN.DATA_SOURCES=[synthetic]",
              "config.DATA.TRAIN.BATCHSIZE_PER_REPLICA=4",
              "config.DATA.TRAIN.RANDOM_SYNTHETIC_IMAGES=True",
              "config.DATA.TRAIN.DATA_LIMIT=32",
              "config.DATA.TRAIN.USE_DEBUGGING_SAMPLER=True",
              "config.LOG_FREQUENCY=1",
              "config.REPRODUCIBILITY.CUDDN_DETERMINISTIC=True",
              "config.OPTIMIZER.num_epochs=4",
              f"config.DISTRIBUTED.NUM_PROC_PER_NODE={gpu_count}",
              # Options to override to get FSDP
              "config.MODEL.TRUNK.NAME=vision_transformer",
              "config.MODEL.AMP_PARAMS.AMP_TYPE=pytorch",
              f"config.MODEL.AMP_PARAMS.USE_AMP={with_mixed_precision}",
              "config.OPTIMIZER.construct_single_param_group_only=True",
              "config.MODEL.FSDP_CONFIG.AUTO_WRAP_THRESHOLD=0",
          ]
      )
      args, config = convert_to_attrdict(cfg)
      if with_fsdp:
          config["MODEL"]["TRUNK"]["NAME"] = "vision_transformer_fsdp"
          config["MODEL"]["HEAD"]["PARAMS"][0][0] = "dino_head_fsdp"
          config.TRAINER.TASK_NAME = "self_supervision_fsdp_task"
          config.MODEL.FSDP_CONFIG.mixed_precision = (
              with_mixed_precision
          )
          config.MODEL.FSDP_CONFIG.fp32_reduce_scatter = (
              with_mixed_precision
          )
          config.MODEL.FSDP_CONFIG.compute_dtype = torch.float32
      return config
  
file_path: vissl/tests/bench_vit_fsdp.py
imports: import argparse
  import contextlib
  from dataclasses import dataclass
  import torch
  import torch.multiprocessing
  import torch.nn
  from vissl.models import build_model
  from vissl.utils.fsdp_utils import fsdp_wrapper
  from vissl.utils.hydra_config import compose_hydra_configuration, convert_to_attrdict
  from vissl.utils.layer_memory_tracking import LayerwiseMemoryTracker
  from vissl.utils.profiler import create_runtime_profiler
  from vissl.utils.test_utils import in_temporary_directory, init_distributed_on_file, with_temp_files, with_timing
label_desc: Use image node_id 1 for calling the BenchVitFSDP obj's underlying member method code with example usage: obj._create_dino_pretraining_config(with_fsdp, with_mixed_precision, gpu_count) and returns: config