apple / apple/coremltools

Is torch.compile supported?

Open
#1,891 3 comments 3 reactions 0 assignees View on GitHub
awaiting response feature request PyTorch (traced)
Dominant language
Python
Stars
5.4k
Forks
850
Avg merge
4d 5h
Merged PRs (30d)
10

Description

Couldn't get it to work. Leaving `torch.jit.trace` on will crash and commenting it out coremltools complains

```
TypeError: @model must either be a PyTorch .pt or .pth file or a TorchScript object, received:
```

Can provide more info if needed

Contributor guide

Open the contributing guide

Research direction

No file or test is identified in the report. Start by reproducing the conversion with torch.compile, both with and without torch.jit.trace, and inspect the @model input that rejects the Sequential object; done means the support status and resulting failure are covered by a confirmed behavior or documented limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.