apple / apple/coremltools

aten.alias.default operation is not supported by Coremltools converter.

Open
#2,517 10 comments 1 reaction 0 assignees View on GitHub
missing layer type PyTorch (traced) triaged
Dominant language
Python
Stars
5.4k
Forks
850
Avg merge
4d 5h
Merged PRs (30d)
10

Description

## 🌱 Describe your Feature Request
- Please provide a description of your feature request, clear and consise.
- If this is a feature request for the Core ML Framework or Xcode, please instead submit your feature request using the Feedback Assistant for Developers:
https://developer.apple.com/bug-reporting/

aten.alias.default operation is not supported by Coremltools converter.

## How can this feature be used?
Please provide some examples where this feature can be used.

Trying to convert complex model from Torch to CoreML model.

## Describe alternatives you've considered
NO alternative.

## Additional context
Stack trace:
```
File "/opt/anaconda3/envs/uat/lib/python3.11/site-packages/coremltools/converters/mil/frontend/torch/converter.py", line 633, in __init__
self.graph = InternalTorchIRGraph.from_exir(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/anaconda3/envs/uat/lib/python3.11/site-packages/coremltools/converters/mil/frontend/torch/internal_graph.py", line 590, in from_exir
nodes.append(InternalTorchIRNode.from_exir_node(node=node))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/anaconda3/envs/uat/lib/python3.11/site-packages/coremltools/converters/mil/frontend/torch/internal_graph.py", line 289, in from_exir_node
raise ValueError(f"Unsupported fx node {str(node)}, kind {kind}")
ValueError: Unsupported fx node alias, kind alias
```

Contributor guide

Open the contributing guide

Research direction

Start in converters/mil/frontend/torch/internal_graph.py at InternalTorchIRNode.from_exir_node, then trace how converter.py builds the graph. Reproduce the Torch-to-Core ML conversion that emits aten.alias.default and verify it no longer raises the unsupported FX node error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.