Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

let coreml leverage all backends #3683

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cccclai
Copy link
Contributor

@cccclai cccclai commented May 20, 2024

Summary:
coreml tools have 4 options for the ComputeUnit

class ComputeUnit(_Enum):
    '''
    The set of processing-unit configurations the model can use to make predictions.
    '''
    ALL = 1  # Allows the model to use all compute units available, including the neural engine
    CPU_AND_GPU = 2 # Allows the model to use both the CPU and GPU, but not the neural engine
    CPU_ONLY = 3 # Limit the model to only use the CPU
    CPU_AND_NE = 4 # Allows the model to use both the CPU and neural engine, but not the GPU.
                   # Only available on macOS >= 13.0

target to ALL so we can use ANE

Differential Revision: D57575739

Copy link

pytorch-bot bot commented May 20, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/3683

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit b8adb40 with merge base 39834b1 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 20, 2024
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D57575739

Summary:

coreml tools have 4 options for the [`ComputeUnit`](https://github.com/apple/coremltools/blob/9883e8d60aea3e7feeeec005c9a883576f6ce2eb/coremltools/__init__.py#L68-L77)

```
class ComputeUnit(_Enum):
    '''
    The set of processing-unit configurations the model can use to make predictions.
    '''
    ALL = 1  # Allows the model to use all compute units available, including the neural engine
    CPU_AND_GPU = 2 # Allows the model to use both the CPU and GPU, but not the neural engine
    CPU_ONLY = 3 # Limit the model to only use the CPU
    CPU_AND_NE = 4 # Allows the model to use both the CPU and neural engine, but not the GPU.
                   # Only available on macOS >= 13.0
```
target to ALL so we can use ANE

Differential Revision: D57575739
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D57575739

@cccclai
Copy link
Contributor Author

cccclai commented May 20, 2024

@cymbalrush @YifanShenSZ would like to hear your thoughts to use all backends

@cymbalrush
Copy link
Collaborator

@cccclai using CPU_AND_GPU was intentional, we are investigating why the model falls off ANE and once that's resolved we can set it to ALL .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants