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

Missing linux arm64 bindings #53

Closed
neo773 opened this issue Sep 30, 2022 · 6 comments
Closed

Missing linux arm64 bindings #53

neo773 opened this issue Sep 30, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@neo773
Copy link

neo773 commented Sep 30, 2022

Hi,

I'm trying to run this on a linux arm64 machine but the bindings seem to be missing for it.

error: Cannot find package "@shumai/linux_arm64_shumai_flashlight/libflashlight_binding.so" from "/home/opc/benchmarks/node_modules/@shumai/shumai/shumai/ffi/ffi_flashlight.ts"
@bwasti
Copy link
Contributor

bwasti commented Sep 30, 2022

@jacobkahn does GH have runners? I think we could add this pretty easily, no?

@jacobkahn
Copy link
Member

Super easy to add, but Github doesn't have self runners for Linux ARM. I'll look into cross compiling.

@bwasti bwasti added the bug Something isn't working label Oct 2, 2022
@theo-m
Copy link

theo-m commented Oct 4, 2022

Hey I'm interested in trying the lib and helping if I can - if this is a low prio for your team I could look into it

@bwasti
Copy link
Contributor

bwasti commented Oct 4, 2022

hey @theo-m, thanks for the reach out! The reason for the lag on this is that arrayfire doesn't ship arm64 binaries for linux (libarrayfire-cpu3 is woefully out of date).

edit: the below text is out of date, but the script certainly needs lots of improvement (https://github.com/facebookresearch/shumai/blob/main/.github/scripts/install_arrayfire-shumai-flashlight-linux-arm64-cpu.sh)

If you're interested, we would need a build script for arrayfire (from source) + fl bindings with that build. Basically a replacement for these lines: https://github.com/facebookresearch/shumai/blob/main/.github/workflows/build.yml#L160-L166

Ideally some kind of install_arrayfire_linux_arm64.sh that we can use to create binaries with :)

@neo773
Copy link
Author

neo773 commented Oct 4, 2022

@bwasti Have you looked at BuildJet? seems like a drop in replacement for GitHub actions and it supports Linux on arm64.

@bwasti
Copy link
Contributor

bwasti commented Oct 5, 2022

alright I've got an initial pass working -- but there are some workarounds required...

  • you'll have to run this script (builds and installs arrayfire):
curl -L -O https://raw.githubusercontent.com/facebookresearch/shumai/main/.github/scripts/install_arrayfire-shumai-flashlight-linux-arm64-cpu.sh
bash install_arrayfire-shumai-flashlight-linux-arm64-cpu.sh

Edit: this part is no longer necessary!
- second you'll have to install the CPU backend (and manually rename it to not CPU)

bun add @shumai/linux_arm64_shumai_flashlight_cpu
mv node_modules/@shumai/linux_arm64_shumai_flashlight_cpu node_modules/@shumai/linux_arm64_shumai_flashlight

ideally we'd also check the cpu folders

@neo773 neo773 closed this as completed Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants