-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Changes from 1 commit
8282740
b357f35
6f79b1a
727e37f
c52c7e4
e85ac53
95b0719
c859a37
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -275,12 +275,8 @@ ifneq ($(OS), WINNT) | |
@ln -sf libjulia-debug.$(JL_MAJOR_MINOR_SHLIB_EXT) $(build_shlibdir)/libjulia-debug.$(SHLIB_EXT) | ||
endif | ||
ifeq ($(USE_POLLY_ACC), 1) | ||
# Place libGPURuntime to be accessible under libjulia's RPATH | ||
ifeq ($(OS), WINNT) | ||
@cp $(shell $(LLVM_CONFIG_HOST) --libdir)/libGPURuntime.dll $(build_shlibdir) | ||
else | ||
# Place libGPURuntime such that it's accessible under libjulia's RPATH | ||
@cp $(shell $(LLVM_CONFIG_HOST) --libdir)/libGPURuntime.$(SHLIB_EXT) $(build_shlibdir) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this isn't the right target for this - LLVM should be responsible for installing this library if it's part of the public interface There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. libGPURuntime is a part of Polly and not LLVM, therefore LLVM will not handling it.
what is a "public interface" ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I mean if this library is meant to be linked to externally, and isn't just a temporary byproduct of the polly build process, then polly's build system should be installing it when you do There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. libGPURuntime is installed into usr/lib when Julia's using an LLVM build in deps/scratch, but needs to be copied when an external LLVM build is being used. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. where would it get installed for an external LLVM build? wouldn't it be in the same place as the rest of the llvm-config There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lt would be available in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm copying it from
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this isn't the target for libGPURuntime, this is the target for libjulia-debug, so why is it being copied in this step? and for external-llvm builds, why does it need to be copied at all? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. libGPURuntime.so is required to run the PTX code generated by Polly-ACC, therefore has to be accessible to libjulia.so or libjulia-debug.so's RPATH. Previously, I managed this by hard-coding the location of the library through the -rpath, which was discouraged by @vtjnash in this comment. This meant that I had to place libGPURuntime.so into a directory covered by the default RPATH, $ORIGIN:$ORIGIN/julia. So, I'm copying libGPURuntime to usr/lib ($ORIGIN w.r.t. libjulia*.so).
All libraries are installed in usr/lib only when using an internal-llvm build. So it has to be copied in case of external-llvm builds.
Actually, it has to be copied into usr/lib for both libjulia and libjulia-debug. I made a mistake by not adding the copy command in the case of libjulia also. I'll add a libGPURuntime target and make both libjulia and libjulia-target depend on it. |
||
endif | ||
endif | ||
$(DSYMUTIL) $@ | ||
|
||
|
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.
You shouldn't need the conditional here, since
$(SHLIB_EXT)
will bedll
on WindowsThere 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.
grep SHLIB_EXT= -Rsn
gave me this,So, I thought I had to handle the case for Windows. Anyways, I doubt that fixup-libgfortran.sh is setting the SHLIB_EXT used in src/Makefile. How is it getting set then ?
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.
SHLIB_EXT
is set somewhere around line 500 ofMake.inc
.Make.inc
is the file that defines the standard stuff that's used in all of the various makefiles,SHLIB_EXT
being one example.In this case, the variable is set using the eager resolution assignment operator,
:=
. Regular=
does lazy resolution in Make. It also has a space before the assignment. So grepping with a trailing=
won't find it. Just now I found it withsift -e '\bSHLIB_EXT\s*[:?]?=' -n Make.inc
.