From 7d4bafcea55fa829c0b64a4eefce99fb8e1c7c35 Mon Sep 17 00:00:00 2001 From: yifan_shen3 Date: Thu, 11 Apr 2024 00:06:59 -0700 Subject: [PATCH] Core ML Has Added `Index_Put` Support, No Need to Skip Anymore (#2975) Summary: It was a workaround to skip `aten.index_put` op in Core ML delegation, at the cost of partitioning the Llama model into 13 pieces. For better performance, we prefer to delegate the whole model to Core ML. Since Core ML has added the [necessary support](https://github.com/apple/coremltools/pull/2190), it is time to revert this workaround Pull Request resolved: https://github.com/pytorch/executorch/pull/2975 Reviewed By: kirklandsign Differential Revision: D56002979 Pulled By: cccclai fbshipit-source-id: e7a7c8c43706cb57eba3e6f720b3d713bec5065b --- examples/models/llama2/export_llama_lib.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/examples/models/llama2/export_llama_lib.py b/examples/models/llama2/export_llama_lib.py index de1e711a2c..9dedbf4779 100644 --- a/examples/models/llama2/export_llama_lib.py +++ b/examples/models/llama2/export_llama_lib.py @@ -605,9 +605,6 @@ def _export_llama(modelname, args) -> str: # noqa: C901 partitioners.append( # pyre-ignore: Undefined attribute [16]: Module `executorch.backends` has no attribute `apple` CoreMLPartitioner( - skip_ops_for_coreml_delegation=[ - "aten.index_put.default", - ], compile_specs=compile_specs, ) )