code: def PytorchIPEXJITModel(
      model,
      input_sample=None,
      use_ipex=False,
      use_jit=False,
      channels_last=None,
      thread_num=None,
      inplace=False,
      jit_strict=True,
      jit_method=None,
      weights_prepack=None,
      enable_onednn=False,
      example_kwarg_inputs=None,
  ):
      """
      :param model: the model(nn.module) to be transform.
      :param input_sample: torch tensor indicate the data sample to be used
              for tracing.
      :param use_ipex: if use ipex to optimize the model
      :param use_jit: if use jit to accelerate the model
      :param channels_last: if set model and data to be channels-last mode.
      :param thread_num: the thread num allocated for this model.
      :param inplace: whether to perform inplace optimization. Default: ``False``.
      :param jit_strict: Whether recording your mutable container types.
      :param jit_method: use ``jit.trace`` or ``jit.script`` to
             convert a model to TorchScript.
      :param weights_prepack: Whether to perform weight prepack for convolution and linear
             to avoid oneDNN weights reorder. The default value is None. Explicitly setting
             this knob overwrites the configuration set by level knob. Only valid when
             ``use_ipex=True``, otherwise will be ignored.
      :param enable_onednn: Whether to use PyTorch JIT graph fuser based on oneDNN Graph
             API, which provides a flexible API for aggressive fusion. Default to
             ``False``, only valid when use_jit is ``True``, otherwise will be ignored.
      :param example_kwarg_inputs: keyword arguments of example inputs that will be passed
             to ``torch.jit.trace``. Default to None. Either this argument or input_sample
             should be specified when use_jit is ``True`` and torch > 2.0,
             otherwise will be ignored.
      """
      from .ipex_inference_model import PytorchIPEXJITModel
  
      return PytorchIPEXJITModel(
          model,
          input_sample=input_sample,
          use_ipex=use_ipex,
          use_jit=use_jit,
          channels_last=channels_last,
          thread_num=thread_num,
          inplace=inplace,
          jit_strict=jit_strict,
          jit_method=jit_method,
          weights_prepack=weights_prepack,
          enable_onednn=enable_onednn,
          example_kwarg_inputs=example_kwarg_inputs,
      )
  
file_path: BigDL/python/nano/src/bigdl/nano/deps/ipex/ipex_api.py
imports: from typing import Any
  from bigdl.nano.utils.common import invalidInputError
label_desc: Use image node_id 2 for calling a global function with example usage: PytorchIPEXJITModel(model, input_sample, use_ipex, use_jit, channels_last, thread_num, inplace, jit_strict, jit_method, weights_prepack, enable_onednn, example_kwarg_inputs) and returns: PytorchIPEXJITModel