code: def quantize_model_onednn(
      sym,
      arg_params,
      aux_params,
      data_names=("data",),
      device=cpu(),
      excluded_sym_names=None,
      excluded_op_names=None,
      calib_mode="entropy",
      calib_data=None,
      num_calib_batches=None,
      quantized_dtype="int8",
      quantize_mode="smart",
      quantize_granularity="tensor-wise",
      logger=None,
  ):
      """User-level API for generating a fusion + quantized model from a FP32 model
      w/ or w/o calibration with oneDNN.
      The backend quantized operators are only enabled for Linux systems. Please do not run
      inference using the quantized models on Windows for now.
  
      Parameters
      ----------
      all
          :ref:`As in quantize_model<quantize_model_params>`
  
  
      Returns
      -------
      quantized_model: tuple
          A tuple of quantized symbol, quantized arg_params, and aux_params.
      """
      if not isinstance(device, Device):
          raise ValueError(
              f"currently only supports single device, while received {str(device)}"
          )
      if device.device_type != "cpu":
          raise ValueError(
              "quantize_model_onednn only support Intel cpu platform with oneDNN Backend"
          )
  
      sym = sym.optimize_for(backend="ONEDNN_QUANTIZE")
  
      qsym, qarg_params, aux_params = quantize_model(
          sym=sym,
          arg_params=arg_params,
          aux_params=aux_params,
          data_names=data_names,
          device=device,
          excluded_sym_names=excluded_sym_names,
          excluded_op_names=excluded_op_names,
          calib_mode=calib_mode,
          calib_data=calib_data,
          num_calib_batches=num_calib_batches,
          quantized_dtype=quantized_dtype,
          quantize_mode=quantize_mode,
          quantize_granularity=quantize_granularity,
          logger=logger,
      )
  
      qsym = qsym.optimize_for(backend="ONEDNN_QUANTIZE")
  
      return qsym, qarg_params, aux_params
  
imports: import abc
  import ctypes
  import logging
  import os
  import warnings
  import numpy
  import mxnet
  from ..base import _LIB, check_call, py_str
  from ..base import c_array, c_str, mx_uint, mx_real_t, c_str_array
  from ..base import SymbolHandle
  from ..symbol import Symbol
  from ..None import ndarray
  from ..io import DataDesc
  from ..device import cpu, Device
  from ..util import is_np_array, wrap_ctx_to_device_func
label_desc: Use image node_id 8 for calling a global function with example usage: quantize_model_onednn(sym, arg_params, aux_params, data_names, device, excluded_sym_names, excluded_op_names, calib_mode, calib_data, num_calib_batches, quantized_dtype, quantize_mode, quantize_granularity, logger) and returns: qsym,  qarg_params,  aux_params