docstr: get cuda model data used by params
docstr_tok: ["get","cuda","model","data","used","by","params"]
code: def record_model_data_volume(self, params):
      """
      get cuda model data used by params
      """
      data_volume = self._grad_stats.unreleased_grad_volume
      for p in params:
          cur_model_data_volume = p.data.numel() * p.data.element_size()
          data_volume += cur_model_data_volume
          if (
              self._training_phase == TrainingPhase.BACKWARD
              and p.requires_grad
          ):
              # add param.grad, actually param.grad is None in this time
              data_volume += cur_model_data_volume
              if not self._grad_stats.unreleased_grad_flag[p]:
                  self._grad_stats.unreleased_grad_volume += (
                      cur_model_data_volume
                  )
                  self._grad_stats.unreleased_grad_flag[p] = True
      # record max non model data used for this Op
      self._memstats.record_max_cuda_model_data(data_volume)
  
imports: from contextlib import contextmanager
  from enum import Enum
  from functools import partial
  from typing import List
  import torch
  from colossalai.legacy.zero.gemini.tensor_utils import alloc_storage, free_storage
  from colossalai.tensor.param_op_hook import ColoParamOpHook
  from colossalai.zero.gemini.memory_tracer import MemStats, SyncCudaMemoryMonitor
label_desc: Use image node_id 4 for calling the ParamMemTracerHook obj's underlying member method code with example usage: obj.record_model_data_volume(params) without return types