code: def generate_csv_dict(
      pipeline_cls: str, args, time: float, memory: float
  ) -> Dict[str, Union[str, bool, float]]:
      """Packs benchmarking data into a dictionary for latter serialization."""
      data_dict = {
          "pipeline_cls": pipeline_cls,
          "ckpt_id": args.ckpt,
          "bf16": not args.no_bf16,
          "sdpa": not args.no_sdpa,
          "fused_qkv_projections": args.enable_fused_projections,
          "upcast_vae": "NA"
          if "PixArt" in pipeline_cls
          else args.upcast_vae,
          "batch_size": args.batch_size,
          "num_inference_steps": args.num_inference_steps,
          "compile_unet": args.compile_transformer
          if "PixArt" in pipeline_cls
          else args.compile_unet,
          "compile_vae": args.compile_vae,
          "compile_mode": args.compile_mode,
          "change_comp_config": args.change_comp_config,
          "do_quant": args.do_quant,
          "time (secs)": time,
          "memory (gbs)": memory,
          "actual_gpu_memory (gbs)": f"{(TOTAL_GPU_MEMORY):.3f}",
          "tag": args.tag,
      }
      if "PixArt" in pipeline_cls:
          data_dict["compile_transformer"] = data_dict.pop(
              "compile_unet"
          )
      return data_dict
  
file_path: diffusion-fast/utils/benchmarking_utils.py
imports: import argparse
  import copy
  import csv
  import gc
  from typing import Dict, List, Union
  import torch
  import torch.utils.benchmark
label_desc: Use image node_id 5 for calling a global function with example usage: generate_csv_dict(pipeline_cls, args, time, memory) and returns: data_dict