-
-
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
USE_POLLY_ACC : Remove dependency on CUDA headerfiles and link libjulia to libGPURuntime #22036
Merged
staticfloat
merged 8 commits into
JuliaLang:master
from
singam-sanjay:rm_CUDALIB_dependency
Jun 13, 2017
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
8282740
USE_POLLY_ACC : Remove dependency on CUDA headerfiles and link libjul…
singam-sanjay b357f35
Removed comments and CUDALIB_INCLUDE_DIR variable.
singam-sanjay 6f79b1a
Comments on libGPURuntime copy
singam-sanjay 727e37f
Removed handling SHLIB_EXT for Windows and updated comment
singam-sanjay c52c7e4
libGPURuntime is now a dependency of libjuilia and libjulia-debug.
singam-sanjay e85ac53
Remove trailing whitespace
singam-sanjay 95b0719
Corrected libGPURuntime.so to libGPURuntime.$(SHLIB_EXT)
singam-sanjay c859a37
Remove explicitly copying libGPURuntime.so
singam-sanjay File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm understanding the purpose of this line properly, I think this should be invoked via the
install-llvm
target withindeps/llvm.mk
, rather than as a standalone target withinsrc/Makefile
. We should treat this library the same as we treat the rest of the LLVM libraries, so that it gets installed at the same time, patched viapatchelf
at the same time, etc...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see some collapsed discussion above, I think the reason it wasn't done that way is to account for system llvm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So then what do we do for
libLLVM.so
when using system LLVM?@singam-sanjay Why do we need to copy this library in when
libLLVM.so
itself doesn't get copied in?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@staticfloat When building Julia with an external/system LLVM-Polly build, USE_LLVM_SHLIB:=0 is a default setting.
libjulia is instead linked to the static libraries.
Even when not linking with libLLVM.so, GPURuntime has to be made available whenever USE_POLLY_ACC:=1.
Please note that julia needs to be built with llvm-svn whenever USE_POLLY:=1, so the above arguments may not hold for system LLVM made available through a package manager.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally, I'm not sure we include support for
USE_SYSTEM_*
configurations that aren't from distributions. This seems like a custom setup that another user may not necessarily replicate properly. I'm more inclined to support either a build from within Julia's source tree, or only binaries sourced from package managers.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@singam-sanjay Am I correct in assuming that your usecase is that you have an external LLVM already built to specifications, and the reason you want this functionality is because you want to avoid rebuilding LLVM within Julia's source tree?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not just that, It would be beneficial while developing Julia and LLVM (and Polly ;-)). This is what I have,
Some of the benefits I've felt,
make
in julia_src/ will not build llvm.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@staticfloat ping.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spirit of
USE_SYSTEM_XYZ
flags is to allow for users to use prebuilt binaries of external libraries. E.g. to be able to runUSE_SYSTEM_LLVM=1
in order to use the LLVM libraries that you get when youapt install llvm-dev
, or similar. We don't really intend for it to be used with from-source builds that users create outside of the source tree. This is because the number of possible states that users can get these out-of-source builds into is very large, and dealing with them all intelligently from within the Julia build system is nigh-impossible. We'd much rather restrict the build system to handle only two cases; builds from within the Julia source tree, and re-using prebuilt binaries from system package managers. As there are no system package managers that ship with the features that you're interested in at the moment, I would encourage you to do your development within the LLVM that is managed within the Julia build tree. Any patches you are interested in adding to Julia to spice up the LLVM build recipes to get it built the way you want, I will be happy to review and merge, as this will make it a lot easier for others to replicate your work and build Julia with those features enabled.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So at this point, I'm going to have to say that I don't think I'm willing to merge these changes, I'd like to push this effort toward getting the build incantations for the Julia-owned LLVM to the point where you are happy with the result and can build the LLVM you want Julia to use there, and then we can work on making that portable enough that anyone can build that spiced-up version of LLVM.