class_docstr: IPEX strategy.
docstr: Create a IPEXStrategy.
  
  :param accelerator: the accelerator to handle hardware
  :param precision_plugin: the plugin to handle precision-specific parts
docstr_tok: ["Create","a","IPEXStrategy",".",":","param","accelerator",":","the","accelerator","to","handle","hardware",":","param","precision_plugin",":","the","plugin","to","handle","precision-specific","parts"]
code: def __init__(
      self,
      accelerator: Accelerator = None,
      precision_plugin: PrecisionPlugin = PrecisionPlugin(),
      dtype=None,
  ) -> None:
      """
      Create a IPEXStrategy.
  
      :param accelerator: the accelerator to handle hardware
      :param precision_plugin: the plugin to handle precision-specific parts
      """
      self.dtype = dtype
  
      if self.dtype == torch.bfloat16 and isinstance(
          precision_plugin, PrecisionPlugin
      ):
          precision_plugin = IPEXBF16Precision()
      super().__init__(
          accelerator=accelerator, precision_plugin=precision_plugin
      )
  
imports: import operator
  from contextlib import contextmanager
  from functools import partial
  from logging import warning
  from typing import Any, Union, Callable
  import torch
  from torch.nn import Module
  from torch.optim import Optimizer, LBFGS
  import pytorch_lightning
  from pytorch_lightning.strategies import SingleDeviceStrategy
  from pytorch_lightning.accelerators.accelerator import Accelerator
  from pytorch_lightning.plugins.precision import PrecisionPlugin
  from bigdl.nano.utils.common import compare_version
  from bigdl.nano.utils.common import invalidInputError
  from bigdl.nano.deps.ipex.ipex_api import ipex_optimize
label_desc: Use image node_id 1 to create a new IPEXStrategy object from inherited base classes: SingleDeviceStrategy with example: obj = IPEXStrategy(accelerator, precision_plugin, dtype)