-
Notifications
You must be signed in to change notification settings - Fork 233
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
Allow disabling the linking of libdevice in CUDACompilerParams #2611
base: master
Are you sure you want to change the base?
Conversation
@@ -3,12 +3,14 @@ | |||
Base.@kwdef struct CUDACompilerParams <: AbstractCompilerParams | |||
cap::VersionNumber | |||
ptx::VersionNumber | |||
link_libdevice::Bool # Used by Reactant.jl |
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.
We're using @kwdef
link_libdevice::Bool # Used by Reactant.jl | |
# for Reactant.jl, which raises NVVM intrinsics to MLIR | |
link_libdevice::Bool = true |
end | ||
|
||
CUDACompilerParams(;cap::VersionNumber, ptx::VersionNumber) = CUDACompilerParams(cap=cap, ptx=ptx, link_libdevice=true) |
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.
CUDACompilerParams(;cap::VersionNumber, ptx::VersionNumber) = CUDACompilerParams(cap=cap, ptx=ptx, link_libdevice=true) |
if !job.config.params.link_libdevice | ||
return # Don't link libdevice, used by Reactant.jl to raise NVVM intrinsics into MLIR | ||
end |
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 !job.config.params.link_libdevice | |
return # Don't link libdevice, used by Reactant.jl to raise NVVM intrinsics into MLIR | |
end | |
job.config.params.link_libdevice || return |
@gbaraldi one small thing : if the flag is set, can CUDA.jl/src/compiler/compilation.jl Line 25 in c10e7cf
|
Add option to disable the linking of libdevice into the IR.
This is needed because https://github.com/EnzymeAD/Reactant.jl requires the intrinsics and not their linked code to raise LLVM IR into MLIR
I imagine this can only be properly tested downstream