From 28b0625159491ef375710367ed73d8ce52c1af3d 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 (cherry picked from commit 7d4bafcea55fa829c0b64a4eefce99fb8e1c7c35) --- 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 890c909f660..a9ff3e8c010 100644 --- a/examples/models/llama2/export_llama_lib.py +++ b/examples/models/llama2/export_llama_lib.py @@ -663,9 +663,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, ) )