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

proposal: arm support #189

Open
mmcloughlin opened this issue Apr 26, 2021 · 5 comments
Open

proposal: arm support #189

mmcloughlin opened this issue Apr 26, 2021 · 5 comments
Labels
proposal Ideas for discussion

Comments

@mmcloughlin
Copy link
Owner

ARM is an increasingly important architecture. avo should support it.

@lizthegrey
Copy link

tagging @AGSaidi and @AWSjswinney

@mmcloughlin
Copy link
Owner Author

Posted golang/go#44734 (comment) to see if there's any chance that @erifan at ARM might be able to help with the instruction database side of this work. A "source of truth" shared with the Go assembler would be incredibly valuable.

@mmcloughlin
Copy link
Owner Author

Worth noting here that ARM support in the Go assembler is actively being worked on. It missed Go 1.19 but should make Go 1.20 (I think). Support for ARM vector instruction sets is lacking in the Go assembler right now. While there's still a lot of work to be done on the avo side, it will help when the Go assembler is overhauled to support the full ARM ISA.

Reference:

evanoberholster added a commit to evanoberholster/imagemeta that referenced this issue Mar 14, 2023
Added SIMD support for PHash64 and PHash256. SIMD improvements limited to linux/amd64 at this time. Will need further testing to expand coverage for darwin/amd64 and windows/amd64.

May consider future arm assembly support with [mmcloughlin/avo#189 arm support).

```
name                      old time/op    new time/op    delta
PHash64/Fast32-12           37.3µs ± 1%     6.2µs ± 1%  -83.33%  (p=0.000 n=17+16)
PHash64/Fast-Parallel-12    6.25µs ± 1%    0.90µs ± 0%  -85.61%  (p=0.000 n=19+19)

name                      old alloc/op   new alloc/op   delta
PHash64/Fast32-12            0.00B          0.00B          ~     (all equal)
PHash64/Fast-Parallel-12     0.00B          0.00B          ~     (all equal)

name                      old allocs/op  new allocs/op  delta
PHash64/Fast32-12             0.00           0.00          ~     (all equal)
PHash64/Fast-Parallel-12      0.00           0.00          ~     (all equal)
```

```
name                       old time/op    new time/op    delta
PHash256/Fast-12              739µs ± 2%     124µs ± 3%     -83.21%  (p=0.000 n=20+20)
PHash256/Fast-Parallel-12     120µs ± 1%      16µs ± 1%     -86.29%  (p=0.000 n=20+20)

name                       old alloc/op   new alloc/op   delta
PHash256/Fast-12             3.89B ±234%  1033.00B ± 2%  +26462.86%  (p=0.000 n=18+20)
PHash256/Fast-Parallel-12    2.19B ±129%  1040.10B ± 1%  +47447.43%  (p=0.000 n=16+20)

name                       old allocs/op  new allocs/op  delta
PHash256/Fast-12               0.00           1.00 ± 0%       +Inf%  (p=0.000 n=20+20)
PHash256/Fast-Parallel-12      0.00           1.00 ± 0%       +Inf%  (p=0.000 n=20+20)
```
@benduncan
Copy link

Looking forward to see ARM/Neon support for Avo! Happy to help QA.

The tide is turning, 374 million x86 processors were shipped in 2022 alone (Source Mercury Research). In comparison, close to 20 billion ARM-based chips are shipped yearly (Source Arm).

@lizthegrey
Copy link

The work ongoing for refactoring the arm64 assembler appears to have taken a hit due to Arm laying off their China based staff working on Golang improvements. It may be a while yet until the pieces are ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal Ideas for discussion
Projects
None yet
Development

No branches or pull requests

3 participants