Skip to content

Commit 51c8e2a

Browse files
authored
Update coremltools from 9b to 9.0 (#15723)
As titled
1 parent 3e90b44 commit 51c8e2a

File tree

3 files changed

+5
-17
lines changed

3 files changed

+5
-17
lines changed

backends/apple/coreml/compiler/torch_ops.py

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
NUM_TO_TORCH_DTYPE,
2121
split,
2222
to,
23-
transpose,
24-
unbind,
2523
)
2624
from coremltools.converters.mil.frontend.torch.torch_op_registry import (
2725
register_torch_op,
@@ -30,18 +28,6 @@
3028
from executorch.exir.dim_order_utils import get_memory_format
3129

3230

33-
# https://github.com/apple/coremltools/pull/2556
34-
@register_torch_op(override=False)
35-
def transpose_copy(context, node):
36-
transpose(context, node)
37-
38-
39-
# https://github.com/apple/coremltools/pull/2557
40-
@register_torch_op(override=False)
41-
def unbind_copy(context, node):
42-
unbind(context, node)
43-
44-
4531
# https://github.com/apple/coremltools/pull/2563
4632
@register_torch_op(override=False)
4733
def split_copy(context, node):
@@ -117,7 +103,9 @@ def _clone_dim_order(context, node):
117103
# https://github.com/apple/coremltools/pull/2558
118104
@register_torch_op(
119105
torch_alias=["torchao::dequantize_affine", "torchao.dequantize_affine"],
120-
override=False,
106+
# coremltools did not merge the fix into 9.0 (https://github.com/apple/coremltools/pull/2589),
107+
# so we override here
108+
override=True,
121109
)
122110
def dequantize_affine(context, node):
123111
inputs = _get_inputs(context, node, expected=[7, 8])

backends/apple/coreml/test/test_coreml_recipes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ def forward(self, x):
326326
)
327327
self.check_fully_delegated(session)
328328

329-
self._compare_eager_quantized_model_outputs(session, example_inputs, atol=1e-3)
329+
self._compare_eager_quantized_model_outputs(session, example_inputs, atol=1e-2)
330330
self._compare_eager_unquantized_model_outputs(session, model, example_inputs)
331331

332332
def test_int8_weight_only_pt2e(self):

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ dependencies=[
7474
# See also third-party/TARGETS for buck's typing-extensions version.
7575
"typing-extensions>=4.10.0",
7676
# Keep this version in sync with: ./backends/apple/coreml/scripts/install_requirements.sh
77-
"coremltools==9.0b1; platform_system == 'Darwin' or platform_system == 'Linux'",
77+
"coremltools==9.0; platform_system == 'Darwin' or platform_system == 'Linux'",
7878
# scikit-learn is used to support palettization in the coreml backend
7979
"scikit-learn==1.7.1",
8080
"hydra-core>=1.3.0",

0 commit comments

Comments
 (0)