-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Port to ARM #3134
Comments
That is probably an LLVM issue, but to make sure we should run with LLVM assertions enabled, and with |
#3128 will help make this job and any future ports easier too. |
The runtime builds successfully on a Cortex-A15 (Chromebook) with a few small Makefile changes. Unfortunately, type inference seems to go haywire somewhere in sysimg.jl, and eventually crashes. |
That MCJIT issue may not be ARM specific. I've been hunting some bugs in the MCJIT code which could cause that. |
What kind of bugs? It seems like this is a loop in inference, leading to a stack overflow. I should also mention that I commented out |
For kicks I just tried building Julia master on a Linaro-Ubuntu ARM using system everything including LLVM 3.4 (Make.user contents and same patch as ihnorton here https://gist.github.com/anonymous/9177166), and had these compilation errors in codegen.cpp: https://gist.github.com/anonymous/9176765 Hope this info is possibly useful in some way. |
@tkelman I think this problem is related to using llvm-3.4 with the code in the master branch of Julia, which switches to using MCJIT when 3.4 is detected. oI have encountered a similar problem on an amd_64 system. In #if defined(LLVM_VERSION_MAJOR) && LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 4
#define LLVM34 1
#define USE_MCJIT 1
#include "llvm/ExecutionEngine/MCJIT.h"
#include "llvm/ExecutionEngine/SectionMemoryManager.h"
#include "llvm/ADT/DenseMapInfo.h"
#endif |
Yes - either use 3.3, or the LLVM 3.5 svn head (that is what I compiled with). |
@tkelman the base system compiled fine for me on an A15 chromebook, the problem was in bootstrap (but some things have been fixed since the last time I tried). |
Sorry, it's sometimes very difficult to know what APIs are from what version of LLVM, I'll go through and make sure everything works on 3.4, but for now 3.5svn should work fine. |
If the likelihood of success is going to be higher with 3.5, then don't worry too much about it. From what I've pieced together it sounds like legacy JIT is expected to be broken on ARM, and the new JIT is only turned on with LLVM 3.4+, so that's why I tried the combination I did. Ooh, LLVM has apt repos for 3.5. Aww, not for ARM :( |
Slightly different set of errors when I set |
Here's the backtrace I get on the current master during bootstrap: https://gist.github.com/ihnorton/1b52f4f034005306f167 I'm not sure why the arguments are not printed, but apparently backtrace is harder on ARM. In the first one I've put |
Out stack unwinder probably doesn't work on ARM |
🍰 |
👏 |
Whoa, nice work! Details, details, where's the PR? Also: 1398635418 days? |
Thanks, but this is less impressive than it looks! I basically just turned a few broken things off: rec_backtrace, cpuid, and some bignum asserts in constants.jl. But that appears to be it, at least for build-to-bootstrap and basic functionality. It's a very tractable list of issues, which is a good sign. |
Really fantastic! This opens quite a new world of possibilities. |
It's a shop! |
Patch set:
@JeffBezanson lol :) you can have an account if you want to check! (chromebook wireless is kind of flaky though, so I have to go reset it manually every 1-2 hours; need to order usb<->ethernet) |
Bravo! This is really exciting. |
Hope not.. Yay!
|
👍 |
This is fabulous, and will open a new set of possibilities for Julia! |
It would be great to release 0.3 with initial arm support! |
If you manage to do it, I'll add ARM support to the coming Fedora package. |
If we can make master build on arm, we can make sure that Debian builds with arm support for the julia 0.3 release. This will get reflected in the next Ubuntu release then. Cc: @sebastien-villemot |
Attempted install on Rasberry Pi under rasberrian. Make ran make for 30 minutes before failure. Followed /ihnorton/Julia/compare/arm-make2 instructions. Very excited about the progress. Wish I could make it to Julia Con |
Is this using llvm 3.4? |
The problem there was openlibm, you'll need |
Yes, that will help. I have not tested with LLVM3.4, only with the SVN trunk (as also specified in |
I'm a new at this but Ill keep testing while you guys supply the direction.
JCXXFLAGS=-std=c++11 FORCE_ARMV7=1 override USE_SUSTEM_LIBM=1
On Sun, May 18, 2014 at 2:38 AM, Isaiah [email protected] wrote:
|
Are these typos? It should be There should be a directory inside Don't think you should need any make options just yet. |
Much further along: I had to install gfortran, update to g++-4.7, (and llvm[4]: Compiling DiagnosticPrinter.cpp for Release+Asserts build PS: yes those were typographical errors in my Make.user file On Sun, May 18, 2014 at 8:20 PM, Tony Kelman [email protected]:
|
Seems like the compiler ran out of RAM while linking. Are there prepackaged llvm packages for your distribution? |
On the raspberry pi I modified the memory split between the CPU and GPU. Giving all 512 MB to the CPU. The compile went much further through the llvm compile ~30hrs. But failed in a similar manner later in the process. I checked the llvm repository and the raspberry pi repository to see if they already have an arm distribution that fits. Unfortunately they do not (the pi is a System on a chip using ARMv6). The most recent llvm release included a compiled ARMv7 package (I assume this is not compatible with an ARMv6 processor) I am not familiar with cross compiling and am not sure I am up for this challenge. Am I stuck? Is my next step begging for an llvm compile to be generated compatible with the raspberry pi? I'd love to test out Julia on this little platform. |
@ihnorton Do you think we should have a README.arm where we just document the steps to build on ARM, and provide a Make.user.ARM? |
http://llvm.org/docs/HowToBuildOnARM.html This page gives instructions for compiling llvm on armv6 and armv7 Can someone help me figure out where to place these instructions in the make file set for Julia I don't know where to specify the |
see https://github.com/JuliaLang/julia/blob/master/deps/Makefile#L379
part of binutils. I haven't used it, but see here @2jcjohnson cross-compiling is going to be much less frustrating. |
@ViralBShah sure, will do. Will need to be labeled as "experimental" (and make clear that codegen is quite slow, even on a "high-end" Cortex A15). |
@ihnorton Could you create a PR with your ARM changes? I just got an arm Chromebook, and am essentially running into the same issues. |
+1 I have an application which would be really nice to run on a BBB. |
Closing this to avoid further discussion here. Please follow progress and discuss in #7662. |
That is only used to make sure On Sun, Sep 14, 2014 at 1:08 PM, Viral B. Shah [email protected]
|
This is the build log for the julia build on ARM:
https://buildd.debian.org/status/fetch.php?pkg=julia&arch=armhf&ver=0.1.2%2Bdfsg-3&stamp=1368675598
The julia system image build fails with:
LLVM ERROR: Not supported instr: BMOVPCRX_CALL %R3, , %LR<imp-def,dead>, %SP, %R0<imp-use,kill>, %R1<imp-use,kill>, %R2<imp-use,kill>, %SP, %R0; dbg:no file:0
The text was updated successfully, but these errors were encountered: