File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
backends/apple/coreml/compiler Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 1212import torch as _torch
1313from coremltools import _logger
1414from coremltools .converters .mil .frontend import _utils
15+ from coremltools .converters .mil .frontend .torch .dom_order_ops import (
16+ _empty_dim_order ,
17+ _to_dim_order_copy ,
18+ )
1519from coremltools .converters .mil .frontend .torch .ops import (
1620 _get_inputs ,
1721 NUM_TO_NUMPY_DTYPE ,
@@ -44,6 +48,20 @@ def split_copy(context, node):
4448 split (context , node )
4549
4650
51+ # This is a temporary hack to register the alias "dim_order_ops._to_dim_order_copy",
52+ # which was missed by coremltools
53+ @register_torch_op (torch_alias = ["dim_order_ops._to_dim_order_copy" ], override = False )
54+ def _to_dim_order_copy_TMP_EXECUTORCH_ALIAS_HACK (context , node ):
55+ return _to_dim_order_copy (context , node )
56+
57+
58+ # This is a temporary hack to register the alias "dim_order_ops._empty_dim_order",
59+ # which was missed by coremltools
60+ @register_torch_op (torch_alias = ["dim_order_ops._empty_dim_order" ], override = False )
61+ def _empty_dim_order_TMP_EXECUTORCH_ALIAS_HACK (context , node ):
62+ return _empty_dim_order (context , node )
63+
64+
4765# https://github.com/apple/coremltools/pull/2558
4866@register_torch_op (
4967 torch_alias = ["torchao::dequantize_affine" , "torchao.dequantize_affine" ],
You can’t perform that action at this time.
0 commit comments