code: def test_ipex_jit_inference_onednn(self):
      # test jit + ipex
      model = InferenceOptimizer.trace(
          self.model,
          accelerator="jit",
          use_ipex=True,
          input_sample=self.data_sample,
          enable_onednn=True,
      )
      with InferenceOptimizer.get_context(model):
          model(self.data_sample)
      with tempfile.TemporaryDirectory() as tmp_dir_name:
          InferenceOptimizer.save(model, tmp_dir_name)
          new_model = InferenceOptimizer.load(tmp_dir_name)
      with InferenceOptimizer.get_context(new_model):
          new_model(self.data_sample)
          assert new_model.enable_onednn is True
          if compare_version("torch", operator.ge, "1.12.0"):
              # onednn fusion be added to torch from version 1.12
              assert torch.jit.onednn_fusion_enabled() is True
  
      model = InferenceOptimizer.trace(
          self.model,
          accelerator="jit",
          use_ipex=True,
          input_sample=self.data_sample,
          enable_onednn=False,
      )
      with InferenceOptimizer.get_context(model):
          model(self.data_sample)
      with tempfile.TemporaryDirectory() as tmp_dir_name:
          InferenceOptimizer.save(model, tmp_dir_name)
          new_model = InferenceOptimizer.load(tmp_dir_name)
      with InferenceOptimizer.get_context(new_model):
          new_model(self.data_sample)
          assert new_model.enable_onednn is False
          if compare_version("torch", operator.ge, "1.12.0"):
              # onednn fusion be added to torch from version 1.12
              assert torch.jit.onednn_fusion_enabled() is False
  
      # test jit
      model = InferenceOptimizer.trace(
          self.model,
          accelerator="jit",
          input_sample=self.data_sample,
          enable_onednn=True,
      )
      with InferenceOptimizer.get_context(model):
          model(self.data_sample)
      with tempfile.TemporaryDirectory() as tmp_dir_name:
          InferenceOptimizer.save(model, tmp_dir_name)
          new_model = InferenceOptimizer.load(tmp_dir_name, self.model)
      with InferenceOptimizer.get_context(new_model):
          new_model(self.data_sample)
          assert new_model.enable_onednn is True
  
imports: import os
  from unittest import TestCase
  import operator
  import pytest
  import torch
  from torch.utils.data import TensorDataset, DataLoader, Dataset
  from test.pytorch.utils._train_torch_lightning import create_data_loader, data_transform
  from torch import nn
  import operator
  from bigdl.nano.pytorch import InferenceOptimizer
  from bigdl.nano.pytorch.vision.models import vision
  from bigdl.nano.utils.pytorch import TORCH_VERSION_LESS_1_10, TORCH_VERSION_LESS_2_0
  from bigdl.nano.utils.common import compare_version, _avx512_checker, _avx2_checker
  import tempfile
  from typing import List
  import numpy
label_desc: Use image node_id 16 for calling the IPEXJITInference obj's underlying member method code with example usage: obj.test_ipex_jit_inference_onednn() without return types