-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
ARM64 support #13514
Comments
Related to bazelbuild/bazel#8833. |
FTR https://www.apple.com/newsroom/2020/06/apple-announces-mac-transition-to-apple-silicon/. The Apple developer documentation also has various information on the differences between the |
I think this would be especially useful for people running lots of cloud experiments (eg RL people), given AWS EC2 now offers low-cost ARM compute. |
This would enable running drake on android as well I imagine? Would be interested in contributing, but not sure where to start |
It is necessary, but not necessarly sufficient. Difficult to say what else would be needed at this stage.
Looking at some of the prerequisites that Drake builds would be a start. I know FCL has issues: flexible-collision-library/fcl#474 |
Cool, thanks for pointing me in the right direction!
Arjun
… On Dec 21, 2020, at 21:11, Jamie Snape ***@***.***> wrote:
This would enable running drake on android as well I imagine?
It is necessary, but not necessarly sufficient. Difficult to say what else would be needed at this stage.
Would be interested in contributing, but not sure where to start.
Looking at some of the prerequisites that Drake builds would be a start. I know FCL has issues: flexible-collision-library/fcl#474
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
As part of a side project, I just tried building Drake (arbitrarily, sha 9d5b2e from yesterday) on a Rasberry Pi 4b, which has a pretty dinky 1.5Mhz 4-core ARM64 CPU. I have the version with 4GB of RAM + added 8GB of swap. I'm running Ubuntu 20.04.2 on it. Kudos to the build folks, it built with relatively superficial modifications! I just tested a 3D sim (simulating a simple point-foot quadruped with collision) with meshcat viz and some interactive sliders, so a lot of the moving parts seem intact and pleasantly performant (i.e. that sim was near-real-time) given that I'm running Drake on a potato. I'll poke at IK and optimization code when I put more hours on that project. The specific diffs are here. The changes I needed to make were:
Notes:
|
You can open an issue about |
Not great that we pass that unconditionally. Bazel does support passing flags specific to processor architecture. Probably worthy of an issue. |
Thanks @gizatt for your experience report and posting the branch. Feedback like this is super helpful for us to understand user's experiences. |
So, I gave this a spin recently. Other than having to disable ibex (which required removing some test stuff; |
FTR -- My now extremely small patch to enable |
Hi folks. I've been trying to build Drake in Ubuntu 20.04.03 on a Raspberry Pi Compute Module 4 with 4GB ram + 8GB swap, using @gizatt's diff above. The only differences I'm aware of between their setup and my own are that I'm in 20.04.03 (instead of 20.04.02), and I'm on a Compute Module 4 instead of 4b, but the underlying hardware is the same to my knowledge. When I run
and when I run
Has anyone else encountered similar problems? I know that Drake isn't officially supported on arm64, but it sounds like other folks are having more success with this off-label use than I am. I also wanted to add my support for future official arm64 support if possible - in my lab we are hoping to use Drake on board small aerial vehicles, and that will be very difficult if limited to x86 arch. Thanks in advance for any suggestions you might be able to offer, and sorry if this is too "off-label" to ask for support! |
I think @adeeb10abbas could give a more definitive answer on the current state of affairs, but as I understand it as of #18264 or later, installing from source using (1) You need to install Bazel by hand first; the Writing that out now, I realize we can probably fix (2) to happen automatically. I'll see what I can do. If you have a build error, I think it's fine to post it in this thread and the people involved can try to help. (Be sure to include a complete recipe to reproduce the problem.) As for the support roadmap, there's nothing set in stone. We're willing to accept PRs that make off-label usage work better (assuming they don't regress the on-label uses), as in #18261, #18264, #18221. Given that we have macOS arm64 under official support, it seems likely that Ubuntu arm64 will remain in pretty good shape. The question of official support is really just about CI costs, since anything official requires regular CI coverage, nightly builds, etc. I haven't yet started to create a budget for those costs, but I can have the team start investigating that soon. |
Thank you very much @jwnimmer-tri for the detailed and helpful response. I will give this another shot with these new tips and report back if I have issues. Really appreciate your candor and assistance! |
Hi everyone, so as Jeremy mentioned, you should be able to build from source with
I can also share the binaries with ya Jack if you really need to hack something soon :)
|
(3) Our Ubuntu CI is pay-by-the-minute (cloud) not dedicated machines, so will almost certainly be cheaper to rent the EC2 machines with arm64 hardware versus cross-compiling. It's also not only a question of hardware cost, but also the staff cost to set up, babysit, and debug the CI over time. We might be able to minimize that by only supporting a narrower subset of CI builds at the start. |
Thank you very much for the additional insights @adeeb10abbas! I don't currently have access to an arm64 mac, but I'm not in a huge rush either. I'll give this a shot compiling on my embedded hardware and see where it gets me. Thanks for the tips! Assuming this works out, I think it's very likely we'll go this route. |
One quick update:
In a couple weeks fiddling with dReal will no longer be necessary; we've deprecated it for removal on 2023-02-01 (#18156). |
Hi everyone Just wanted clarification on the --define NO_DREAL=ON argument
However, I'm still getting these errors during compilation
I'm pretty new to bazel so I assume that I'm passing the commands incorrectly. Does anyone have any advice? |
Apologies, you've hit two new bugs. (1) Drake's CMake build logic ended up using (2) The "no dReal" config switch is not tested in CI when using GCC on arm64, so I missed some spurious deprecation warnings that it emits. Easiest is probably if you could cherry-pick #18686 in your local build. It's scheduled to merge in ~48 hours, and will remove dReal entirely. Alternatively, something along the lines of this patch should suppress the warnings: --- a/solvers/BUILD.bazel
+++ b/solvers/BUILD.bazel
@@ -762,6 +762,7 @@ drake_cc_variant_library(
srcs_enabled = ["dreal_solver.cc"],
srcs_disabled = ["no_dreal.cc"],
hdrs = ["dreal_solver.h"],
+ copts = ["-Wno-deprecated-declarations"],
interface_deps = [
":solver_base",
"//common:essential", |
Hi Jeremy Thanks for the response.
|
@LordAcrobaticTurtle Do you have a small repro that I could give a shot? On my Parallels EDIT - I am actually on a Jammy VM, not focal. |
@LordAcrobaticTurtle that error message seems impossible after the cherry-pick, because the |
@adeeb10abbas I'm trying to build the drake library so it can be used in an external project, unfortunately, I don't have any code I can share. I have not modified the build at all. @jwnimmer-tri Yes, my apologies, I made a mistake when cherry picking that commit.
Happy to provide clarification/more info if needed 🙂 |
@LordAcrobaticTurtle see the Out Of Memory tip. |
Updates: The build system work at #17231 will be helpful here, and is nearing completion. In particular, the VTK change in #16502 will remove the use of precompiled custom binaries as part of a Drake install. The only dependencies necessary to build, install, and run Drake will be things already in Ubuntu. |
Latest in this saga, I'm trying to install Drake on a Jetson Orin. After following the guidance above, building almost succeeds, but I run into a linking error. I'm not tremendously experienced with this process, so any help would be appreciated. If this could be made easier with #17231 as commented above, I could potentially try a pre-release. I'm eventually interested in getting the python bindings to build, but I figured I would try first with the base project. Error Log
|
Update: I managed to get a build working by adding the When I run One final note: When I use the CMake workflow to build the Python bindings, the build succeeds, but install fails because That's all I've done up until now. I'm happy to try suggestions to get all the tests passing or the python bindings installing correctly; otherwise, this is probably all I'll pull on this thread for now. |
When building Drake >= v1.21.0, VTK is compiled from source (and so no longer uses the pre-compiled x86-specific binaries). The only downloaded object code that's not built from source are some opt-in commercial solvers (mosek, gurobi), a docs-only tool (doxygen), and a test-only tool (buildifier; see |
Thanks for the response - I think then my VTK test failures are related to the lack of display, and the other test failures are related to buildifier. |
As of #20579, Drake's
We'd welcome pull request(s) with fixes like that. |
@jwnimmer-tri Apologies for the delay, but opened a PR (above) with our additional linker options. I haven't had the time yet to run extensive testing (apart from our own day-to-day use and an initial set of bazel tests), but I'll do some more wringout in the next day or two. |
Per #21030, we have some CI jobs defined now for arm64 here. Unsurprisingly, they indicate not everything is working yet. In particular, install_bazel.sh is a no-op on arm64 per #18261. Solving that is the next step here. |
The CI jobs are up and running, with Bazel installed properly. To see the current status, check linux-arm-jammy-unprovisioned-gcc-bazel-experimental-release for the most recent build log. As of today, there are around 40 failing tests. The next job for our arm64 user community is to open pull requests with fixes for those tests. It's fine (and preferable) to chip away a them one or a few at a time, not all at once. As long as a PR makes at least one test better, and no tests worse, we're still happy to merge the PR even with overall failing CI. |
As of the most recent build, there are now linker/loader errors. It looks to me like maybe some quadmath library is no longer being linked properly? Not sure. |
We should consider supporting ARM64 / AArch64 for a subset of Drake, and what timeline might make sense to offer such support.
See #10435 and #20075 for sample requests, though I've also received a couple of offline request pings as well.
Given that the core Drake developer team does not currently use this architecture, I'd expect such support to be facilitated by the core team (e.g., code review and Jenkins), but spearheaded via PRs from community contributors.
Please feel free to add additional thoughts below.
Edited to add:
For a while in the past, we advocated Running Drake on macOS ARM hardware via Rosetta 2 on macOS while ARM64 support matured. As of today, macOS is supported on ARM64 natively; see https://drake.mit.edu/installation.html for details.
The remaining focus of this issue is ARM64 for Ubuntu platforms.
One particularly helpful outcome would be to publish Linux ARM64 wheel files to PyPI.
The text was updated successfully, but these errors were encountered: