docstr: Loads a compiled Core ML model.
  
  Parameters
  ----------
  path : str
      The path to a compiled model directory, ending in ``.mlmodelc``.
  
  compute_units : coremltools.ComputeUnit
      An enum with the following possible values:
          - ``coremltools.ComputeUnit.ALL``: Use all compute units available, including the
            neural engine.
          - ``coremltools.ComputeUnit.CPU_ONLY``: Limit the model to only use the CPU.
          - ``coremltools.ComputeUnit.CPU_AND_GPU``: Use both the CPU and GPU, but not the
            neural engine.
          - ``coremltools.ComputeUnit.CPU_AND_NE``: Use both the CPU and neural engine, but
            not the GPU. Available only for macOS >= 13.0.
  
  Examples
  --------
  .. sourcecode:: python
  
      my_compiled_model = ct.models.CompiledMLModel("my_model_path.mlmodelc")
      y = my_compiled_model.predict({'x': 3})
  
  See Also
  --------
  predict
docstr_tok: ["Loads","a","compiled","Core","ML","model",".","Parameters","--","--","--","--","--","path",":","str","The","path","to","a","compiled","model","directory",",","ending","in","``",".mlmodelc","``",".","compute_units",":","coremltools.ComputeUnit","An","enum","with","the","following","possible","values",":","-","``","coremltools.ComputeUnit.ALL","``",":","Use","all","compute","units","available",",","including","the","neural","engine",".","-","``","coremltools.ComputeUnit.CPU_ONLY","``",":","Limit","the","model","to","only","use","the","CPU",".","-","``","coremltools.ComputeUnit.CPU_AND_GPU","``",":","Use","both","the","CPU","and","GPU",",","but","not","the","neural","engine",".","-","``","coremltools.ComputeUnit.CPU_AND_NE","``",":","Use","both","the","CPU","and","neural","engine",",","but","not","the","GPU",".","Available","only","for","macOS",">","=","13.0",".","Examples","--","--","--","--","..","sourcecode",":",":","python","my_compiled_model","=","ct.models.CompiledMLModel","(","``","my_model_path.mlmodelc","''",")","y","=","my_compiled_model.predict","(","{","'","x","'",":","3","}",")","See","Also","--","--","--","--","predict"]
code: def __init__(
      self, path: str, compute_units: _ComputeUnit = _ComputeUnit.ALL
  ):
      """
      Loads a compiled Core ML model.
  
      Parameters
      ----------
      path : str
          The path to a compiled model directory, ending in ``.mlmodelc``.
  
      compute_units : coremltools.ComputeUnit
          An enum with the following possible values:
              - ``coremltools.ComputeUnit.ALL``: Use all compute units available, including the
                neural engine.
              - ``coremltools.ComputeUnit.CPU_ONLY``: Limit the model to only use the CPU.
              - ``coremltools.ComputeUnit.CPU_AND_GPU``: Use both the CPU and GPU, but not the
                neural engine.
              - ``coremltools.ComputeUnit.CPU_AND_NE``: Use both the CPU and neural engine, but
                not the GPU. Available only for macOS >= 13.0.
  
      Examples
      --------
      .. sourcecode:: python
  
          my_compiled_model = ct.models.CompiledMLModel("my_model_path.mlmodelc")
          y = my_compiled_model.predict({'x': 3})
  
      See Also
      --------
      predict
      """
      if _macos_version() < (10, 13):
          raise Exception(
              "Loading compiled Core ML models is only support on macOS 10.13 or higher."
          )
      if _MLModelProxy is None:
          raise Exception(
              "Unable to load any compiled models. This is most likely because"
              " coremltools was installed from an egg rather than a wheel."
          )
  
      if not isinstance(path, str):
          raise TypeError('The "path" parameter must be of type "str".')
      if not isinstance(compute_units, _ComputeUnit):
          raise TypeError(
              'The "compute_units" parameter must be of type: "coremltools.ComputeUnit".'
          )
  
      path = _expanduser(path)
  
      self._proxy = _MLModelProxy(path, compute_units.name)
  
imports: from os.path import expanduser
  from .model import MLModel
  from .utils import _macos_version
  from coremltools import ComputeUnit
label_desc: Use image node_id 1 to create a new CompiledMLModel object  with example: obj = CompiledMLModel(path, compute_units)