From 5d3ed88c3244acea1c8aa3a5b389d50cf5698924 Mon Sep 17 00:00:00 2001 From: yifan_shen3 Date: Tue, 5 Nov 2024 10:26:12 -0800 Subject: [PATCH 1/2] bump coremltools version to 8.1 --- backends/apple/coreml/scripts/install_requirements.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/apple/coreml/scripts/install_requirements.sh b/backends/apple/coreml/scripts/install_requirements.sh index b3ea0d77ca0..b6a0a18b771 100755 --- a/backends/apple/coreml/scripts/install_requirements.sh +++ b/backends/apple/coreml/scripts/install_requirements.sh @@ -24,7 +24,7 @@ rm -rf "$COREML_DIR_PATH/third-party" mkdir "$COREML_DIR_PATH/third-party" echo "${green}ExecuTorch: Cloning coremltools." -git clone --depth 1 --branch 8.0 "https://github.com/apple/coremltools.git" $COREMLTOOLS_DIR_PATH +git clone --depth 1 --branch 8.1 "https://github.com/apple/coremltools.git" $COREMLTOOLS_DIR_PATH cd $COREMLTOOLS_DIR_PATH STATUS=$? From 6ea40925c3fd3a16435391408b7392b8fc2586d0 Mon Sep 17 00:00:00 2001 From: yifan_shen3 Date: Tue, 5 Nov 2024 10:28:03 -0800 Subject: [PATCH 2/2] as torch.any gets supported in coreml, its no longer skipped in partitioner --- .../coreml/test/test_coreml_partitioner.py | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/backends/apple/coreml/test/test_coreml_partitioner.py b/backends/apple/coreml/test/test_coreml_partitioner.py index 72a7fbf0932..64e1570f0bc 100644 --- a/backends/apple/coreml/test/test_coreml_partitioner.py +++ b/backends/apple/coreml/test/test_coreml_partitioner.py @@ -71,23 +71,15 @@ def test_vit_skip_conv(self): ) ) - conv_block = ["aten.convolution.default", "executorch_call_delegate"] - safe_softmax_block = [ - "getitem", - "getitem", - "getitem", - "getitem", - "aten.any.dim", - "executorch_call_delegate", - ] - final_block = ["getitem"] - total = conv_block + 12 * safe_softmax_block + final_block - assert [ node.target.__name__ for node in delegated_program_manager.exported_program().graph.nodes if node.op == "call_function" - ] == total + ] == [ + "aten.convolution.default", + "executorch_call_delegate", + "getitem", + ] def test_buffer(self): embedding_dim = 3