Skip to content

coremltools 7.1

Compare
Choose a tag to compare
@DawerG DawerG released this 01 Nov 14:46
· 91 commits to main since this release
dbb0094
  • New Features:

    • Supports Torch 2.1
      • Includes experimental support for torch.export API but limited to EDGE dialect.

      • Example usage:

        •  import torch 
           from torch.export import export
           from executorch.exir import to_edge
           
           import coremltools as ct
           
           example_args = (torch.randn(*size), )
           aten_dialect = export(AnyNNModule(), example_args)
           edge_dialect = to_edge(aten_dialect).exported_program()
           edge_dialect._dialect = "EDGE"
           
           mlmodel = ct.convert(edge_dialect)
          
  • Enhancements:

    • API - ct.utils.make_pipeline - now allows specifying compute_units
    • New optimization passes:
      • Folds selective data movement ops like reshape, transpose into adjacent constant compressed weights
      • Casts int32 → int16 dtype for all intermediate tensors when compute precision is set to fp16
    • PyTorch op - multinomial - Adds lowering for it to CoreML
    • Type related refinements on Pad and Gather/Gather-like ops
  • Bug Fixes:

    • Fixes coremltools build issue related to kmeans1d package
    • Minor fixes in lowering of PyTorch ops: masked_fill & randint
  • Various other bug fixes, enhancements, clean ups and optimizations.