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

Merge thinc-apple-ops into Thinc #927

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

danieldk
Copy link
Contributor

Description

This change adds AppleOps to Thinc, to ensure that the AMX unit is always used on Apple Silicon Macs. Before this change, a user would get much worse performance if they forgot to install thinc-apple-ops.

The apple_ops and _accelerate modules are built conditionally. When detecting the best CPU implementation, we rely on a try...except import to determine whether Apple ops are available.

Even though x86_64 Macs do not have an AMX unit, Accelerate is competitive with BLIS, so it does not hurt to enable Apple ops on all Macs.

Types of change

Feature

Checklist

  • I confirm that I have the right to submit this contribution under the project's MIT license.
  • I ran the tests, and all new and existing tests passed.
  • My changes don't require a change to the documentation, or if they do, I've added all required information.

@danieldk danieldk added performance Speed and memory use feat / ops Backends and maths labels Apr 15, 2024
@danieldk danieldk force-pushed the maintenance/add-apple-ops branch 2 times, most recently from 4902d6b to 6d1098d Compare April 15, 2024 08:58
This change adds `AppleOps` to Thinc, to ensure that the AMX unit is
always used on Apple Silicon Macs. Before this change, a user would get
much worse performance if they forgot to install `thinc-apple-ops`.

The `apple_ops` and `_accelerate` modules are built conditionally. When
detecting the best CPU implementation, we rely on a `try...except`
import to determine whether Apple ops are available.

Even though x86_64 Macs do not have an AMX unit, Accelerate is
competitive with BLIS, so it does not hurt to enable Apple ops on all
Macs.
@danieldk danieldk marked this pull request as ready for review April 15, 2024 09:29
@danieldk danieldk added the 🔜 v9.0 Related to upcoming v9.0 label Apr 15, 2024
@danieldk danieldk merged commit c998bf2 into explosion:v9 Apr 16, 2024
10 checks passed
@danieldk danieldk deleted the maintenance/add-apple-ops branch April 16, 2024 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat / ops Backends and maths performance Speed and memory use 🔜 v9.0 Related to upcoming v9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants