-
Notifications
You must be signed in to change notification settings - Fork 645
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
Incompatible with Macs based on the Apple M1 chip #3803
Comments
probably not this year, but given how much of energy savings M1 gives – I'm pretty sure data centers will start migrating once there is rack mounted option (i.e. likely within next 2 years) |
check this mind blowing benchmark for neural nets training https://wandb.ai/vanpelt/m1-benchmark/reports/Can-Apple-s-M1-help-you-train-models-faster-cheaper-than-NVIDIA-s-V100---VmlldzozNTkyMzg |
Related pull request: #3799. Related upstream pull request: wasmerio/wasmer#1831 |
@artob I recently worked with new version of wasmer, they support wasmer on ARM, this issue is on our side: when it's not x86, we should not require AVX |
And this one
they claimed fixed: wasmerio/wasmer#1269 |
@olonho pointed out that Linux ARM and Mac ARM is different compiler backend for Rust and also different rust crates availability, so although I can do some initial attempt on compile rust on a linux arm server, it doesn't mean it would work or not work on a M1 Macbook. @olonho recently have a M1 Macbook, so let me assign him to further investigate this issue :D |
FYI rust-rocksdb/rust-rocksdb#483 rust-rocksdb current release also have problem on new mac, waiting for this PR |
To aid in testing M1 support, note that Scaleway have just rolled out M1 hardware in the cloud, Apple-Silicon-as-a-Service: |
While there is M1 support for Wasmer in general, there does not seem to be M1 support for Wasmer+Singlepass. This is documented in https://github.com/wasmerio/wasmer/blob/2.0.0/Makefile#L33-L37 and https://docs.wasmer.io/ecosystem/wasmer/wasmer-features#compiler-support-by-chipset. I don't know if running x86_64 Singlepass on an M1 is feasible. I guess this ticket is blocked by wasmerio/wasmer#2463. |
|
This issue has been automatically marked as stale because it has not had recent activity in the last 2 months. |
Assigning to @matklad since he mentioned that he has a temporary solution |
I believe The question of compiling near to ARM natively is more involved, for two reasons:
Could someone confirm/deny that setting host tripple to x86 works for modern macs? |
Trying that now, will edit this message with results. UPDATED: yep, this worked. Cold |
Now I regret not getting a M1 Macbook :( |
@matklad could you how to compile nearcore on M1 to readme and close this issue? Thanks! |
Notably, explain how to compile nearcore on M1 closes #3803
Notably, explain how to compile nearcore on M1 closes #3803
This makes nearcore development possible on M1, which is great. Yet do we
still want an issue to support "M1 native nearcore"?
…On Mon, Oct 25, 2021 at 11:46 PM near-bulldozer[bot] < ***@***.***> wrote:
Closed #3803 <#3803> via #5077
<#5077>.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3803 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADFFFCB2C2ZB57TYJNYXVHLUIV3WRANCNFSM4WBOUGDQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
I don't think so -- we rather fundamentally depend on a specific machine architecture for cost estimations. So, while in theory it should be possible to make nearcore node that runs on arm with correct costs, I feel that's a lot of work for relatively little benefit. For developer convenience, "set default-host" seems like an OK solution, and we probably can make it better when we pull #3803. It probably makes sense to revisit this in a couple of years, but we don't need an issue for that. |
OK, my bad, at that moment I've just checked Recently, I've decided to use I guess it was expected according to different architecture, but still I guess it's worth mentioning in this issue.
/cc @matklad |
I've had a call with dev-platform team and realised that we really need a seamless support for M1 (and, more generally, a seamless cross-platform story). The reason for that is |
Building nearcore for x86 was not the issue, running it was. Runtime errors were to be expected, as per the original ticket description:
|
Good to hear, given that I, like increasingly many developers elsewhere, haven't used x86 for going on a year by now and don't expect that to change back. |
to confirm this means m1's cannot run the local develop env described in: https://docs.near.org/docs/tools/kurtosis-localnet or is there a workaround? |
Now I regret getting a M1 Macbook Pro :( |
feat: aarch64 (m1) support Wasmer singlepass does not support aarch64, so disable it there and use wasmtime instead --- feat: make everything compile on m1 (aarch64) Condition all wasmer compilation on not being on aarch64. This could also be done by using features, but then the reverse-dependencies would have to know about this limitation. Currently the code is a bit of a mess due to the amount of #![cfg()] elements, but hopefully this can be improved on later on by having one module with its own submodules per backend. --- The support is still very experimental, but at least near-vm-runner's test will work now. Related to #3803 The first commit is pretty much required, the second commit is this way in order for reverse-dependencies of near-vm-runner to not have to care about which features get enabled. An alternative could have been to make wasmer build on aarch64 (even if panicking on the first call), and the other alternative would have been to have all reverse-dependencies expose the wasm* features and ask that people on aarch64 manually toggle the proper features for things to work.
I have tested neard with #6200 patch and it works great on my Macbook with Apple M1 chip (except that I needed to hotfix #6293 as otherwise the node crashes on boot)! While neard cannot be used on M1 in production given that it uses wasmtime instead of wasmer, I believe this particular issue should be closed as the main concern was usability during development cycles and it is now addressed! Kudos to @Ekleog 🎉 @Ekleog If you believe there is still some work left to be done, feel free to re-open this issue or open a new one. |
I'm recording this as a current known limitation: nearcore currently requires an x86 host which supports the AVX extensions.
nearcore/runtime/near-vm-runner/src/wasmer_runner.rs
Lines 191 to 196 in daad871
Apple's Rosetta does not support AVX as of macOS 11.1 (Big Sur):
This effectively precludes running nearcore on Apple Silicon, such as the initial Apple M1 chip found in the new 2020 MacBook Pro, MacBook Air, and Mac Mini. While that's unlikely to be an issue for any production deployments, it will increasingly hamper our development as developers switch to new Macs.
The future is NEAR and the future is ARM (on Macs, at least), so we better figure out how to reconcile the two before too long.
The text was updated successfully, but these errors were encountered: