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

Add Numba #685

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Add Numba #685

wants to merge 8 commits into from

Conversation

certik
Copy link
Member

@certik certik commented Mar 2, 2015

See commit logs. With this PR, one can execute the script from:

http://matthewrocklin.com/blog/work/2015/02/28/Ising/

I.e.:

$ python ising.py 
/home/certik/repos/hashstack/default/lib/python2.7/site-packages/numba/__init__.py:73: UserWarning: llvmlite version format not recognized!
  warnings.warn("llvmlite version format not recognized!")
$

Do not build shared libraries, because:

a) it fails to build with an error:

[llvm] [  8%] Built target llvm-tblgen
[llvm] Scanning dependencies of target intrinsics_gen
[llvm] [  8%] Building Intrinsics.gen...
[llvm] ../../../bin/llvm-tblgen: error while loading shared libraries: libLLVMSupport.so: cannot open shared object file: No such file or directory

b) it is not recommended by upstream, i.e. from docs/CMake.rst:

**BUILD_SHARED_LIBS**:BOOL
  Flag indicating if shared libraries will be built. Its default value is OFF.
  Shared libraries are not supported on Windows and not recommended on the
  other OSes.
We also needed to put `llvm-config` into path during building.
@ahmadia
Copy link
Contributor

ahmadia commented Mar 2, 2015

Nice, +100 :)

So that it matches the LLVM version we have in Hashstack.
@certik
Copy link
Member Author

certik commented Mar 2, 2015

I also updated Clang and it still builds, so I think this can be merged.

@ahmadia the only possible issue is that I switched to static libraries with LLVM, see the commit log for explanation: 77ca268

@certik certik mentioned this pull request Mar 2, 2015
@ahmadia
Copy link
Contributor

ahmadia commented Mar 3, 2015

What do the Julia/numba folks need? I think of them as our two primary LLVM customers :)

@certik
Copy link
Member Author

certik commented Mar 3, 2015

That's right. Numba seems to need static libraries (via llvmlite). Julia I thought required dynamic libraries, but given that newer LLVM fails to build and upstream says dynamic are not recommended, we should figure out if Julia can work with static libraries as well.

@pitrou
Copy link

pitrou commented Mar 3, 2015

LLVM breaks its API at each feature release, so you probably want specific versions for each dependent (e.g. llvmlite).

@certik
Copy link
Member Author

certik commented Mar 27, 2015

@pitrou do they break the API when going from 3.5.1 to 3.5.2, or do they only break it when going from 3.5 to 3.6?

@ahmadia, in any case, it looks like we'll have to have llvm3.5, llvm3.4, etc., or maybe even llvm3.5.1, llvm3.5.2 etc. --- essentially we need a particular version for Numba, a particular version for Julia and a particular version for Clang. It should not clash, hopefully.

@pitrou
Copy link

pitrou commented Mar 27, 2015

Le 27/03/2015 16:16, Ondřej Čertík a écrit :

@pitrou https://github.com/pitrou do they break the API when going
from 3.5.1 to 3.5.2, or do they only break it when going from 3.5 to 3.6?

Only from 3.5 to 3.6.

@certik
Copy link
Member Author

certik commented Mar 27, 2015

@pitrou thanks. Then it's really simple, we just need to have llvm3.4, llvm3.5, etc. The tough part is how to handle Julia, since I think it requires dynamic libraries. Since upstream recommends static, I would make static the default, and for Julia we can create a package llvm3.4-dynamic or something similar.

@ahmadia
Copy link
Contributor

ahmadia commented Mar 27, 2015

@certik - Are we in the situation where one profile needs multiple versions of LLVM simultaneously installed?

@certik
Copy link
Member Author

certik commented Mar 27, 2015

Yes, if you want to try Julia and Numba, from the same profile. But I don't think the profile itself needs to have both LLVM installed, it's just that Julia needs to be built with a different configuration of LLVM than Numba. So our profile variables can't solve the issue, it needs to be a separate package.

@ahmadia
Copy link
Contributor

ahmadia commented Mar 27, 2015

Okay, this needs to be carefully managed, then. I'd like to avoid
repeating ourselves, where possible, but not sure how to fix this. @dagss?

On Fri, Mar 27, 2015 at 3:11 PM, Ondřej Čertík [email protected]
wrote:

Yes, if you want to try Julia and Numba, from the same profile. But I
don't think the profile itself needs to have both LLVM installed, it's just
that Julia needs to be built with a different configuration of LLVM than
Numba. So our profile variables can't solve the issue, it needs to be a
separate package.


Reply to this email directly or view it on GitHub
#685 (comment).

@dagss
Copy link
Member

dagss commented Mar 27, 2015

Me and Mark Florisson discussed this issue in detail, but that's for future features.

So you probably need "base_llvm", then specific "llvm_configured_for_julia" and "llvm_configured_for_numba" packages that extend it to override configuration (hopefully with better names that reflect the configuration difference and not who's using them).

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

Successfully merging this pull request may close these issues.

4 participants